Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 16394:f700e6b8de1f legacy-trunk
Undo recent change that banned using import to bind a global, as per
discussion on python-dev. 'from mod import *' is still banned except
at the module level.
Fix value for special NOOPT entry in symtable. Initialze to 0 instead
of None, so that later uses of PyInt_AS_LONG() are valid. (Bug
reported by Donn Cave.)
replace local REPR macros with PyObject_REPR in object.h
| author | Jeremy Hylton <jeremy@alum.mit.edu> |
|---|---|
| date | Thu, 01 Feb 2001 20:20:45 +0000 |
| parents | 50f7dd1a5357 |
| children | 80c0b280a4f9 |
line wrap: on
line diff
--- a/Python/ceval.c Thu Feb 01 20:00:40 2001 +0000 +++ b/Python/ceval.c Thu Feb 01 20:20:45 2001 +0000 @@ -31,8 +31,6 @@ typedef PyObject *(*callproc)(PyObject *, PyObject *, PyObject *); -#define REPR(ob) PyString_AS_STRING(PyObject_Repr(ob)) - /* Forward declarations */ static PyObject *eval_code2(PyCodeObject *, @@ -1456,7 +1454,7 @@ if ((x = f->f_locals) == NULL) { PyErr_Format(PyExc_SystemError, "no locals found when storing %s", - REPR(w)); + PyObject_REPR(w)); break; } err = PyDict_SetItem(x, w, v); @@ -1468,7 +1466,7 @@ if ((x = f->f_locals) == NULL) { PyErr_Format(PyExc_SystemError, "no locals when deleting %s", - REPR(w)); + PyObject_REPR(w)); break; } if ((err = PyDict_DelItem(x, w)) != 0) @@ -1563,7 +1561,7 @@ if ((x = f->f_locals) == NULL) { PyErr_Format(PyExc_SystemError, "no locals when loading %s", - REPR(w)); + PyObject_REPR(w)); break; } x = PyDict_GetItem(x, w);
