bson_init_static()¶
Synopsis¶
bool
bson_init_static (bson_t *b, const uint8_t *data, size_t length);
Description¶
The bson_init_static() function shall shall initialize a read-only bson_t on the stack using the data provided. No copies of the data will be made and therefore must remain valid for the lifetime of the bson_t.
The resulting bson_t has internal references and therefore must not be copied to avoid dangling pointers in the copy.