Discussion:
[Python-3000-checkins] r64970 - in python/branches/py3k/Python: pythonrun.c sysmodule.c
thomas.heller
2008-07-15 17:14:52 UTC
Permalink
Author: thomas.heller
Date: Tue Jul 15 19:14:51 2008
New Revision: 64970

Log:
Make these files to compile again under Windows.


Modified:
python/branches/py3k/Python/pythonrun.c
python/branches/py3k/Python/sysmodule.c

Modified: python/branches/py3k/Python/pythonrun.c
==============================================================================
--- python/branches/py3k/Python/pythonrun.c (original)
+++ python/branches/py3k/Python/pythonrun.c Tue Jul 15 19:14:51 2008
@@ -1340,9 +1340,10 @@
/* Don't do anything else */
}
else {
- assert(PyExceptionClass_Check(type));
PyObject* moduleName;
- char* className = PyExceptionClass_Name(type);
+ char* className;
+ assert(PyExceptionClass_Check(type));
+ className = PyExceptionClass_Name(type);
if (className != NULL) {
char *dot = strrchr(className, '.');
if (dot != NULL)

Modified: python/branches/py3k/Python/sysmodule.c
==============================================================================
--- python/branches/py3k/Python/sysmodule.c (original)
+++ python/branches/py3k/Python/sysmodule.c Tue Jul 15 19:14:51 2008
@@ -616,6 +616,7 @@
static PyObject *str__sizeof__, *gc_head_size = NULL;
static char *kwlist[] = {"object", "default", 0};
PyObject *o, *dflt = NULL;
+ PyObject *method;

if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:getsizeof",
kwlist, &o, &dflt))
@@ -639,7 +640,7 @@
if (PyType_Ready(Py_TYPE(o)) < 0)
return NULL;

- PyObject *method = _PyType_Lookup(Py_TYPE(o), str__sizeof__);
+ method = _PyType_Lookup(Py_TYPE(o), str__sizeof__);
if (method == NULL)
PyErr_Format(PyExc_TypeError,
"Type %.100s doesn't define __sizeof__",

Loading...