Backported PyCapsule from 3.1, and converted most uses of

CObject to PyCapsule.
This commit is contained in:
Larry Hastings 2010-03-25 00:54:54 +00:00
parent 53ff86ea5f
commit 402b73fb8d
40 changed files with 1048 additions and 127 deletions

View file

@ -4496,7 +4496,7 @@ init_socket(void)
/* Export C API */
if (PyModule_AddObject(m, PySocket_CAPI_NAME,
PyCObject_FromVoidPtr((void *)&PySocketModuleAPI, NULL)
PyCapsule_New(&PySocketModuleAPI, PySocket_CAPSULE_NAME, NULL)
) != 0)
return;