diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2005-12-13 21:55:36 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2005-12-13 21:55:36 (GMT) |
commit | cc117dbb9d925ade41ae3e43ff2292b83b5d9b32 (patch) | |
tree | 6891bbe7284dcd18868bb030deee793e07a38ce5 /Modules/pyexpat.c | |
parent | d7a42881dba311e66f5091cbe0ec7c01f511cc2c (diff) | |
download | cpython-cc117dbb9d925ade41ae3e43ff2292b83b5d9b32.zip cpython-cc117dbb9d925ade41ae3e43ff2292b83b5d9b32.tar.gz cpython-cc117dbb9d925ade41ae3e43ff2292b83b5d9b32.tar.bz2 |
moved magic into structure (mainly to simplify the client code)
added missing API hooks
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r-- | Modules/pyexpat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 2da80c8..ca2a850 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -2018,12 +2018,14 @@ MODULE_INITFUNC(void) /* initialize pyexpat dispatch table */ capi.size = sizeof(capi); + capi.magic = PyExpat_CAPI_MAGIC; capi.MAJOR_VERSION = XML_MAJOR_VERSION; capi.MINOR_VERSION = XML_MINOR_VERSION; capi.MICRO_VERSION = XML_MICRO_VERSION; capi.ErrorString = XML_ErrorString; - capi.GetCurrentColumnNumber = XML_GetCurrentColumnNumber; - capi.GetCurrentLineNumber = XML_GetCurrentLineNumber; + capi.GetErrorCode = XML_GetErrorCode; + capi.GetErrorColumnNumber = XML_GetErrorColumnNumber; + capi.GetErrorLineNumber = XML_GetErrorLineNumber; capi.Parse = XML_Parse; capi.ParserCreate_MM = XML_ParserCreate_MM; capi.ParserFree = XML_ParserFree; @@ -2037,9 +2039,7 @@ MODULE_INITFUNC(void) capi.SetUserData = XML_SetUserData; /* export as cobject */ - capi_object = PyCObject_FromVoidPtrAndDesc( - &capi, PyExpat_CAPI_MAGIC, NULL - ); + capi_object = PyCObject_FromVoidPtr(&capi, NULL); if (capi_object) PyModule_AddObject(m, "expat_CAPI", capi_object); } |