summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-02-23 00:21:43 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-02-23 00:21:43 (GMT)
commitbd475115c4fb0dda55f3d1f4443bff58abd1203f (patch)
tree5d8ebf7b06289fe9bbe5e8381185bd308d20bb2a /Include
parent501c09a754bc329ed9b3d0c1be0c51ccd6687c6c (diff)
downloadcpython-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.h1
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 *);