diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/stringobject.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Include/stringobject.h b/Include/stringobject.h index 7afd347..3bba7bc 100644 --- a/Include/stringobject.h +++ b/Include/stringobject.h @@ -103,6 +103,21 @@ extern DL_IMPORT(PyObject*) PyString_AsEncodedString( const char *errors /* error handling */ ); +/* Provides access to the internal data buffer and size of a string + object or the default encoded version of an Unicode object. Passing + NULL as *len parameter will force the string buffer to be + 0-terminated (passing a string with embedded NULL characters will + cause an exception). */ + +extern DL_IMPORT(int) PyString_AsStringAndSize( + register PyObject *obj, /* string or Unicode object */ + register char **s, /* pointer to buffer variable */ + register int *len /* pointer to length variable or NULL + (only possible for 0-terminated + strings) */ + ); + + #ifdef __cplusplus } #endif |