Commit b281870c authored by Georg Brandl's avatar Georg Brandl

#6439: fix argument type for PySys_SetArgvEx() and Py_SetProgramName() in Demo/embed code.

parent dbd4dc34
...@@ -22,7 +22,7 @@ CPPFLAGS= $(INCLUDES) ...@@ -22,7 +22,7 @@ CPPFLAGS= $(INCLUDES)
LIBPYTHON= $(blddir)/libpython$(VERSION).a LIBPYTHON= $(blddir)/libpython$(VERSION).a
# XXX edit LIBS (in particular) to match $(blddir)/Makefile # XXX edit LIBS (in particular) to match $(blddir)/Makefile
LIBS= -lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil LIBS= -lnsl -ldl -lreadline -lieee -lpthread -lutil
LDFLAGS= -Xlinker -export-dynamic LDFLAGS= -Xlinker -export-dynamic
SYSLIBS= -lm SYSLIBS= -lm
MODLIBS= MODLIBS=
......
...@@ -32,7 +32,7 @@ main(int argc, char **argv) ...@@ -32,7 +32,7 @@ main(int argc, char **argv)
directory (say, a file named os.py) that your application would directory (say, a file named os.py) that your application would
then import and run. then import and run.
*/ */
PySys_SetArgvEx(argc, argv, 0); PySys_SetArgvEx(2, args, 0);
/* Do some application specific code */ /* Do some application specific code */
printf("Hello, brave new world\n\n"); printf("Hello, brave new world\n\n");
......
...@@ -19,7 +19,7 @@ main(int argc, char **argv) ...@@ -19,7 +19,7 @@ main(int argc, char **argv)
count = atoi(argv[2]); count = atoi(argv[2]);
} }
Py_SetProgramName(argv[0]); Py_SetProgramName(L"loop");
/* uncomment this if you don't want to load site.py */ /* uncomment this if you don't want to load site.py */
/* Py_NoSiteFlag = 1; */ /* Py_NoSiteFlag = 1; */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment