Skip to content

Commit 8bec7e3

Browse files
committed
Address review comments.
1 parent ab309de commit 8bec7e3

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

standard/io/witx/io_streams.witx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
;;; On success, `$size` indicates the number of bytes read, and
6363
;;; `$read_status` indicates the state of the stream.
6464
;;;
65-
;;; When `$read_status` is `$read`, `$size` is equal to the total buffer size
65+
;;; When `$read_status` is `$ready`, `$size` is equal to the total buffer size
6666
;;; of `$iovs`.
6767
;;;
6868
;;; When `$read_status` is `$end`, or on failure, subsequent calls to `read`
@@ -81,7 +81,7 @@
8181
;;; On success, `$size` indicates the number of bytes read, and
8282
;;; `$read_status` indicates the state of the stream.
8383
;;;
84-
;;; When `$read_status` is `$read`, `$size` is equal to the total buffer size
84+
;;; When `$read_status` is `$ready`, `$size` is equal to the total buffer size
8585
;;; of `$iovs`.
8686
;;;
8787
;;; When `$read_status` is `$end`, or on failure, subsequent calls to `read`
@@ -199,7 +199,7 @@
199199
(result $name $pseudonym)
200200
)
201201

202-
;;; Write a pseudonym's nameto the output stream.
202+
;;; Write a pseudonym's name to the output stream.
203203
;;;
204204
;;; This function traps if the pseudonym is not one obtained from calling
205205
;;; `input_pseudonym` or `output_pseudonym` with a `$where` parameter of
@@ -209,8 +209,11 @@
209209
;;; which display the name in contexts where the name is already
210210
;;; exposed.
211211
(@interface func (export "write_pseudonym")
212+
;;; The output to write to.
212213
(param $source $output_byte_stream)
214+
;;; The pseudonym representing the name to write.
213215
(param $name $pseudonym)
216+
;;; Indicate success or failure.
214217
(result $result (expected (error)))
215218
)
216219

@@ -227,7 +230,7 @@
227230
(result $result (expected $size (error)))
228231
)
229232

230-
;;; Forward up to `$n` bytes from an input stream to an output stream.
233+
;;; Forward up to `$len` bytes from an input stream to an output stream.
231234
;;;
232235
;;; If a failure occurs on the output stream, the remaining data from the
233236
;;; input stream is consumed and discarded.
@@ -245,12 +248,15 @@
245248
;;; Return an input stream and an output stream where the input is
246249
;;; transmitted to the output.
247250
(@interface func (export "pipe")
251+
;;; A stream for reading from the created pipe.
248252
(result $source $input_byte_stream)
253+
;;; A stream for writing to the created pipe.
249254
(result $sink $output_byte_stream)
250255
)
251256

252257
;;; Return an output stream which discards data sent to it.
253258
(@interface func (export "null")
259+
;;; A stream for writing bytes to be discarded.
254260
(result $sink $output_byte_stream)
255261
)
256262
)

0 commit comments

Comments
 (0)