mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
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
This commit is contained in:
parent
05d1189566
commit
fb9ea8c57e
3 changed files with 198 additions and 193 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue