mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +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
|
|
@ -3059,7 +3059,7 @@ init_elementtree(void)
|
|||
|
||||
#if defined(USE_PYEXPAT_CAPI)
|
||||
/* link against pyexpat, if possible */
|
||||
expat_capi = PyCObject_Import("pyexpat", "expat_CAPI");
|
||||
expat_capi = PyCapsule_Import(PyExpat_CAPSULE_NAME, 0);
|
||||
if (expat_capi) {
|
||||
/* check that it's usable */
|
||||
if (strcmp(expat_capi->magic, PyExpat_CAPI_MAGIC) != 0 ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue