paleolimbot commented on code in PR #430:
URL: https://github.com/apache/arrow-nanoarrow/pull/430#discussion_r1567251754


##########
python/src/nanoarrow/_lib.pyx:
##########
@@ -2009,22 +2011,12 @@ cdef class CBufferBuilder:
         if self._buffer._data_type in (NANOARROW_TYPE_INTERVAL_DAY_TIME,
                                        NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO):
             for item in obj:
-                code = ArrowBufferReserve(self._buffer._ptr, bytes_per_element)
-                if code != NANOARROW_OK:
-                    Error.raise_error("ArrowBufferReserve()", code)
-
-                pack_into(self, self._buffer._ptr.size_bytes, *item)
-                self._buffer._ptr.size_bytes += bytes_per_element
+                write(pack(*item))
                 n_values += 1

Review Comment:
   It wasn't a reason for the original failure but was exposed once that was 
fixed. Exactly what type of object is considered a buffer is different for 
(maybe just some versions of) PyPy, so `Struct.packinto()` threw an error. If 
we have time we can roll that back in (or figure out if there's some minimum 
version of PyPy we have to drop to make it work), but at least this gets us 
back to wheels that build!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to