mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
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".
This commit is contained in:
parent
3901c08114
commit
713bb19356
7 changed files with 40 additions and 48 deletions
|
@ -29,7 +29,7 @@
|
|||
#define MAX_NTHREADS 100
|
||||
|
||||
/* Function from Parser/tokenizer.c */
|
||||
extern char * PyTokenizer_FindEncodingFilename(int, PyObject *);
|
||||
extern char* _PyTokenizer_FindEncodingFilename(int, PyObject *);
|
||||
|
||||
_Py_IDENTIFIER(TextIOWrapper);
|
||||
_Py_IDENTIFIER(close);
|
||||
|
@ -431,7 +431,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent, i
|
|||
Py_DECREF(binary);
|
||||
return 0;
|
||||
}
|
||||
found_encoding = PyTokenizer_FindEncodingFilename(fd, filename);
|
||||
found_encoding = _PyTokenizer_FindEncodingFilename(fd, filename);
|
||||
if (found_encoding == NULL)
|
||||
PyErr_Clear();
|
||||
encoding = (found_encoding != NULL) ? found_encoding : "utf-8";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue