[Python-checkins] r45291 - python/trunk/Modules/xxsubtype.c python/trunk/Modules/zipimport.c

anthony.baxter python-checkins at python.org
Wed Apr 12 06:29:02 CEST 2006


Author: anthony.baxter
Date: Wed Apr 12 06:29:01 2006
New Revision: 45291

Modified:
   python/trunk/Modules/xxsubtype.c
   python/trunk/Modules/zipimport.c
Log:
remove forward declarations. No constructors to move for these files. Makes
code work with C++ compilers.


Modified: python/trunk/Modules/xxsubtype.c
==============================================================================
--- python/trunk/Modules/xxsubtype.c	(original)
+++ python/trunk/Modules/xxsubtype.c	Wed Apr 12 06:29:01 2006
@@ -79,8 +79,6 @@
 	{NULL,	NULL},
 };
 
-static PyTypeObject spamlist_type;
-
 static int
 spamlist_init(spamlistobject *self, PyObject *args, PyObject *kwds)
 {
@@ -179,8 +177,6 @@
 	{NULL,	NULL},
 };
 
-static PyTypeObject spamdict_type;
-
 static int
 spamdict_init(spamdictobject *self, PyObject *args, PyObject *kwds)
 {

Modified: python/trunk/Modules/zipimport.c
==============================================================================
--- python/trunk/Modules/zipimport.c	(original)
+++ python/trunk/Modules/zipimport.c	Wed Apr 12 06:29:01 2006
@@ -40,7 +40,6 @@
 	PyObject *files;    /* dict with file info {path: toc_entry} */
 };
 
-static PyTypeObject ZipImporter_Type;
 static PyObject *ZipImportError;
 static PyObject *zip_directory_cache = NULL;
 
@@ -958,7 +957,7 @@
 	PyObject *fixed_source;
 
 	/* one char extra for trailing \n and one for terminating \0 */
-	buf = PyMem_Malloc(PyString_Size(source) + 2);
+	buf = (char *)PyMem_Malloc(PyString_Size(source) + 2);
 	if (buf == NULL) {
 		PyErr_SetString(PyExc_MemoryError,
 				"zipimport: no memory to allocate "


More information about the Python-checkins mailing list