Skip to content

Commit 3ff967d

Browse files
committed
Fix 'unused variable' warning on Py2
1 parent 32c1445 commit 3ff967d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pybind11/embed.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ inline void set_interpreter_argv(int argc, char** argv, bool add_current_dir_to_
102102
safe_argv[0][0] = '\0';
103103
argc = 1;
104104
}
105-
size_t argv_size = static_cast<size_t>(argc);
106105
#if PY_MAJOR_VERSION >= 3
106+
size_t argv_size = static_cast<size_t>(argc);
107107
// SetArgv* on python 3 takes wchar_t, so we have to convert.
108108
std::unique_ptr<wchar_t*[]> widened_argv(new wchar_t*[argv_size]);
109109
# if PY_MINOR_VERSION >= 5

0 commit comments

Comments
 (0)