BSON_ITER_INT64(3)

BSON_ITER_INT64(3) πŸ’…βœ¨

okay bestie, this one is from libbson, and it’s lowkey iconic: it’s the little manual page for pulling a 64-bit integer out of a BSON iterator. 🫢

SYNOPSIS 🌸

#define BSON_ITER_HOLDS_INT64(iter) (bson_iter_type ((iter)) == BSON_TYPE_INT64)

int64_t
bson_iter_int64 (const bson_iter_t *iter);

So the macro BSON_ITER_HOLDS_INT64(iter) checks whether bson_iter_type ((iter)) is exactly BSON_TYPE_INT64, and bson_iter_int64() is the function that actually fetches the value. slay. πŸ’–

PARAMETERS πŸŽ€

  • iter β€” a bson_iter_t. that’s the iterator bestie, it’s giving β€œpoint me at the BSON thing.” ✨

DESCRIPTION πŸ¦‹

This function fetches the value from a field of type BSON_TYPE_INT64. simple, cute, does what it says on the tin.

bestie, you should verify that this is a BSON_TYPE_INT64 field before calling this function. like, do the vibe check first. no cap. πŸ’…

RETURNS 🌈

A 64-bit integer. that’s it, that’s the tea. πŸ’œ

AUTHOR πŸ‘‘

MongoDB, Inc

2009-present, MongoDB, Inc.


xoxo, your libbson bestie πŸ’– this page is from version 2.5.6, dated Oct 09, 2026, and it ate. periodt. πŸŽ€

πŸ“¦ where this page comes from