[Python-Dev] cpython: Add a new PyUnicode_Fill() function (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Wed Jan 4 02:34:03 CET 2012
- Previous message: [Python-Dev] Proposed PEP on concurrent programming support
- Next message: [Python-Dev] cpython: Add a new PyUnicode_Fill() function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
_+.. c:function:: int PyUnicodeFill(PyObject *unicode, Pyssizet start, _ + Pyssizet length, PyUCS4 fillchar) + + Fill a string with a character: write fillchar into +
unicode[start:start+length]
. + + Fail if fillchar is bigger than the string maximum character, or if the + string has more than 1 reference. + + Return the number of written character, or return-1
and raise an + exception on error.
The return type should then be Py_ssize_t, not int.
Regards
Antoine.
- Previous message: [Python-Dev] Proposed PEP on concurrent programming support
- Next message: [Python-Dev] cpython: Add a new PyUnicode_Fill() function
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]