mplist_add(3m17n)

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

✨ NAME ✨

mplist_add β€” bestie's fave lil function for adding a property to the end of a property list πŸ’– (it's from the m17n Library, and yes we're gonna get into it)


🌸 SYNOPSIS 🌸

MPlist* mplist_add (MPlist * plist, MSymbol key, void * val)

πŸŽ€ DESCRIPTION πŸŽ€

okay so. mplist_add() appends a property to the end of the property list plist. The property it adds has key key and value val. no cap, it just yeets it on the end 🫢

So the vibe is: key can be any symbol other than Mnil. Any. Symbol. Literally any one except that guy. ✨

Now here's the tea πŸ“ β€” if key happens to be a managing key, then val must be a managed object. No exceptions, bestie, that's the rule. And when that's the case, the reference count of val gets incremented by one. +1. that's it. that's the whole mechanic πŸ’…

⚠️ fr fr pay attention to the managing-key thing: if your key is a managing key and your val isn't a managed object, that's a you problem, so don't do it πŸ™ˆ

πŸ’« RETURN VALUE πŸ’«

If the operation was a slay (successful βœ…), mplist_add() returns a sublist of plist whose first element is the just added one. like, the brand new baby property is leading the sublist. main character energy πŸ‘‘

Otherwise? it returns NULL. πŸ’€ That's it. That's the whole answer.


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 page, bestie πŸ¦‹πŸ’œ this was Version 1.8.4, dated Mon Sep 25 2023, part of the mplist_add(3m17n) manual β€” mwah, go add some properties, you've got this πŸŒˆβ­πŸŽ€

πŸ“¦ where this page comes from