Skip to content

Commit

Permalink
fix: try to avoid an unused var warning
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed May 31, 2024
1 parent 78b27c2 commit efc03e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/pybind11/pybind11.h
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ class module_ : public object {
static module_ _create_extension_module(const char *name,
const char *doc,
module_def *def,
PYBIND11_MAYBE_UNUSED bool gil_disabled) {
bool gil_disabled) {

// module_def is PyModuleDef
// Placement new (not an allocation).
Expand All @@ -1342,11 +1342,11 @@ class module_ : public object {
}
pybind11_fail("Internal error in module_::create_extension_module()");
}
#ifdef Py_GIL_DISABLED
if (gil_disabled) {
#ifdef Py_GIL_DISABLED
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
}
#endif
}
// TODO: Should be reinterpret_steal for Python 3, but Python also steals it again when
// returned from PyInit_...
// For Python 2, reinterpret_borrow was correct.
Expand Down

0 comments on commit efc03e5

Please sign in to comment.