[Python-checkins] python/dist/src/Modules pyexpat.c,2.66,2.67

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Tue, 02 Jul 2002 08:44:38 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv13501

Modified Files:
	pyexpat.c 
Log Message:
Do not depend on pymemcompat.h (was only used for PyXML); Martin likes
it all inline.


Index: pyexpat.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v
retrieving revision 2.66
retrieving revision 2.67
diff -C2 -d -r2.66 -r2.67
*** pyexpat.c	1 Jul 2002 14:02:31 -0000	2.66
--- pyexpat.c	2 Jul 2002 15:44:36 -0000	2.67
***************
*** 2,9 ****
  #include <ctype.h>
  
- #ifdef HAVE_PYMEMCOMPAT_H
- #include "pymemcompat.h"
- #endif
- 
  #include "compile.h"
  #include "frameobject.h"
--- 2,5 ----
***************
*** 974,978 ****
--- 970,980 ----
          new_parser->buffer = malloc(new_parser->buffer_size);
          if (new_parser->buffer == NULL) {
+ #ifndef Py_TPFLAGS_HAVE_GC
+             /* Code for versions 2.0 and 2.1 */
+             PyObject_Del(new_parser);
+ #else
+             /* Code for versions 2.2 and later. */
              PyObject_GC_Del(new_parser);
+ #endif
              return PyErr_NoMemory();
          }