mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Backported PyCapsule from 3.1, and converted most uses of
CObject to PyCapsule.
This commit is contained in:
parent
53ff86ea5f
commit
402b73fb8d
40 changed files with 1048 additions and 127 deletions
|
@ -18,9 +18,12 @@ extern "C" {
|
|||
This would typically be done in your init function.
|
||||
|
||||
*/
|
||||
|
||||
#define PycStringIO_CAPSULE_NAME "cStringIO.cStringIO_CAPI"
|
||||
|
||||
#define PycString_IMPORT \
|
||||
PycStringIO = (struct PycStringIO_CAPI*)PyCObject_Import("cStringIO", \
|
||||
"cStringIO_CAPI")
|
||||
PycStringIO = ((struct PycStringIO_CAPI*)PyCapsule_Import(\
|
||||
PycStringIO_CAPSULE_NAME, 0))
|
||||
|
||||
/* Basic functions to manipulate cStringIO objects from C */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue