summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/memory.rst
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2013-03-22 20:43:30 (GMT)
committerGregory P. Smith <greg@krypto.org>2013-03-22 20:43:30 (GMT)
commit4b52ae8f971152c2189de1031a7219d33846670d (patch)
tree67b19a3186c548eeca8ee27c6b922c0d6f00e30f /Doc/c-api/memory.rst
parent3f885b543256df8acabc39fa9c28f45dfa6e4979 (diff)
downloadcpython-4b52ae8f971152c2189de1031a7219d33846670d.zip
cpython-4b52ae8f971152c2189de1031a7219d33846670d.tar.gz
cpython-4b52ae8f971152c2189de1031a7219d33846670d.tar.bz2
Clean up references to the no longer existing PyString_ APIs in our docs.
Diffstat (limited to 'Doc/c-api/memory.rst')
-rw-r--r--Doc/c-api/memory.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/c-api/memory.rst b/Doc/c-api/memory.rst
index 5465571..8afa56a 100644
--- a/Doc/c-api/memory.rst
+++ b/Doc/c-api/memory.rst
@@ -61,7 +61,7 @@ example::
if (buf == NULL)
return PyErr_NoMemory();
...Do some I/O operation involving buf...
- res = PyString_FromString(buf);
+ res = PyBytes_FromString(buf);
free(buf); /* malloc'ed */
return res;
@@ -169,7 +169,7 @@ I/O buffer is allocated from the Python heap by using the first function set::
if (buf == NULL)
return PyErr_NoMemory();
/* ...Do some I/O operation involving buf... */
- res = PyString_FromString(buf);
+ res = PyBytes_FromString(buf);
PyMem_Free(buf); /* allocated with PyMem_Malloc */
return res;
@@ -181,7 +181,7 @@ The same code using the type-oriented function set::
if (buf == NULL)
return PyErr_NoMemory();
/* ...Do some I/O operation involving buf... */
- res = PyString_FromString(buf);
+ res = PyBytes_FromString(buf);
PyMem_Del(buf); /* allocated with PyMem_New */
return res;