Kaydet (Commit) d6495b59 authored tarafından Anthony Baxter's avatar Anthony Baxter

remove forward declarations. No constructors to move for these files. Makes

code work with C++ compilers.
üst aefd8ca7
...@@ -79,8 +79,6 @@ static PyMethodDef spamlist_methods[] = { ...@@ -79,8 +79,6 @@ static PyMethodDef spamlist_methods[] = {
{NULL, NULL}, {NULL, NULL},
}; };
static PyTypeObject spamlist_type;
static int static int
spamlist_init(spamlistobject *self, PyObject *args, PyObject *kwds) spamlist_init(spamlistobject *self, PyObject *args, PyObject *kwds)
{ {
...@@ -179,8 +177,6 @@ static PyMethodDef spamdict_methods[] = { ...@@ -179,8 +177,6 @@ static PyMethodDef spamdict_methods[] = {
{NULL, NULL}, {NULL, NULL},
}; };
static PyTypeObject spamdict_type;
static int static int
spamdict_init(spamdictobject *self, PyObject *args, PyObject *kwds) spamdict_init(spamdictobject *self, PyObject *args, PyObject *kwds)
{ {
......
...@@ -40,7 +40,6 @@ struct _zipimporter { ...@@ -40,7 +40,6 @@ struct _zipimporter {
PyObject *files; /* dict with file info {path: toc_entry} */ PyObject *files; /* dict with file info {path: toc_entry} */
}; };
static PyTypeObject ZipImporter_Type;
static PyObject *ZipImportError; static PyObject *ZipImportError;
static PyObject *zip_directory_cache = NULL; static PyObject *zip_directory_cache = NULL;
...@@ -958,7 +957,7 @@ normalize_line_endings(PyObject *source) ...@@ -958,7 +957,7 @@ normalize_line_endings(PyObject *source)
PyObject *fixed_source; PyObject *fixed_source;
/* one char extra for trailing \n and one for terminating \0 */ /* 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) { if (buf == NULL) {
PyErr_SetString(PyExc_MemoryError, PyErr_SetString(PyExc_MemoryError,
"zipimport: no memory to allocate " "zipimport: no memory to allocate "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment