[Python-checkins] CVS: python/dist/src/Include unicodeobject.h,2.6,2.7
Guido van Rossum
python-dev@python.org
Mon, 10 Apr 2000 09:41:43 -0400 (EDT)
Update of /projects/cvsroot/python/dist/src/Include
In directory eric:/projects/python/develop/guido/src/Include
Modified Files:
unicodeobject.h
Log Message:
Marc-Andre Lemburg: New exported API PyUnicode_Resize().
Index: unicodeobject.h
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Include/unicodeobject.h,v
retrieving revision 2.6
retrieving revision 2.7
diff -C2 -r2.6 -r2.7
*** unicodeobject.h 2000/04/05 20:11:08 2.6
--- unicodeobject.h 2000/04/10 13:41:41 2.7
***************
*** 238,241 ****
--- 238,260 ----
);
+ /* Resize an already allocated Unicode object to the new size length.
+
+ *unicode is modified to point to the new (resized) object and 0
+ returned on success.
+
+ This API may only be called by the function which also called the
+ Unicode constructor. The refcount on the object must be 1. Otherwise,
+ an error is returned.
+
+ Error handling is implemented as follows: an exception is set, -1
+ is returned and *unicode left untouched.
+
+ */
+
+ extern DL_IMPORT(int) PyUnicode_Resize(
+ PyObject **unicode, /* Pointer to the Unicode object */
+ int length /* New length */
+ );
+
/* Coerce obj to an Unicode object and return a reference with
*incremented* refcount.