Mercurial > cpython-lru_cache-weakref
diff Modules/cStringIO.c @ 59998:d11fbc796499 legacy-trunk
Backported PyCapsule from 3.1, and converted most uses of
CObject to PyCapsule.
| author | Larry Hastings <larry@hastings.org> |
|---|---|
| date | Thu, 25 Mar 2010 00:54:54 +0000 |
| parents | 1c964ed35ef9 |
| children | fd25030223b0 |
line wrap: on
line diff
--- a/Modules/cStringIO.c Thu Mar 25 00:51:58 2010 +0000 +++ b/Modules/cStringIO.c Thu Mar 25 00:54:54 2010 +0000 @@ -761,8 +761,8 @@ 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 */
