summaryrefslogtreecommitdiffstats
path: root/Doc/extending
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-11-23 23:49:16 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2008-11-23 23:49:16 (GMT)
commit02c3b5cc308a6425ad0cfd23b7d53bc351bc1a4b (patch)
treede640df181f451ca53bb51a4c0ed8a9333ecba42 /Doc/extending
parente8068edf1e8c95adcb9de2ab66bb96cecfcffa5d (diff)
downloadcpython-02c3b5cc308a6425ad0cfd23b7d53bc351bc1a4b.zip
cpython-02c3b5cc308a6425ad0cfd23b7d53bc351bc1a4b.tar.gz
cpython-02c3b5cc308a6425ad0cfd23b7d53bc351bc1a4b.tar.bz2
Document PY_SSIZE_T_CLEAN use and behavior for PyArg_ParseTuple and
mention that it will become the default in a future python version.
Diffstat (limited to 'Doc/extending')
-rw-r--r--Doc/extending/extending.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst
index 96d5654..851e99f 100644
--- a/Doc/extending/extending.rst
+++ b/Doc/extending/extending.rst
@@ -587,11 +587,16 @@ Note that any Python object references which are provided to the caller are
Some example calls::
+ #define PY_SSIZE_T_CLEAN /* Make "s#" use Py_ssize_t rather than int. */
+ #include <Python.h>
+
+::
+
int ok;
int i, j;
long k, l;
const char *s;
- int size;
+ Py_ssize_t size;
ok = PyArg_ParseTuple(args, ""); /* No arguments */
/* Python call: f() */