mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
Change [_Py_]re_compile_pattern() to return a char*.
Since it only returns an error message (or NULL) there's no reason for it to be unsigned char *, and various compilers like this better.
This commit is contained in:
parent
5ade084902
commit
d19c04a88e
3 changed files with 12 additions and 12 deletions
|
@ -439,7 +439,7 @@ newregexobject(pattern, translate, givenpat, groupindex)
|
|||
re->re_realpat = pattern;
|
||||
Py_INCREF(givenpat);
|
||||
re->re_givenpat = givenpat;
|
||||
error = (char *)re_compile_pattern((unsigned char *)pat, size, &re->re_patbuf);
|
||||
error = _Py_re_compile_pattern((unsigned char *)pat, size, &re->re_patbuf);
|
||||
if (error != NULL) {
|
||||
PyErr_SetString(RegexError, error);
|
||||
goto finally;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue