diff Modules/pyexpat.c @ 24076:95ccd5bbdc86 legacy-trunk

Bring this back into sync with PyXML revision 1.58.
author Fred Drake <fdrake@acm.org>
date Mon, 01 Jul 2002 14:02:31 +0000
parents 92834a248c15
children 183eba2d2214
line wrap: on
line diff
--- a/Modules/pyexpat.c	Mon Jul 01 03:52:19 2002 +0000
+++ b/Modules/pyexpat.c	Mon Jul 01 14:02:31 2002 +0000
@@ -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 @@
     }
     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();
     }