summaryrefslogtreecommitdiff
path: root/Objects
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-12-10 18:14:16 +0000
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-12-10 18:14:16 +0000
commit7cc7575a9cd172f3704e53b59d3b3bc9ec5a09f7 (patch)
tree063cb97c796ae84b2997db9be4ccea5a66048f5a /Objects
parent69b826e75b31f3b0ed4377f2c39c8202b2e89d40 (diff)
downloadcpython-7cc7575a9cd172f3704e53b59d3b3bc9ec5a09f7.tar.gz
Reverted accidental commit (from r87159)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/moduleobject.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index 8b22b7dc95..2c095a0968 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -168,8 +168,8 @@ PyModule_GetDict(PyObject *m)
return d;
}
-PyObject *
-PyModule_GetNameObject(PyObject *m)
+const char *
+PyModule_GetName(PyObject *m)
{
PyObject *d;
PyObject *nameobj;
@@ -185,21 +185,7 @@ PyModule_GetNameObject(PyObject *m)
PyErr_SetString(PyExc_SystemError, "nameless module");
return NULL;
}
- Py_INCREF(nameobj);
- return nameobj;
-}
-
-const char *
-PyModule_GetName(PyObject *m)
-{
- PyObject *nameobj;
- char *utf8;
- nameobj = PyModule_GetNameObject(m);
- if (nameobj == NULL)
- return NULL;
- utf8 = _PyUnicode_AsString(nameobj);
- Py_DECREF(nameobj);
- return utf8;
+ return _PyUnicode_AsString(nameobj);
}
PyObject*