summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2023-10-26 06:17:28 (GMT)
committerGitHub <noreply@github.com>2023-10-26 06:17:28 (GMT)
commit90a1b2859f99a4b07da6c46b99759444e3cefbfa (patch)
treee7ef4674c8e573906cfab0f3a3f096ac3fe4862d /Modules
parent3f84a19e6291db682fc9a570e7612e80e2ffbbb5 (diff)
downloadcpython-90a1b2859f99a4b07da6c46b99759444e3cefbfa.zip
cpython-90a1b2859f99a4b07da6c46b99759444e3cefbfa.tar.gz
cpython-90a1b2859f99a4b07da6c46b99759444e3cefbfa.tar.bz2
gh-67224: Show source lines in tracebacks when using the -c option when running Python (#111200)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/main.c b/Modules/main.c
index b5ee34d..df2ce55 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -249,7 +249,7 @@ pymain_run_command(wchar_t *command)
PyCompilerFlags cf = _PyCompilerFlags_INIT;
cf.cf_flags |= PyCF_IGNORE_COOKIE;
- ret = PyRun_SimpleStringFlags(PyBytes_AsString(bytes), &cf);
+ ret = _PyRun_SimpleStringFlagsWithName(PyBytes_AsString(bytes), "<string>", &cf);
Py_DECREF(bytes);
return (ret != 0);