]> granicus.if.org Git - python/commitdiff
remove forward declarations. No constructors to move for these files. Makes
authorAnthony Baxter <anthonybaxter@gmail.com>
Wed, 12 Apr 2006 04:29:01 +0000 (04:29 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Wed, 12 Apr 2006 04:29:01 +0000 (04:29 +0000)
code work with C++ compilers.

Modules/xxsubtype.c
Modules/zipimport.c

index ffbc72b1657ef7a0c4a5b8a54384d4ad6ac394d8..88ce6c5bba48fd5afd5ecbc60590f7514210fdbf 100644 (file)
@@ -79,8 +79,6 @@ static PyMethodDef spamlist_methods[] = {
        {NULL,  NULL},
 };
 
-static PyTypeObject spamlist_type;
-
 static int
 spamlist_init(spamlistobject *self, PyObject *args, PyObject *kwds)
 {
@@ -179,8 +177,6 @@ static PyMethodDef spamdict_methods[] = {
        {NULL,  NULL},
 };
 
-static PyTypeObject spamdict_type;
-
 static int
 spamdict_init(spamdictobject *self, PyObject *args, PyObject *kwds)
 {
index 637dc48aa5dc9eb524e9fc8a3dc12c9682d6dbdd..3e376562f3376cce005ef13e2fb319469e9043af 100644 (file)
@@ -40,7 +40,6 @@ struct _zipimporter {
        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 @@ normalize_line_endings(PyObject *source)
        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 "