Ji-Xinyou commented on code in PR #1861:
URL: 
https://github.com/apache/incubator-opendal/pull/1861#discussion_r1159344463


##########
bindings/c/include/opendal.h:
##########
@@ -25,15 +25,69 @@
 #include <stddef.h>
 #include <stdbool.h>
 
+/*
+ The [`OperatorPtr`] owns a pointer to a [`BlockingOperator`].
+ It is also the key struct that OpenDAL's APIs access the real
+ operator's memory. The use of OperatorPtr is zero cost, it
+ only returns a reference of the underlying Operator.
+ */
+typedef struct opendal_operator_ptr {
+  const void *ptr;
+} opendal_operator_ptr;
+
+/*
+ The [`Vector`] type is a C-compatable substitute for [`Vec`]
+ in Rust, it will not be deallocated automatically like what
+ has been done in Rust. Instead, you have to call [`free_vec`]
+ to free the heap memory to avoid memory leak.
+ The field `data` should not be modified since it might causes
+ the reallocation of the Vector.
+ */
+typedef struct opendal_vector {

Review Comment:
   I choose the `opendal_bytes`, since the `opendal_buf` has a relatively vague 
semantic.



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