summaryrefslogtreecommitdiffstats
path: root/Python/_warnings.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r--Python/_warnings.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index dd168f9..37875e5 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -684,8 +684,9 @@ warnings_warn_explicit(PyObject *self, PyObject *args, PyObject *kwds)
}
/* Split the source into lines. */
- source_list = PyObject_CallMethodObjArgs(source, splitlines_name,
- NULL);
+ source_list = PyObject_CallMethodObjArgs((PyObject *)&PyString_Type,
+ splitlines_name, source,
+ NULL);
Py_DECREF(source);
if (!source_list)
return NULL;