L_atom_wchars()">PL_atom_wchars()
to obtain a C wide string (functor_t PL_new_functor(atom_t
name, int arity) Returns a functor identifier, a handle for the name/arity pair.
The returned handle is valid for the entire Prolog session. Future
versions may garbage collect functors as part of atom garbage
collection. Currently aborts the process with a fatal error on
failure. Future versions may raise a resource exception and return
atom_t PL_functor_name(functor_t
f) Return an atom representing the name of the given functor.
size_t PL_functor_arity(functor_t
f) Return the arity of the given functor.
wchar_t
).
(atom_t)0
.
12.4.2.1 Atoms and atom garbage collection
With the introduction of atom garbage collection in version 3.3.0, atoms no longer live as long as the process. Instead, their lifetime is guaranteed only as long as they are referenced. In the single-threaded version, atom garbage collections are only invoked at the call-port. In the multithreaded version (see chapter 10), they appear asynchronously, except for the invoking thread.
For dealing with atom garbage collection, two additional functions are provided:
- void PL_register_atom(atom_t atom)
- Increment the