This is an automated email from the ASF dual-hosted git repository.

xyji pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 053b0b9de fix(bindings/c): Fix an example of the C binding (#2854)
053b0b9de is described below

commit 053b0b9ded859ca95dbbc4523f21ee475c3b2451
Author: Kousuke Saruta <[email protected]>
AuthorDate: Sun Aug 13 05:10:22 2023 +0900

    fix(bindings/c): Fix an example of the C binding (#2854)
---
 bindings/c/examples/basicrw.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bindings/c/examples/basicrw.c b/bindings/c/examples/basicrw.c
index 2f8ca6ae8..3c3cd75cd 100644
--- a/bindings/c/examples/basicrw.c
+++ b/bindings/c/examples/basicrw.c
@@ -24,8 +24,8 @@
 int main()
 {
     /* Initialize a operator for "memory" backend, with no options */
-    opendal_operator_ptr op = opendal_operator_new("memory", 0);
-    assert(op.ptr != NULL);
+    const opendal_operator_ptr *op = opendal_operator_new("memory", 0);
+    assert(op->ptr != NULL);
 
     /* Prepare some data to be written */
     opendal_bytes data = {
@@ -53,5 +53,5 @@ int main()
     opendal_bytes_free(read_bytes);
 
     /* the operator_ptr is also heap allocated */
-    opendal_operator_free(&op);
+    opendal_operator_free(op);
 }

Reply via email to