Skip to content

Commit 8fd9e9a

Browse files
committed
Fixups for autopatch errors
1 parent 7599447 commit 8fd9e9a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

graalpython/lib-graalpython/patches/nanobind/nanobind.patch

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,27 @@ index c49b7bb..3a5be09 100644
941941
# if PY_VERSION_HEX < 0x030A0000
942942
# define NB_TYPE_GET_SLOT_IMPL 1 // Custom implementation of nb::type_get_slot
943943
# else
944+
diff --git a/nanobind/include/nanobind/nb_types.h b/nanobind/include/nanobind/nb_types.h
945+
index 2761a58..b83a651 100644
946+
--- a/nanobind/include/nanobind/nb_types.h
947+
+++ b/nanobind/include/nanobind/nb_types.h
948+
@@ -873,14 +873,14 @@ inline detail::dict_iterator dict::end() const { return { }; }
949+
950+
#if !defined(Py_LIMITED_API) && !defined(PYPY_VERSION)
951+
inline detail::fast_iterator tuple::begin() const {
952+
- PySequence_Fast_ITEMS((PyObject*)return ((PyTupleObject *) m_ptr));
953+
+ return PySequence_Fast_ITEMS((PyObject*)((PyTupleObject *) m_ptr));
954+
}
955+
inline detail::fast_iterator tuple::end() const {
956+
PyTupleObject *v = (PyTupleObject *) m_ptr;
957+
return PySequence_Fast_ITEMS((PyObject*)v) + v->ob_base.ob_size;
958+
}
959+
inline detail::fast_iterator list::begin() const {
960+
- PySequence_Fast_ITEMS((PyObject*)return ((PyListObject *) m_ptr));
961+
+ return PySequence_Fast_ITEMS((PyObject*)((PyListObject *) m_ptr));
962+
}
963+
inline detail::fast_iterator list::end() const {
964+
PyListObject *v = (PyListObject *) m_ptr;
944965
diff --git a/nanobind/include/nanobind/stl/detail/chrono.h b/nanobind/include/nanobind/stl/detail/chrono.h
945966
index 39bd5d9..6e9efb0 100644
946967
--- a/nanobind/include/nanobind/stl/detail/chrono.h

0 commit comments

Comments
 (0)