summaryrefslogtreecommitdiffstats
path: root/Doc/includes
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-08-01 10:28:49 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-08-01 10:28:49 (GMT)
commit25e014bd91e2f64b3231ef2bf5ddac8bb99ed637 (patch)
tree117d491c5ed3f749eadee5a6e457371acac81318 /Doc/includes
parentf6a271ae980d2f3fb450f745b8f87624378156c4 (diff)
downloadcpython-25e014bd91e2f64b3231ef2bf5ddac8bb99ed637.zip
cpython-25e014bd91e2f64b3231ef2bf5ddac8bb99ed637.tar.gz
cpython-25e014bd91e2f64b3231ef2bf5ddac8bb99ed637.tar.bz2
Issue #18395, #22108: Update embedded Python examples to decode correctly
command line parameters: use Py_DecodeLocale() and PyUnicode_DecodeFSDefault().
Diffstat (limited to 'Doc/includes')
-rw-r--r--Doc/includes/run-func.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/includes/run-func.c b/Doc/includes/run-func.c
index 1c9860d..986d670 100644
--- a/Doc/includes/run-func.c
+++ b/Doc/includes/run-func.c
@@ -13,7 +13,7 @@ main(int argc, char *argv[])
}
Py_Initialize();
- pName = PyUnicode_FromString(argv[1]);
+ pName = PyUnicode_DecodeFSDefault(argv[1]);
/* Error checking of pName left out */
pModule = PyImport_Import(pName);