BSON_COPY_TO(3)
π BSON_COPY_TO(3) π
okay so bestie, welcome to libbson's bson_copy_to() page β literally the page header says BSON_COPY_TO(3), and the manual is libbson, so now you know what family we're in π«Ά
β¨ SYNOPSIS β¨
void
bson_copy_to (const bson_t *src, bson_t *dst);
that's it. that's the whole signature. it's giving "small function, big responsibility" π
π PARAMETERS π
srcβ abson_t. the one you're copying from, the source, the original, the main character πdstβ abson_t. the one you're copying into. the destination. the understudy. it's getting the whole personality ofsrccopied into it, ngl πΈ
π¦ DESCRIPTION π¦
so the bson_copy_to() function shall initialize dst with a copy of the contents of src π like, dst comes out the other side holding exactly what src was holding. copy-paste but make it C. slay.
β οΈ okay this part is SO important, bestie, listen to me:dstMUST be an uninitializedbson_tβ otherwise you leak memory π fr fr, do not pass me some already-initialized struct and expect a cute outcome. that is not the vibe. memory leaks are the opposite of iconic. π
so like β uninitialized dst. no cap. periodt. π
π AUTHOR π
MongoDB, Inc β yes, that MongoDB π they wrote this. icons only.
β COPYRIGHT β
2009-present, MongoDB, Inc. β yeah, they've been at it a minute, we stan longevity π«Ά
and that's the whole page, bestie!! tysm for reading, drink some water, and remember: uninitialized dst or bust π§ββοΈβ¨
this has been libbson 2.5.6, dated Oct 09, 2026 β catch you on the next man page, mwah ππ¦π
π¦ 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