BSON_COPY_TO_EXCLUDING(3)
π BSON_COPY_TO_EXCLUDING π
okay bestie, this is a page from libbson, and it's giving "vintage but problematic" energy. Let's get into it β¨
π¨ WARNING π¨
Deprecated since version 1.1.0: Use bson_copy_to_excluding_noinit() instead.
no cap, this one's been on the deprecated list since version1.1.0. if you're writing new code, please usebson_copy_to_excluding_noinit()instead, i'm literally begging π₯Ί
β¨ SYNOPSIS β¨
void
bson_copy_to_excluding (const bson_t *src,
bson_t *dst,
const char *first_exclude,
...);
πΈ PARAMETERS πΈ
srcβ Abson_t. this is your source, the main character we're copying from πdstβ Abson_t. this is the destination, where the copied goodies land πfirst_excludeβ The first field name to exclude. yes queen, we're naming names and leaving them out π
π¦ DESCRIPTION π¦
The bson_copy_to_excluding() function shall copy all fields from src to dst except those specified by the variadic, NULL terminated list of keys starting from first_exclude.
like... it's a copy, but make it β¨selectiveβ¨. everything comes over except the keys you listed, and that list keeps going until it hits a NULL. periodt. π
β οΈ WARNING:bson_init()is called ondst.
so yeah, heads up: dst gets bson_init() called on it. not a vibe check you can skip, it just happens π₯
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
and that's the whole page, bestie!! π«Ά this lil rewrite is from libbson 1.30.13, dated Oct 09, 2026 β so if you see that number floating around, that's us π mwah, go use the non-deprecated version, ily, bye!! πβ¨
π¦ where this page comes from
- fedora 43: libbson-devel 1.30.13-1.fc43 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- fedora 43: libbson-devel 1.30.13-1.fc43 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms