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:
@@ -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 *);
|
||||
|
||||
Reference in New Issue
Block a user