1BSON_INIT_STATIC(3)                 Libbson                BSON_INIT_STATIC(3)
2
3
4

NAME

6       bson_init_static - bson_init_static()
7

SYNOPSIS

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

PARAMETERS

13       · b: A bson_t.
14
15       · data: A buffer to initialize with.
16
17       · length: The length of data in bytes.
18

DESCRIPTION

20       The  bson_init_static()  function  shall  shall  initialize a read-only
21       bson_t on the stack using the data provided. No copies of the data will
22       be made and therefore must remain valid for the lifetime of the bson_t.
23
24       The  resulting bson_t has internal references and therefore must not be
25       copied to avoid dangling pointers in the copy.
26

RETURNS

28       Returns true if bson_t was successfully initialized,  otherwise  false.
29       The function can fail if data or length are invalid.
30

AUTHOR

32       MongoDB, Inc
33
35       2017-present, MongoDB, Inc
36
37
38
39
401.14.0                           Feb 22, 2019              BSON_INIT_STATIC(3)
Impressum