mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
command line parameters: use Py_DecodeLocale() and PyUnicode_DecodeFSDefault().
This commit is contained in:
parent
f6a271ae98
commit
25e014bd91
4 changed files with 40 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue