[Python-checkins] CVS: python/dist/src/Include object.h,2.74,2.75
Jeremy Hylton
jhylton@users.sourceforge.net
Thu, 01 Feb 2001 12:20:47 -0800
Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv14180/Include
Modified Files:
object.h
Log Message:
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
Index: object.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/object.h,v
retrieving revision 2.74
retrieving revision 2.75
diff -C2 -r2.74 -r2.75
*** object.h 2001/02/01 05:25:27 2.74
--- object.h 2001/02/01 20:20:45 2.75
***************
*** 295,298 ****
--- 295,301 ----
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. */