Elm: Fix module init from embedded interpreter
sys.argv doesn't exist there
This commit is contained in:
parent
1011cb76df
commit
73938af391
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue