summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index d140fe3..ffaa596 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -225,14 +225,9 @@ static PyObject *
sys_intern(PyObject *self, PyObject *args)
{
PyObject *s;
- if (!PyArg_ParseTuple(args, "S:intern", &s))
+ if (!PyArg_ParseTuple(args, "U:intern", &s))
return NULL;
- if (PyString_CheckExact(s)) {
- Py_INCREF(s);
- PyString_InternInPlace(&s);
- return s;
- }
- else if (PyUnicode_CheckExact(s)) {
+ if (PyUnicode_CheckExact(s)) {
Py_INCREF(s);
PyUnicode_InternInPlace(&s);
return s;