BSON_ITER_DOUBLE(3)
π BSON_ITER_DOUBLE(3) π
okay so bestie, welcome to the libbson manual, and specifically the page about bson_iter_double β she's a little function that goes and grabs you a double out of a BSON iterator. tiny page, iconic energy, let's get into it β¨
β¨ SYNOPSIS β¨
here's the whole vibe β the macro first, then the function, copied exactly because we do not mess with code in this house π«Ά
#define BSON_ITER_HOLDS_DOUBLE(iter) \
(bson_iter_type ((iter)) == BSON_TYPE_DOUBLE)
double
bson_iter_double (const bson_iter_t *iter);
so the macro is your little vibe check: BSON_ITER_HOLDS_DOUBLE is literally just asking "does this iterator's type equal BSON_TYPE_DOUBLE?" and returning true/false accordingly. and then bson_iter_double is the actual main character that hands you the double π
πΈ PARAMETERS πΈ
iterβ abson_iter_t. that's it. that's the whole parameter list. she takes one (1) iterator and she's happy π
π¦ DESCRIPTION π¦
bson_iter_double fetches the contents of a BSON_TYPE_DOUBLE field. that's the entire job. no cap. it reaches into your iterator, pulls out the double that's chilling in there, and gives it to you π
lowkey a good idea to run theBSON_ITER_HOLDS_DOUBLEcheck first so you know you're actually looking at aBSON_TYPE_DOUBLEfield β the macro is right there in the synopsis for you, bestie, use her π
β RETURNS β
a double. yes really, that's the whole returns section. she said "you get a double, and that's the tea" π
π AUTHOR π
MongoDB, Inc β icons only, we love to see it π«‘
π COPYRIGHT π
2009-present, MongoDB, Inc. β periodt, give credit where credit is due π
and that's the page, bestie!! π this was libbson version 2.5.6, dated Oct 09, 2026 β screenshot it, bookmark it, tattoo it on your forearm, whatever works for you ππ«Ά go forth and read those doubles β¨π
π¦ 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