Compare commits

...

1 Commits

Author SHA1 Message Date
Kai Huuhko 73938af391 Elm: Fix module init from embedded interpreter
sys.argv doesn't exist there
2015-05-09 20:19:35 +03:00
1 changed files with 12 additions and 12 deletions

View File

@ -366,11 +366,11 @@ def init():
# FIXME: Why are we passing the cl args to elm_init here?
cdef:
int argc, i, arg_len
char **argv
int argc = 0, i, arg_len
char **argv = NULL
char *arg
int ret
if hasattr(sys, "argv"):
argc = len(sys.argv)
argv = <char **>PyMem_Malloc(argc * sizeof(char *))
for i in range(argc):