diff options
author | Fred Drake <fdrake@acm.org> | 2002-07-01 14:02:31 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-07-01 14:02:31 (GMT) |
commit | 7c75bf2090c58ac0d2bb57220c41327285bf7c1a (patch) | |
tree | 3999d5896e76b38dfbc98c69dbeb99e1c268f267 /Modules/pyexpat.c | |
parent | 19b74c786842ba11b9c99b2fd2f9fca2ebd785b5 (diff) | |
download | cpython-7c75bf2090c58ac0d2bb57220c41327285bf7c1a.zip cpython-7c75bf2090c58ac0d2bb57220c41327285bf7c1a.tar.gz cpython-7c75bf2090c58ac0d2bb57220c41327285bf7c1a.tar.bz2 |
Bring this back into sync with PyXML revision 1.58.
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r-- | Modules/pyexpat.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 045b13a..eac92cb 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -1,11 +1,17 @@ #include "Python.h" #include <ctype.h> +#ifdef HAVE_PYMEMCOMPAT_H +#include "pymemcompat.h" +#endif + #include "compile.h" #include "frameobject.h" #include "expat.h" #ifndef PyDoc_STRVAR +#define PyDoc_STR(str) (str) +#define PyDoc_VAR(name) static char name[] #define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str) #endif @@ -1160,14 +1166,15 @@ newxmlparseobject(char *encoding, char *namespace_separator, PyObject *intern) } XML_SetUserData(self->itself, (void *)self); #ifdef Py_USING_UNICODE - XML_SetUnknownEncodingHandler(self->itself, (XML_UnknownEncodingHandler) PyUnknownEncodingHandler, NULL); + XML_SetUnknownEncodingHandler(self->itself, + (XML_UnknownEncodingHandler) PyUnknownEncodingHandler, NULL); #endif for (i = 0; handler_info[i].name != NULL; i++) /* do nothing */; - self->handlers = malloc(sizeof(PyObject *)*i); - if (!self->handlers){ + self->handlers = malloc(sizeof(PyObject *) * i); + if (!self->handlers) { Py_DECREF(self); return PyErr_NoMemory(); } |