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

Skip to content
< 8000 header class="HeaderMktg header-logged-out js-details-container js-header Details f4 py-3" role="banner" data-is-top="true" data-color-mode=light data-light-theme=light data-dark-theme=dark>

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f4b49a3

Browse files
committed
Fix issue lava#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