[Python-checkins] CVS: python/dist/src/Include abstract.h,2.27,2.28 object.h,2.68,2.69
M.-A. Lemburg
lemburg@users.sourceforge.net
Wed, 17 Jan 2001 09:09:55 -0800
Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv21826/Include
Modified Files:
abstract.h object.h
Log Message:
This patch adds a new builtin unistr() which behaves like str()
except that it always returns Unicode objects.
A new C API PyObject_Unicode() is also provided.
This closes patch #101664.
Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
Index: abstract.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v
retrieving revision 2.27
retrieving revision 2.28
diff -C2 -r2.27 -r2.28
*** abstract.h 2000/08/24 20:09:45 2.27
--- abstract.h 2001/01/17 17:09:53 2.28
***************
*** 272,275 ****
--- 272,287 ----
*/
+ /* Implemented elsewhere:
+
+ PyObject *PyObject_Unicode(PyObject *o);
+
+ Compute the unicode representation of object, o. Returns the
+ unicode representation on success, NULL on failure. This is
+ the equivalent of the Python expression: unistr(o).)
+
+ Called by the unistr() built-in function.
+
+ */
+
DL_IMPORT(int) PyCallable_Check(PyObject *o);
Index: object.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/object.h,v
retrieving revision 2.68
retrieving revision 2.69
diff -C2 -r2.68 -r2.69
*** object.h 2001/01/17 15:20:39 2.68
--- object.h 2001/01/17 17:09:53 2.69
***************
*** 267,270 ****
--- 267,271 ----
extern DL_IMPORT(PyObject *) PyObject_Repr(PyObject *);
extern DL_IMPORT(PyObject *) PyObject_Str(PyObject *);
+ extern DL_IMPORT(PyObject *) PyObject_Unicode(PyObject *);
extern DL_IMPORT(int) PyObject_Compare(PyObject *, PyObject *);
extern DL_IMPORT(PyObject *) PyObject_RichCompare(PyObject *, PyObject *, int);