File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -674,6 +674,21 @@ APIs:
674674 .. versionadded :: 3.3
675675
676676
677+ .. c :function :: int PyUnicode_Resize (PyObject **unicode, Py_ssize_t length);
678+
679+ Resize a Unicode object *\* unicode * to the new *length * in code points.
680+
681+ Try to resize the string in place (which is usually faster than allocating
682+ a new string and copying characters), or create a new string.
683+
684+ *\*unicode* is modified to point to the new (resized) object and ``0`` is
685+ returned on success. Otherwise, ``-1`` is returned and an exception is set,
686+ and *\*unicode* is left untouched.
687+
688+ The function doesn't check string content, the result may not be a
689+ string in canonical representation.
690+
691+
677692.. c:function:: Py_ssize_t PyUnicode_Fill(PyObject *unicode, Py_ssize_t start, \
678693 Py_ssize_t length, Py_UCS4 fill_char)
679694
Original file line number Diff line number Diff line change @@ -2794,6 +2794,10 @@ PyUnicode_CopyCharacters:PyObject*:from:0:
27942794PyUnicode_CopyCharacters:Py_ssize_t:from_start::
27952795PyUnicode_CopyCharacters:Py_ssize_t:how_many::
27962796
2797+ PyUnicode_Resize:int:::
2798+ PyUnicode_Resize:PyObject**:unicode:0:
2799+ PyUnicode_Resize:Py_ssize_t:length::
2800+
27972801PyUnicode_Fill:Py_ssize_t:::
27982802PyUnicode_Fill:PyObject*:unicode:0:
27992803PyUnicode_Fill:Py_ssize_t:start::
You can’t perform that action at this time.
0 commit comments