diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-02-23 00:21:43 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-02-23 00:21:43 (GMT) |
commit | bd475115c4fb0dda55f3d1f4443bff58abd1203f (patch) | |
tree | 5d8ebf7b06289fe9bbe5e8381185bd308d20bb2a /Include | |
parent | 501c09a754bc329ed9b3d0c1be0c51ccd6687c6c (diff) | |
download | cpython-bd475115c4fb0dda55f3d1f4443bff58abd1203f.zip cpython-bd475115c4fb0dda55f3d1f4443bff58abd1203f.tar.gz cpython-bd475115c4fb0dda55f3d1f4443bff58abd1203f.tar.bz2 |
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 7b2bf1c..79ca7ec 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 *); |