diff options
author | Raymond Hettinger <python@rcn.com> | 2003-01-19 00:45:01 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-01-19 00:45:01 (GMT) |
commit | 7b8e281997c7f34d5af86856fc66e7e1c4c7b6d7 (patch) | |
tree | ea226343cdc75608a8a59110302a2b2ebf9bfcb5 /Include/cStringIO.h | |
parent | 9543b340066e85bb920a0655edf33e11050d7b08 (diff) | |
download | cpython-7b8e281997c7f34d5af86856fc66e7e1c4c7b6d7.zip cpython-7b8e281997c7f34d5af86856fc66e7e1c4c7b6d7.tar.gz cpython-7b8e281997c7f34d5af86856fc66e7e1c4c7b6d7.tar.bz2 |
SF bug #670229: doc improvement for cStringIO.h
Gernot Hillier added more detail to the internal API documentation.
Diffstat (limited to 'Include/cStringIO.h')
-rw-r--r-- | Include/cStringIO.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Include/cStringIO.h b/Include/cStringIO.h index 50921d9..66e1edb 100644 --- a/Include/cStringIO.h +++ b/Include/cStringIO.h @@ -26,22 +26,29 @@ extern "C" { static struct PycStringIO_CAPI { - /* Read a string. If the last argument is -1, the remainder will be read. */ + /* Read a string from an input object. If the last argument + is -1, the remainder will be read. + */ int(*cread)(PyObject *, char **, int); - /* Read a line */ + /* Read a line from an input object. Returns the length of the read + line as an int and a pointer inside the object buffer as char** (so + the caller doesn't have to provide its own buffer as destination). + */ int(*creadline)(PyObject *, char **); - /* Write a string */ + /* Write a string to an output object*/ int(*cwrite)(PyObject *, char *, int); - /* Get the cStringIO object as a Python string */ + /* Get the output object as a Python string (returns new reference). */ PyObject *(*cgetvalue)(PyObject *); /* Create a new output object */ PyObject *(*NewOutput)(int); - /* Create an input object from a Python string */ + /* Create an input object from a Python string + (copies the Python string reference). + */ PyObject *(*NewInput)(PyObject *); /* The Python types for cStringIO input and output objects. |