mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Close #11619: The parser and the import machinery do not encode Unicode
filenames anymore on Windows.
This commit is contained in:
parent
33824f6fd7
commit
14e461d5b9
22 changed files with 514 additions and 175 deletions
|
@ -66,6 +66,12 @@ PyAPI_FUNC(struct _mod *) PyParser_ASTFromString(
|
|||
int start,
|
||||
PyCompilerFlags *flags,
|
||||
PyArena *arena);
|
||||
PyAPI_FUNC(struct _mod *) PyParser_ASTFromStringObject(
|
||||
const char *s,
|
||||
PyObject *filename,
|
||||
int start,
|
||||
PyCompilerFlags *flags,
|
||||
PyArena *arena);
|
||||
PyAPI_FUNC(struct _mod *) PyParser_ASTFromFile(
|
||||
FILE *fp,
|
||||
const char *filename, /* decoded from the filesystem encoding */
|
||||
|
@ -76,6 +82,16 @@ PyAPI_FUNC(struct _mod *) PyParser_ASTFromFile(
|
|||
PyCompilerFlags *flags,
|
||||
int *errcode,
|
||||
PyArena *arena);
|
||||
PyAPI_FUNC(struct _mod *) PyParser_ASTFromFileObject(
|
||||
FILE *fp,
|
||||
PyObject *filename,
|
||||
const char* enc,
|
||||
int start,
|
||||
char *ps1,
|
||||
char *ps2,
|
||||
PyCompilerFlags *flags,
|
||||
int *errcode,
|
||||
PyArena *arena);
|
||||
#endif
|
||||
|
||||
#ifndef PyParser_SimpleParseString
|
||||
|
@ -117,11 +133,20 @@ PyAPI_FUNC(PyObject *) Py_CompileStringExFlags(
|
|||
int start,
|
||||
PyCompilerFlags *flags,
|
||||
int optimize);
|
||||
PyAPI_FUNC(PyObject *) Py_CompileStringObject(
|
||||
const char *str,
|
||||
PyObject *filename, int start,
|
||||
PyCompilerFlags *flags,
|
||||
int optimize);
|
||||
#endif
|
||||
PyAPI_FUNC(struct symtable *) Py_SymtableString(
|
||||
const char *str,
|
||||
const char *filename, /* decoded from the filesystem encoding */
|
||||
int start);
|
||||
PyAPI_FUNC(struct symtable *) Py_SymtableStringObject(
|
||||
const char *str,
|
||||
PyObject *filename,
|
||||
int start);
|
||||
|
||||
PyAPI_FUNC(void) PyErr_Print(void);
|
||||
PyAPI_FUNC(void) PyErr_PrintEx(int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue