SYNOPSIS

#include <bson.h>

#define BSON_ITER_HOLDS_INT32(iter) \
   (bson_iter_type ((iter)) == BSON_TYPE_INT32)

int32_t
bson_iter_int32 (const bson_iter_t *iter);

DESCRIPTION

The bson_iter_int32() function shall return the 32-bit signed integer value from a BSON_TYPE_INT32 field.

It is invalid to call this function while observing an element that is not of type BSON_TYPE_INT32. You can verify this with BSON_ITER_HOLDS_INT32().

RETURN VALUE

A 32-bit signed integer.

SEE ALSO

AUTHORS

This page was written by MongoDB, Inc.