You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2023/09/01 16:16:20 UTC
[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #3001: feat(bindings/cpp): expose all api returned by value
Xuanwo commented on code in PR #3001:
URL: https://github.com/apache/incubator-opendal/pull/3001#discussion_r1313242292
##########
bindings/cpp/src/lib.rs:
##########
@@ -27,12 +26,40 @@ mod ffi {
value: String,
}
+ struct Metadata {
+ // tag layout: (8 bits flagset)
+ // 0-1: mode, 2: has_cache_control, 3: has_content_disposition, 4: has_content_md5,
+ // 5: has_content_type, 6: has_etag, 7: has_last_modified
+ //
+ // mode enum: (2 bits)
+ // 1: file, 2: dir, 0,3: unknown
+ tag: u8,
Review Comment:
Clever! But I don't like API like this in binding which is hard to maintain and easily to be wrong. How about implement our own `Option` and expose to cpp side instead?
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org