[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Prefixes in lua source code lua_, luai_, etc.
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 30 Sep 2020 15:00:07 -0300
> I feel like I read some explanation for this, but can't find it any more.
> What are the meanings of the various prefixes seen in the Lua source code?
>
> eg: lua_, luai_, l_
>
> Are these documented somewhere?
This is for internal use, and there is no documentation. Usually, 'lua_'
is for public names (exported through the official API), 'luai_' are for
names that should not be used by external code, but need to be visible
there, and 'l_' is for internal names. ('l_' is usually used only in
simple/small names, which could collide with some name being imported in
a header file.) (Note the "Usually"!)
-- Roberto