FreeBSD Manual Pages
BSON_NEW_FROM_BUFFER(3) libbson BSON_NEW_FROM_BUFFER(3) SYNOPSIS bson_t * bson_new_from_buffer (uint8_t **buf, size_t *buf_len, bson_realloc_func realloc_func, void *realloc_func_ctx); PARAMETERS • buf: An out-pointer to a buffer containing a serialized BSON docu- ment, or to NULL. • buf_len: An out-pointer to the length of the buffer in bytes. • realloc_func: Optional bson_realloc_func for reallocating the buffer. • realloc_func_ctx: Optional pointer that will be passed as ctx to re- alloc_func. DESCRIPTION Creates a new bson_t using the data provided. The realloc_func, if provided, is called to resize buf if the document is later expanded, for example by a call to one of the bson_append functions. If *buf is initially NULL then it is allocated, using realloc_func or the default allocator, and initialized with an empty BSON document, and *buf_len is set to 5, the size of an empty document. RETURNS A newly-allocated bson_t on success, or NULL. AUTHOR MongoDB, Inc COPYRIGHT 2009-present, MongoDB, Inc. 1.30.2 Apr 12, 2025 BSON_NEW_FROM_BUFFER(3)
SYNOPSIS | PARAMETERS | DESCRIPTION | RETURNS | AUTHOR | COPYRIGHT
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=bson_new_from_buffer&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>
