MONGOC_READ_PREFS_COPY(3)

πŸ’… MONGOC_READ_PREFS_COPY(3) πŸ’…

okay so bestie, welcome to libmongoc section 3 β€” this is the mongoc_read_prefs_copy() girlie and she is lowkey a whole vibe. she clones read preferences. that's it. that's the job. and she does it flawlessly. ✨


🌸 SYNOPSIS 🌸

mongoc_read_prefs_t *
mongoc_read_prefs_copy (const mongoc_read_prefs_t *read_prefs);

like, you hand her a read prefs pointer and she hands you back a brand new one. iconic behavior honestly. 🫢


πŸŽ€ PARAMETERS πŸŽ€

  • read_prefs β€” a mongoc_read_prefs_t. that's the thing you're copying, no cap. it's the main character of this whole operation. πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this function shall deep copy a read preference. deep. not shallow. not "ehh close enough." a full-on deep copy β€” like when your bestie borrows your playlist but makes her own separate one so nothing you do affects hers. that's the energy. πŸ’–

literally the entire function. that's the whole description. she copies. she slays. periodt. πŸ’…


⭐ RETURNS ⭐

she returns a newly allocated read preference β€” fresh out the oven, your very own copy. πŸŽ€

⚠️ bestie listen to me: you HAVE to free it with mongoc_read_prefs_destroy() when you're done. it's newly allocated, meaning somebody's gotta clean it up and that somebody is you. don't just leave it hanging, that's not the vibe. 😭

🌈 AUTHOR 🌈

MongoDB, Inc β€” the legends themselves. πŸ‘‘


2009-present, MongoDB, Inc. all rights reserved, all vibes reserved. 🧚


and that's the whole page bestie!! this lil' beauty shipped as part of libmongoc 2.5.6, dated Oct 09, 2026 β€” so go forth, deep copy your read prefs, free them properly, and remember: deep copy is the only copy. mwah πŸ’‹βœ¨πŸ“

πŸ“¦ where this page comes from