lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Jan 3, 2013 at 11:35 PM, Coda Highland <chighland@gmail.com> wrote:
> On Thu, Jan 3, 2013 at 11:10 AM, Patrick <patrick@spellingbeewinnars.org> wrote:
>> So the C API is very simple but that does not mean it is simple enough for
>> me ;)
>>
>> Are these functions mostly used internally and in advanced cases:
>> lua_Alloc
>> lua_getallocf
>> lua_setallocf
>> lua_Writter
>
> Yes, those are primarily for advanced use as the defaults are good
> enough for most applications.

I always thought that it is a proper practice for modules is to use
lua_getallocf() if they are allocating something "manually" — i.e.
outside of Lua API (unless there is a reason to do otherwise for a
particular use-case of particular module).

Alexander.