mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue #3080: Add PyModule_GetNameObject()
repr(module) uses %R to format module name and filenames, instead of '%s' and '%U', so surrogates from undecodable bytes in a filename (PEP 383) are escaped.
This commit is contained in:
parent
501c09a754
commit
bd475115c4
3 changed files with 45 additions and 21 deletions
|
@ -16,6 +16,7 @@ PyAPI_FUNC(PyObject *) PyModule_New(
|
|||
const char *name /* UTF-8 encoded string */
|
||||
);
|
||||
PyAPI_FUNC(PyObject *) PyModule_GetDict(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyModule_GetNameObject(PyObject *);
|
||||
PyAPI_FUNC(const char *) PyModule_GetName(PyObject *);
|
||||
PyAPI_FUNC(const char *) PyModule_GetFilename(PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyModule_GetFilenameObject(PyObject *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue