Skip to content

Commit b2bed68

Browse files
committed
minor fixes for v3.13
1 parent e3812ea commit b2bed68

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/nb_type.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1151,9 +1151,8 @@ PyObject *nb_type_new(const type_init_data *t) noexcept {
11511151
}
11521152
spec.basicsize = (int) basicsize;
11531153

1154-
if (!has_getset) {
1154+
if (!has_getset)
11551155
*s++ = { Py_tp_getset, (void *) inst_getset };
1156-
}
11571156
}
11581157

11591158
if (is_weak_referenceable) {

tests/test_functions.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ NB_MODULE(test_functions_ext, m) {
3636
m.def("test_05", [](int) -> int { return 1; }, "doc_1");
3737
nb::object first_overload = m.attr("test_05");
3838
m.def("test_05", [](float) -> int { return 2; }, "doc_2");
39-
#if !defined(PYPY_VERSION)
39+
#if !defined(PYPY_VERSION) && !defined(Py_GIL_DISABLED)
4040
// Make sure we don't leak the previous member of the overload chain
4141
// (pypy's refcounts are bogus and will not help us with this check)
4242
if (first_overload.ptr()->ob_refcnt != 1) {

tests/test_stl.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ int funcwrapper_tp_traverse(PyObject *self, visitproc visit, void *arg) {
7171
Py_VISIT(f.ptr());
7272

7373
return 0;
74-
};
75-
74+
}
7675

7776
int FuncWrapper::alive = 0;
7877

0 commit comments

Comments
 (0)