[Python-checkins] CVS: python/dist/src/Include unicodeobject.h,2.13,2.14

M.-A. Lemburg python-dev@python.org
Fri, 7 Jul 2000 06:45:47 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory slayer.i.sourceforge.net:/tmp/cvs-serv16811/Include
Modified Files:
	unicodeobject.h 
Log Message:
Added new API PyUnicode_FromEncodedObject() which supports decoding
objects including instance objects.
The old API PyUnicode_FromObject() is still available as shortcut.
Index: unicodeobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/unicodeobject.h,v
retrieving revision 2.13
retrieving revision 2.14
diff -C2 -r2.13 -r2.14
*** unicodeobject.h	2000年07月07日 09:01:41	2.13
--- unicodeobject.h	2000年07月07日 13:45:44	2.14
***************
*** 298,301 ****
--- 298,319 ----
 */
 
+ extern DL_IMPORT(PyObject*) PyUnicode_FromEncodedObject(
+ register PyObject *obj, 	/* Object */
+ const char *encoding, /* encoding */
+ const char *errors /* error handling */
+ );
+ 
+ /* Shortcut for PyUnicode_FromEncodedObject(obj, NULL, "strict");
+ which results in using the default encoding as basis for 
+ decoding the object.
+ 
+ Coerces obj to an Unicode object and return a reference with
+ *incremented* refcount.
+ 
+ The API returns NULL in case of an error. The caller is responsible
+ for decref'ing the returned objects.
+ 
+ */
+ 
 extern DL_IMPORT(PyObject*) PyUnicode_FromObject(
 register PyObject *obj 	/* Object */

AltStyle によって変換されたページ (->オリジナル) /