Skip to content

Commit

Permalink
Fix 'unused variable' warning on Py2.
Browse files Browse the repository at this point in the history
  • Loading branch information
drmoose committed Jul 30, 2020
1 parent 32c1445 commit 0379418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/pybind11/embed.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ inline void set_interpreter_argv(int argc, char** argv, bool add_current_dir_to_
safe_argv[0][0] = '\0';
argc = 1;
}
size_t argv_size = static_cast<size_t>(argc);
#if PY_MAJOR_VERSION >= 3
size_t argv_size = static_cast<size_t>(argc);
// SetArgv* on python 3 takes wchar_t, so we have to convert.
std::unique_ptr<wchar_t*[]> widened_argv(new wchar_t*[argv_size]);
# if PY_MINOR_VERSION >= 5
Expand Down

0 comments on commit 0379418

Please sign in to comment.