summaryrefslogtreecommitdiff
path: root/src/chill.cc
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2016-10-08 23:32:06 -0600
committerTuowen Zhao <ztuowen@gmail.com>2016-11-12 15:45:56 -0700
commit6766de6c893d5300bac773bbd654c5af06c2ab66 (patch)
tree29100618599099795586b79faba08d3a85e7e112 /src/chill.cc
parentffe133a194e36ecbe060f08d132339b437975ea6 (diff)
downloadchill-6766de6c893d5300bac773bbd654c5af06c2ab66.tar.gz
chill-6766de6c893d5300bac773bbd654c5af06c2ab66.tar.bz2
chill-6766de6c893d5300bac773bbd654c5af06c2ab66.zip
switch to pythonlibs 3
Diffstat (limited to 'src/chill.cc')
-rw-r--r--src/chill.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/chill.cc b/src/chill.cc
index 9901fab..45d53f1 100644
--- a/src/chill.cc
+++ b/src/chill.cc
@@ -35,14 +35,15 @@ int main(int argc, char *argv[]) {
// Create PYTHON interpreter
/* Pass argv[0] to the Python interpreter */
- Py_SetProgramName(argv[0]);
-
- /* Initialize the Python interpreter. Required. */
- Py_Initialize();
+ wchar_t *program = Py_DecodeLocale(argv[0], NULL);
+ Py_SetProgramName(program);
/* Add a static module */
initchill();
+ /* Initialize the Python interpreter. Required. */
+ Py_Initialize();
+
if (argc == 2) {
FILE *f = fopen(argv[1], "r");
if (!f) {