diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-02-23 00:21:43 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-02-23 00:21:43 +0000 |
commit | 2b6d279d49205a3229df7ce025ce6c88ee8c112a (patch) | |
tree | d7c13f9dacc8fa4fac691d127f2565c98e6ed15b /Include | |
parent | 90268ce7e125f2d8a1d9b8f41b51d31f96b1c8fd (diff) | |
download | cpython-2b6d279d49205a3229df7ce025ce6c88ee8c112a.tar.gz |
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.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/moduleobject.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/moduleobject.h b/Include/moduleobject.h index 7b2bf1c144..79ca7ec74a 100644 --- a/Include/moduleobject.h +++ b/Include/moduleobject.h @@ -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 *); |