BSON_ITER_OVERWRITE_INT32(3)

πŸ’– BSON_ITER_OVERWRITE_INT32 πŸ’–

okay so welcome to the libbson manual page for bson_iter_overwrite_int32, bestie β€” this one is short but it has a lil twist, so stay with me 🫢


✨ SYNOPSIS ✨

here is the whole signature, exactly as it is, no cap:

          void
          bson_iter_overwrite_int32 (bson_iter_t *iter, int32_t value);

πŸŽ€ PARAMETERS πŸŽ€

  • iter β€” A bson_iter_t.
  • value β€” A int32_t.

that's it, those are the two, we love a simple cast πŸ’…


πŸ’… DESCRIPTION πŸ’…

The bson_iter_overwrite_int32() function shall overwrite the contents of a BSON_TYPE_INT32 element in place.

⚠️ okay so this is important, bestie: this may only be done when the underlying bson document allows mutation. do not try to be cute with a document that said no to mutation, fr fr.

It is a programming error to call this function when iter is not observing an element of type BSON_TYPE_BOOL.

and yes, the original manual says BSON_TYPE_BOOL right there β€” exactly like that β€” and I am not changing the facts, I'm just the messenger πŸ˜­πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc


2009-present, MongoDB, Inc.


muah πŸ’‹ β€” this was libbson 2.5.6, dated Oct 09, 2026, and that's the whole page, periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from