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
|
@ -761,8 +761,8 @@ initcStringIO(void) {
|
|||
Py_TYPE(&Otype)=&PyType_Type;
|
||||
if (PyType_Ready(&Otype) < 0) return;
|
||||
if (PyType_Ready(&Itype) < 0) return;
|
||||
PyDict_SetItemString(d,"cStringIO_CAPI",
|
||||
v = PyCObject_FromVoidPtr(&CAPI,NULL));
|
||||
v = PyCapsule_New(&CAPI, PycStringIO_CAPSULE_NAME, NULL);
|
||||
PyDict_SetItemString(d,"cStringIO_CAPI", v);
|
||||
Py_XDECREF(v);
|
||||
|
||||
/* Export Types */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue