8000 Fix issue lava/matplotlib-cpp#124 · lava/matplotlib-cpp@f4b49a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit f4b49a3

Browse files
committed
Fix issue #124
1 parent 7d0e695 commit f4b49a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

matplotlibcpp.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ struct _interpreter {
153153
Py_SetProgramName(name);
154154
Py_Initialize();
155155

156+
wchar_t const *dummy_args[] = {L"Python", NULL}; // const is needed because literals must not be modified
157+
wchar_t const **argv = dummy_args;
158+
int argc = sizeof(dummy_args)/sizeof(dummy_args[0])-1;
159+
PySys_SetArgv(argc, const_cast<wchar_t **>(argv));
160+
156161
#ifndef WITHOUT_NUMPY
157162
import_numpy(); // initialize numpy C-API
158163
#endif

0 commit comments

Comments
 (0)
0