mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Doc: define PY_SSIZE_T_CLEAN always (GH-12794)
This commit is contained in:
parent
a304b136ad
commit
c88feceb44
10 changed files with 22 additions and 4 deletions
|
@ -280,6 +280,7 @@ solution then is to call :c:func:`PyParser_ParseString` and test for ``e.error``
|
|||
equal to ``E_EOF``, which means the input is incomplete. Here's a sample code
|
||||
fragment, untested, inspired by code from Alex Farber::
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <node.h>
|
||||
#include <errcode.h>
|
||||
|
@ -318,6 +319,7 @@ complete example using the GNU readline library (you may want to ignore
|
|||
#include <stdio.h>
|
||||
#include <readline.h>
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <object.h>
|
||||
#include <compile.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue