lua-users home
lua-l archive

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

My preference is to make as few changes to Lua -- or any third-party code -- as possible. Callbacks for I/O and memory allocation seems, to me anyway, obvious for an embedded API. Is there any drawback to it? Sure I have a working implementation now, but I went through a fair amount of grief trying to hunt down the proper places to change things in the source, none of which was documented anywhere. I haven't tried upgrading past 4.1w1, because then I'll have to redo all of the changes. This seems like a good "bang for the buck" from a usability standpoint. At the very least, can we get some documentation on what needs to be changed for each case?

Just my $0.02 of course.


Roberto Ierusalimschy wrote:
About the core, we moved lua_dofile (currently lua_loadfile) to outside
the core, so that it is easier to write your own file I/O routines.

About memory management, all calls are concentrated in a single point,
so it is quite easy to change. Is it really a good idea to go a step
further and implement that through a "callback" function?