Details
-
Task
-
Resolution: Won't Fix
-
Minor - P4
-
None
-
None
-
None
-
None
Description
We have three ways of representing binary/BSON
- mongocrypt_binary_t - public
- _mongocrypt_buffer_t - private, has conveniences
- bson_t - for working with bson
Let's be consistent with usage and behavior and document it somewhere. Also regarding const-ness, passing by pointer vs. value, and ownership semantics.
_mongocrypt_buffer_t should be used everywhere possible, and should statically initialize a bson_t when needed (perhaps it could have a bson_t member).
Consider having _mongocrypt_buffer_t data-inherit mongocrypt_binary_t, so we can return it directly by casting in public functions.
Consider where the BSON helpers for traversing/transforming should live (_mongocrypt_transform_binary_in_bson and _mongocrypt_traverse_binary_in_bson).
Attachments
Issue Links
- is related to
-
MONGOCRYPT-37 libmongocrypt: base types
-
- Closed
-