summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2005-12-13 20:43:04 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2005-12-13 20:43:04 (GMT)
commitd7a42881dba311e66f5091cbe0ec7c01f511cc2c (patch)
tree59595e17da764da7da54068e3f8bce6b10d63f44 /Modules
parentc3345040df1adb502f5b62e9b3efc6f4232a952f (diff)
downloadcpython-d7a42881dba311e66f5091cbe0ec7c01f511cc2c.zip
cpython-d7a42881dba311e66f5091cbe0ec7c01f511cc2c.tar.gz
cpython-d7a42881dba311e66f5091cbe0ec7c01f511cc2c.tar.bz2
renamed dispatch -> capi to match other CAPI implementations
(e.g. cStringIO, ucnhash, etc)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/pyexpat.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index b59a51d..2da80c8 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -1840,8 +1840,8 @@ MODULE_INITFUNC(void)
PyObject *modelmod_name;
PyObject *model_module;
PyObject *sys_modules;
- static struct PyExpat_Dispatch dispatch;
- PyObject* dispatch_object;
+ static struct PyExpat_CAPI capi;
+ PyObject* capi_object;
if (errmod_name == NULL)
return;
@@ -2017,31 +2017,31 @@ MODULE_INITFUNC(void)
#undef MYCONST
/* initialize pyexpat dispatch table */
- dispatch.size = sizeof(dispatch);
- dispatch.MAJOR_VERSION = XML_MAJOR_VERSION;
- dispatch.MINOR_VERSION = XML_MINOR_VERSION;
- dispatch.MICRO_VERSION = XML_MICRO_VERSION;
- dispatch.ErrorString = XML_ErrorString;
- dispatch.GetCurrentColumnNumber = XML_GetCurrentColumnNumber;
- dispatch.GetCurrentLineNumber = XML_GetCurrentLineNumber;
- dispatch.Parse = XML_Parse;
- dispatch.ParserCreate_MM = XML_ParserCreate_MM;
- dispatch.ParserFree = XML_ParserFree;
- dispatch.SetCharacterDataHandler = XML_SetCharacterDataHandler;
- dispatch.SetCommentHandler = XML_SetCommentHandler;
- dispatch.SetDefaultHandlerExpand = XML_SetDefaultHandlerExpand;
- dispatch.SetElementHandler = XML_SetElementHandler;
- dispatch.SetNamespaceDeclHandler = XML_SetNamespaceDeclHandler;
- dispatch.SetProcessingInstructionHandler = XML_SetProcessingInstructionHandler;
- dispatch.SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler;
- dispatch.SetUserData = XML_SetUserData;
+ capi.size = sizeof(capi);
+ 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.Parse = XML_Parse;
+ capi.ParserCreate_MM = XML_ParserCreate_MM;
+ capi.ParserFree = XML_ParserFree;
+ capi.SetCharacterDataHandler = XML_SetCharacterDataHandler;
+ capi.SetCommentHandler = XML_SetCommentHandler;
+ capi.SetDefaultHandlerExpand = XML_SetDefaultHandlerExpand;
+ capi.SetElementHandler = XML_SetElementHandler;
+ capi.SetNamespaceDeclHandler = XML_SetNamespaceDeclHandler;
+ capi.SetProcessingInstructionHandler = XML_SetProcessingInstructionHandler;
+ capi.SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler;
+ capi.SetUserData = XML_SetUserData;
/* export as cobject */
- dispatch_object = PyCObject_FromVoidPtrAndDesc(
- &dispatch, PyExpat_DISPATCH_MAGIC, NULL
+ capi_object = PyCObject_FromVoidPtrAndDesc(
+ &capi, PyExpat_CAPI_MAGIC, NULL
);
- if (dispatch_object)
- PyModule_AddObject(m, "dispatch", dispatch_object);
+ if (capi_object)
+ PyModule_AddObject(m, "expat_CAPI", capi_object);
}
static void