mplist_get(3m17n)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– mplist_get πŸ’–

okay so bestie, welcome to the m17n Library corner of the manual, section 3m17n, and today's main character is mplist_get πŸŽ€


✨ NAME ✨

mplist_get β€” that's it, that's the name, the description slot is literally empty, she said "my work speaks for itself" πŸ’…


🌸 SYNOPSIS 🌸

void* mplist_get (MPlist * plist, MSymbol key)

πŸ¦‹ DESCRIPTION πŸ¦‹

ok so picture this: you've got a property list and you want the value that's attached to a certain key. that's literally the whole job. the mplist_get() function goes digging through the property list plist, starting all the way from the beginning, looking for a property whose key is key. πŸ”

and the moment she finds it? she hands you back its value, typed as (void *). slay. if she does not find it, you get NULL back. no drama, no cap.

🚨 but here's the tea, and it's important: when you get NULL back, there are two possible realities happening, and mplist_get() will not tell you which one you're in: 1. no property with that key was found at all (the case we just talked about) 2. a property was found β€” and its value just happens to be NULL too 😭 so yeah, those two situations are indistinguishable from here. if you absolutely need to tell them apart, do not pass go, do not collect $200, go use the mplist_find_by_key() function instead. she's the one who can vibe-check them separately. ✨

πŸ‘‘ SEE ALSO πŸ‘‘

  • mplist_find_by_key() β€” the icon you call when NULL is being ambiguous 🫢

Copyright (C) 2001 Information-technology Promotion Agency (IPA)

Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.


and that's the whole page bestie!! this was Version 1.8.4, dated Mon Sep 25 2023, and she ate fr fr πŸ’–βœ¨ no crumbs left. mwah πŸŽ€

πŸ“¦ where this page comes from