Skip to content

Commit 965110f

Browse files
committed
Apply suggestions from code review
1 parent 015be88 commit 965110f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

docs/advanced/classes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,7 @@ You can do that using ``py::custom_type_setup``:
13851385
type->tp_flags |= Py_TPFLAGS_HAVE_GC;
13861386
type->tp_traverse = [](PyObject *self_base, visitproc visit, void *arg) {
13871387
// https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_traverse
1388-
#if PY_VERSION_HEX >= 0x03090000 // Python 3.9
1388+
#if PY_VERSION_HEX >= 0x03090000
13891389
Py_VISIT(Py_TYPE(self_base));
13901390
#endif
13911391
if (py::detail::is_holder_constructed(self_base)) {

tests/test_custom_type_setup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ TEST_SUBMODULE(custom_type_setup, m) {
2727
type->tp_flags |= Py_TPFLAGS_HAVE_GC;
2828
type->tp_traverse = [](PyObject *self_base, visitproc visit, void *arg) {
2929
// https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_traverse
30-
#if PY_VERSION_HEX >= 0x03090000 // Python 3.9
30+
#if PY_VERSION_HEX >= 0x03090000
3131
Py_VISIT(Py_TYPE(self_base));
3232
#endif
3333
if (py::detail::is_holder_constructed(self_base)) {

0 commit comments

Comments
 (0)