diff options
Diffstat (limited to 'Include/object.h')
-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 1eaa900..972e05b 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. */ |