table of contents
- unstable 2.1.0-1
BSON_APPEND_VECTOR_PACKED_BIT_UNINIT(3) | libbson | BSON_APPEND_VECTOR_PACKED_BIT_UNINIT(3) |
SYNOPSIS¶
#define BSON_APPEND_VECTOR_PACKED_BIT_UNINIT(b, key, count, view) \
bson_append_vector_packed_bit_uninit (b, key, (int) strlen (key), count, view) bool bson_append_vector_packed_bit_uninit (bson_t *bson,
const char *key,
int key_length,
size_t element_count,
bson_vector_packed_bit_view_t *view_out);
PARAMETERS¶
- bson: A bson_t.
- key: An ASCII C string containing the name of the field.
- key_length: The length of key in bytes, or -1 to determine the length with strlen().
- element_count: Number of elements to allocate space for.
- view_out: Receives a bson_vector_packed_bit_view_t with uninitialized elements.
DESCRIPTION¶
Appends a new field to bson by allocating a Vector with the indicated number of packed_bit elements. The elements will be uninitialized. On success, the caller must write every element in the Vector if the resulting bson_t is to be used.
The view written to *view_out is only valid until bson is otherwise modified or freed.
RETURNS¶
Returns true if the operation was applied successfully. The function fails if appending the array grows bson larger than INT32_MAX.
AUTHOR¶
MongoDB, Inc
COPYRIGHT¶
2009-present, MongoDB, Inc.
June 17, 2025 | 2.0.2 |