mplist_add(3m17n)
β¨ 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 π
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
- debian trixie: m17n-docs 1.8.4-1
- ubuntu noble: m17n-docs 1.8.4-1
- ubuntu questing: m17n-docs 1.8.4-1
- ubuntu resolute: m17n-docs 1.8.4-1build1
- ubuntu stonking: m17n-docs 1.8.4-1build1
- Copyright (C) 2001 Information-technology Promotion Agency (IPA)
- Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms