m17nSymbol(3m17n)

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

✨ m17nSymbol πŸ’… (the m17n Library manual, section 3m17n)

okay bestie, sit DOWN because we're about to talk about symbols, and honestly? iconic behavior.


🌸 NAME 🌸

m17nSymbol_-_Sy β€” Symbol objects and API for them. that's it, that's the whole vibe. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

πŸ¦‹ Functions

  • MSymbol msymbol(const char *name) β€” grab yourself a symbol. 🫢
  • MSymbol msymbol_as_managing_key(const char *name) β€” make a managing key, the fancy kind.
  • int msymbol_is_managing_key(MSymbol symbol) β€” is this symbol a managing key or not, we gotta know.
  • MSymbol msymbol_exist(const char *name) β€” (no little blurb on this one in the original, it's mysterious, we respect that πŸ™ˆ)
  • char * msymbol_name(MSymbol symbol) β€” (also no blurb, still ate tho)
  • int msymbol_put(MSymbol symbol, MSymbol key, void *val) β€” set the value of a symbol property.
  • void * msymbol_get(MSymbol symbol, MSymbol key) β€” get the value of a symbol property.
  • int msymbol_put_func(MSymbol symbol, MSymbol key, M17NFunc func) β€” set the value (a function pointer) of a symbol property.
  • M17NFunc msymbol_get_func(MSymbol symbol, MSymbol key) β€” get the value (a function pointer) of a symbol property.

🌈 Variables

  • MSymbol Mnil β€” symbol whose name is 'nil'.
  • MSymbol Mt β€” symbol whose name is 't'.
  • MSymbol Mstring β€” symbol whose name is 'string'.
  • MSymbol Msymbol β€” symbol whose name is 'symbol'.

πŸ’œ Detailed Description πŸ’œ

Symbol objects and API for them. periodt.

so like, the m17n library uses these little objects called symbols as unambiguous identifiers. think of them as the main characters of naming β€” no confusion, no drama, no "wait which one did you mean". Symbols are similar to atoms in the X library, but plot twist: a symbol can have zero or more symbol properties. and what's a symbol property, you ask? it's a key plus a value. the key is also a symbol (symbols all the way down, we love a self-referential queen πŸ‘‘), and the value is literally anything that can be cast to (void *).

quick glossary moment, because the original is being cute about it:

'The symbol property that belongs to the symbol S and whose key is K' may be shortened to 'K property of S'.

see? efficient. we stan.

Symbols are used mainly in these three ways, and bestie, these are the big three:

  • As keys of symbol properties and other properties.
  • To represent various objects, e.g. charsets, coding systems, fontsets.
  • As arguments of the m17n library functions to control their behavior.

and now for the special one 🧚: there is a special kind of symbol called a managing key. the value of a property whose key is a managing key must be a managed object. like, no exceptions, that's the rule. see Managed Object for the detail.


🌟 Variable Documentation 🌟

MSymbol Mnil

Symbol whose name is 'nil'. the symbol Mnil has the name 'nil' and, in general, represents false or no. when coerced to 'int', its value is zero. and heads up β€” Mnil can't have any symbol property. at all. none. it's giving minimalist. πŸ’€

MSymbol Mt

Symbol whose name is 't'. the symbol Mt has the name 't' and, in general, represents true or yes. the yes-girl of symbols fr fr. ✨

MSymbol Mstring

Symbol whose name is 'string'. the symbol Mstring has the name 'string' and is used as an argument of the functions mchar_define_property(), etc. (yes, the etc. is doing a lot of work there, that's what the original says, we don't make the rules 🫢)

MSymbol Msymbol

Symbol whose name is 'symbol'. the symbol Msymbol has the name 'symbol' and is used as an argument of the functions mchar_define_property(), etc. name so nice they said it twice basically.


πŸ’– Author πŸ’–

Generated automatically by Doxygen for The m17n Library from the source code. so technically no human wrote this, which is lowkey wild.

  • 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. go forth and symbol responsibly. πŸ’…πŸ¦‹πŸŒΈ

Version 1.8.4 β€” Mon Sep 25 2023 β€” m17nSymbol(3m17n). mwah, love u, bye! πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from