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


##########
python/src/nanoarrow/_lib.pyx:
##########
@@ -84,3 +85,329 @@ def as_numpy_array(arr):
     # TODO set base
 
     return result
+
+
+def version():
+    return ArrowNanoarrowVersion().decode("UTF-8")
+
+cdef class CSchemaHolder:
+    cdef ArrowSchema c_schema
+
+    def __init__(self):
+        self.c_schema.release = NULL
+
+    def __del__(self):
+        if self.c_schema.release != NULL:
+          self.c_schema.release(&self.c_schema)
+
+    def _addr(self):
+        return <uintptr_t>&self.c_schema
+
+cdef class CArrayHolder:
+    cdef ArrowArray c_array
+
+    def __init__(self):
+        self.c_array.release = NULL
+
+    def __del__(self):
+        if self.c_array.release != NULL:
+          self.c_array.release(&self.c_array)
+
+    def _addr(self):
+        return <uintptr_t>&self.c_array
+
+cdef class CArrayViewHolder:
+    cdef ArrowArrayView c_array_view
+
+    def __init__(self):
+        ArrowArrayViewInitFromType(&self.c_array_view, 
NANOARROW_TYPE_UNINITIALIZED)
+
+    def __del__(self):
+        ArrowArrayViewReset(&self.c_array_view)
+
+    def _addr(self):
+        return <uintptr_t>&self.c_array_view
+
+cdef class CSchema:

Review Comment:
   You're totally right..it's all just `Schema`, `Array`, etc. now. There 
probably should never be anything higher level in nanoarrrow anyway!



-- 
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