bson_init_static man page

bson_init_static() — 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.

Synopsis

bool
bson_init_static (bson_t        *b,
                  const uint8_t *data,
                  size_t         length);

Parameters

b
A bson_t
data
A buffer to initialize with.
length
The length of data in bytes.

Description

The bson_init_static(3) 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

Returns

bson_init_static(3) will return true if the bson_t was successfully initialized.

Colophon

This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.

Referenced By

bson_iter_codewscope(3), bson_parsing(3).

2016‐10‐28 libbson