summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/_warnings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 956b3f5..c84bd85 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -498,7 +498,7 @@ setup_context(Py_ssize_t stack_level, PyObject **filename, int *lineno,
}
else if (!is_true) {
Py_DECREF(*filename);
- *filename = PyString_FromString("__main__");
+ *filename = PyUnicode_FromString("__main__");
if (*filename == NULL)
goto handle_error;
}