FrankYang0529 commented on code in PR #7649:
URL: https://github.com/apache/opendal/pull/7649#discussion_r3334203049


##########
bindings/c/src/types.rs:
##########
@@ -125,12 +135,59 @@ impl opendal_list_options {
         }
     }
 
+    /// \brief Set the limit option.
+    ///
+    /// @param opts The opendal_list_options to modify.
+    /// @param limit Maximum number of results per request; 0 means unset.
+    #[no_mangle]
+    pub unsafe extern "C" fn opendal_list_options_set_limit(
+        opts: *mut opendal_list_options,
+        limit: usize,
+    ) {
+        if !opts.is_null() {
+            (*opts).limit = limit;
+        }
+    }
+
+    /// \brief Set the start_after option.
+    ///
+    /// Passes the specified key to the underlying service to start listing 
from.
+    ///
+    /// @param opts The opendal_list_options to modify.
+    /// @param start_after The key to start listing from; NULL to unset.
+    #[no_mangle]
+    pub unsafe extern "C" fn opendal_list_options_set_start_after(
+        opts: *mut opendal_list_options,
+        start_after: *const c_char,
+    ) {
+        if !opts.is_null() {

Review Comment:
   Many places in this file don't use this pattern. I only update this 
function, if you think this function is too long. If you prefer to update all 
functions, probably it's better to use another PR for refactor.



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