diff options
author | Victor Stinner <vstinner@python.org> | 2021-10-13 15:22:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-13 15:22:14 (GMT) |
commit | 713bb19356bce9b8f2b95461834fe1dae505f889 (patch) | |
tree | c06a7178132f94dd09b3a3df660f5093adf63517 /Parser/string_parser.c | |
parent | 3901c081143ef29624f9c1cb49cc70a70321d139 (diff) | |
download | cpython-713bb19356bce9b8f2b95461834fe1dae505f889.zip cpython-713bb19356bce9b8f2b95461834fe1dae505f889.tar.gz cpython-713bb19356bce9b8f2b95461834fe1dae505f889.tar.bz2 |
bpo-45434: Mark the PyTokenizer C API as private (GH-28924)
Rename PyTokenize functions to mark them as private:
* PyTokenizer_FindEncodingFilename() => _PyTokenizer_FindEncodingFilename()
* PyTokenizer_FromString() => _PyTokenizer_FromString()
* PyTokenizer_FromFile() => _PyTokenizer_FromFile()
* PyTokenizer_FromUTF8() => _PyTokenizer_FromUTF8()
* PyTokenizer_Free() => _PyTokenizer_Free()
* PyTokenizer_Get() => _PyTokenizer_Get()
Remove the unused PyTokenizer_FindEncoding() function.
import.c: remove unused #include "errcode.h".
Diffstat (limited to 'Parser/string_parser.c')
-rw-r--r-- | Parser/string_parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/string_parser.c b/Parser/string_parser.c index 2880d07..cffe24e 100644 --- a/Parser/string_parser.c +++ b/Parser/string_parser.c @@ -386,7 +386,7 @@ fstring_compile_expr(Parser *p, const char *expr_start, const char *expr_end, str[0] = '('; str[len+1] = ')'; - struct tok_state* tok = PyTokenizer_FromString(str, 1); + struct tok_state* tok = _PyTokenizer_FromString(str, 1); if (tok == NULL) { PyMem_Free(str); return NULL; @@ -409,7 +409,7 @@ fstring_compile_expr(Parser *p, const char *expr_start, const char *expr_end, exit: PyMem_Free(str); _PyPegen_Parser_Free(p2); - PyTokenizer_Free(tok); + _PyTokenizer_Free(tok); return result; } |