File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,6 +237,25 @@ extern DL_IMPORT(int) PyUnicode_GetSize(
237237 PyObject * unicode /* Unicode object */
238238 );
239239
240+ /* Resize an already allocated Unicode object to the new size length.
241+
242+ *unicode is modified to point to the new (resized) object and 0
243+ returned on success.
244+
245+ This API may only be called by the function which also called the
246+ Unicode constructor. The refcount on the object must be 1. Otherwise,
247+ an error is returned.
248+
249+ Error handling is implemented as follows: an exception is set, -1
250+ is returned and *unicode left untouched.
251+
252+ */
253+
254+ extern DL_IMPORT (int ) PyUnicode_Resize (
255+ PyObject * * unicode , /* Pointer to the Unicode object */
256+ int length /* New length */
257+ );
258+
240259/* Coerce obj to an Unicode object and return a reference with
241260 *incremented* refcount.
242261
You can’t perform that action at this time.
0 commit comments