Skip to content

Commit 7d37eb9

Browse files
committed
Merge branch 'master' into sh_merge_master
2 parents 664876e + c316cf3 commit 7d37eb9

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

include/pybind11/detail/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ struct instance {
605605
bool simple_instance_registered : 1;
606606
/// If true, get_internals().patients has an entry for this object
607607
bool has_patients : 1;
608-
// Cannot use PYBIND11_INTERNALS_VERSION >= 6 here without refactoring.
608+
// Cannot use PYBIND11_INTERNALS_VERSION >= 106 here without refactoring.
609609
#if PYBIND11_VERSION_MAJOR >= 3
610610
/// If true, this Python object needs to be kept alive for the lifetime of the C++ value.
611611
bool is_alias : 1;

include/pybind11/detail/internals.h

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,17 @@
3838
/// changed to the new version.
3939
#ifndef PYBIND11_INTERNALS_VERSION
4040
# if PYBIND11_VERSION_MAJOR >= 3
41-
# define PYBIND11_INTERNALS_VERSION 6
42-
# elif PY_VERSION_HEX >= 0x030C0000 || defined(_MSC_VER)
43-
// Version bump for Python 3.12+, before first 3.12 beta release.
44-
// Version bump for MSVC piggy-backed on PR #4779. See comments there.
45-
# ifdef Py_GIL_DISABLED
46-
# define PYBIND11_INTERNALS_VERSION 6
47-
# else
48-
# define PYBIND11_INTERNALS_VERSION 5
49-
# endif
41+
# define PYBIND11_INTERNALS_VERSION 106
5042
# else
51-
# define PYBIND11_INTERNALS_VERSION 4
43+
# define PYBIND11_INTERNALS_VERSION 6
5244
# endif
5345
#endif
5446

5547
// This requirement is mainly to reduce the support burden (see PR #4570).
5648
static_assert(PY_VERSION_HEX < 0x030C0000 || PYBIND11_INTERNALS_VERSION >= 5,
5749
"pybind11 ABI version 5 is the minimum for Python 3.12+");
50+
static_assert(PYBIND11_INTERNALS_VERSION >= 4,
51+
"pybind11 ABI version 4 is the minimum for all platforms.");
5852

5953
PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
6054

@@ -244,7 +238,7 @@ struct internals {
244238
}
245239
};
246240

247-
#if PYBIND11_INTERNALS_VERSION >= 6
241+
#if PYBIND11_INTERNALS_VERSION >= 106
248242

249243
# define PYBIND11_HAS_INTERNALS_WITH_SMART_HOLDER_SUPPORT
250244

include/pybind11/eigen/matrix.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,11 @@ struct type_caster<Type, enable_if_t<is_eigen_dense_plain<Type>::value>> {
316316
return false;
317317
}
318318

319+
PYBIND11_WARNING_PUSH
320+
PYBIND11_WARNING_DISABLE_GCC("-Wmaybe-uninitialized") // See PR #5516
319321
// Allocate the new type, then build a numpy reference into it
320322
value = Type(fits.rows, fits.cols);
323+
PYBIND11_WARNING_POP
321324
auto ref = reinterpret_steal<array>(eigen_ref_array<props>(value));
322325
if (dims == 1) {
323326
ref = ref.squeeze();

0 commit comments

Comments
 (0)