BSON_APPEND_VE...KED_BIT_UNINIT(3)
π
BSON_APPEND_VE...KED_BIT_UNINIT(3) β libbson bestie era β¨
okay so this is the libbson manual page for BSON_APPEND_VECTOR_PACKED_BIT_UNINIT(3), and itβs lowkey a βyou allocate it, you fill itβ situation. no cap. π«Ά
β¨ 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β abson_t. the main character weβre appending to πkeyβ an ASCII C string holding the name of the field. yes, ASCII, bestie.key_lengthβ the length ofkeyin bytes, or-1to letstrlen()figure out the length for you β¨element_countβ number of elements to allocate space for. thatβs the count, periodt.view_outβ receives abson_vector_packed_bit_view_twith uninitialized elements. not me handing you 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. so on success, the caller must write every element in the Vector if the resulting bson_t is to be used. literally every single one, iykyk. π§
The view written to *view_out is only valid until bson is otherwise modified or freed. so donβt get attached, bestie β itβs giving temporary main character energy π
π₯ RETURNS π₯
Returns true if the operation was applied successfully. The function fails if appending the array grows bson larger than INT32_MAX. thatβs the limit, no cap.
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
and thatβs the whole vibe: libbson version 2.5.6, dated Oct 09, 202 (the original footer is literally getting eaten by the title after that π), MongoDB, Inc., 2009-present. slay, you made it to the end π
π¦ where this page comes from
- epel 10: libbson-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms