diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-02-01 20:20:45 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-02-01 20:20:45 (GMT) |
commit | 483638c9a865d504b1131c098f010590103415dd (patch) | |
tree | cc49b6b15d72f8cdf4b34e4c4f681f30c35c3521 /Python/ceval.c | |
parent | fb9d7127211447337602ab1d5c8f2920302e8525 (diff) | |
download | cpython-483638c9a865d504b1131c098f010590103415dd.zip cpython-483638c9a865d504b1131c098f010590103415dd.tar.gz cpython-483638c9a865d504b1131c098f010590103415dd.tar.bz2 |
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
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 15e0b3a..8eaa8bd 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals, 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 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals, 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 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals, 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); |