BSON_ITER_OID(3)
π BSON_ITER_OID π
okay so bestie, welcome to bson_iter_oid β that's section 3 of the libbson manual, and honestly? she's a short one but she's iconic. let's get into it π«Ά
β¨ SYNOPSIS β¨
#define BSON_ITER_HOLDS_OID(iter) (bson_iter_type ((iter)) == BSON_TYPE_OID)
const bson_oid_t *
bson_iter_oid (const bson_iter_t *iter);
literally two things and both are perfect, no notes π
π PARAMETERS π
iterβ abson_iter_t. that's it. that's the whole cast of characters π¦
πΈ DESCRIPTION πΈ
so the way this works is: bson_iter_oid fetches the bson_oid_t for a BSON_TYPE_OID element. slay. but β and this part is important, bestie, don't skip it β you should verify it's an element of type BSON_TYPE_OID before calling this function. like, vibe check your iterator first, okay? π that's literally what the BSON_ITER_HOLDS_OID(iter) macro up in the synopsis is for, iykyk π
π¦ RETURNS π¦
a bson_oid_t that should not be modified or freed β ngl it's not yours, it's giving borrowed-and-you-must-not-touch. look respectfully and move on πβ¨
β AUTHOR β
MongoDB, Inc β yeah, the MongoDB girlies wrote this one π
π COPYRIGHT π
2009-present, MongoDB, Inc. β protect the intellectual property, periodt π
and that's the whole page, bestie!! you ate that reading. this was libbson 2.5.6, dated Oct 09, 2026 β write it down, take a picture, it'll last longer ππΈπ
π¦ where this page comes from
- epel 10: libbson-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms