diff options
| author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-02-01 20:20:45 +0000 |
|---|---|---|
| committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-02-01 20:20:45 +0000 |
| commit | 483638c9a865d504b1131c098f010590103415dd (patch) | |
| tree | cc49b6b15d72f8cdf4b34e4c4f681f30c35c3521 /Include | |
| parent | fb9d7127211447337602ab1d5c8f2920302e8525 (diff) | |
| download | cpython-git-483638c9a865d504b1131c098f010590103415dd.tar.gz | |
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 'Include')
| -rw-r--r-- | Include/object.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/object.h b/Include/object.h index 1eaa900235..972e05b1e7 100644 --- a/Include/object.h +++ b/Include/object.h @@ -294,6 +294,9 @@ extern DL_IMPORT(void) Py_ReprLeave(PyObject *); extern DL_IMPORT(long) _Py_HashDouble(double); extern DL_IMPORT(long) _Py_HashPointer(void*); +/* Helper for passing objects to printf and the like */ +#define PyObject_REPR(obj) PyString_AS_STRING(PyObject_Repr(obj)) + /* Flag bits for printing: */ #define Py_PRINT_RAW 1 /* No string quotes etc. */ |
