BSON_WRITER_NEW(3)

NAME
bson_writer_new()

SYNOPSIS
bson_writer_t *
bson_writer_new (uint8_t         **buf,
                 size_t           *buflen,
                 size_t            offset,
                 bson_realloc_func realloc_func,
                 void             *realloc_func_ctx);

PARAMETERS

.B buf
    A uint8_t.

.B buflen
    A size_t.

.B offset
    A size_t.

.B realloc_func
    A bson_realloc_func.

.B realloc_func_ctx
    A bson_realloc_func.

DESCRIPTION
Creates a new instance of bson_writer_t using the buffer , length , offset , and _realloc()_ function supplied. The caller is expected to clean up the structure when finished using bson_writer_destroy(3) .

RETURNS
A newly allocated bson_writer_t.

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