diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-05 23:45:57 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-05 23:45:57 (GMT) |
commit | fb9ea8c57eeab6837c830613524c1250488baed1 (patch) | |
tree | 3b4d82d2834361895ae406ffa00bcf6dd1265e85 /Include | |
parent | 05d1189566c4caa3b2c9b474159a04d0d61364c3 (diff) | |
download | cpython-fb9ea8c57eeab6837c830613524c1250488baed1.zip cpython-fb9ea8c57eeab6837c830613524c1250488baed1.tar.gz cpython-fb9ea8c57eeab6837c830613524c1250488baed1.tar.bz2 |
Don't check for the maximum character when copying from unicodeobject.c
* Create copy_characters() function which doesn't check for the maximum
character in release mode
* _PyUnicode_CheckConsistency() is no more static to be able to use it
in _PyUnicode_FormatAdvanced() (in formatter_unicode.c)
* _PyUnicode_CheckConsistency() checks the string hash
Diffstat (limited to 'Include')
-rw-r--r-- | Include/unicodeobject.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 6fdcd7b..dac9c32 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -2030,6 +2030,13 @@ PyAPI_FUNC(Py_UNICODE*) PyUnicode_AsUnicodeCopy( ); #endif /* Py_LIMITED_API */ +#if defined(Py_DEBUG) && !defined(Py_LIMITED_API) +/* FIXME: use PyObject* type for op */ +PyAPI_FUNC(int) _PyUnicode_CheckConsistency( + void *op, + int check_content); +#endif + #ifdef __cplusplus } #endif |