lua-users home
lua-l archive

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


Gang,

This doesn't seem possible from what I glean (without modifying lua itself). But I thought I'd ask. When I load or call lua code I'm passing a chunkName for debug/error output.

However, I've got many, many, many lua scripts, each with 256 byte string object in it for this situtaion. 99% of the time, these strings just sit there taking up gobs of memory as most scripts load and run without error. Very inefficient memory usage.

So instead of passing a string, I'd like to somehow pass my C++ object (just some 32 bit value as far as lua is concerned) that, with the Debug API's I can then retrieve. This way, I could not allocate and define the string until there is an actual problem....

Any thoughts?

thx,
ando

-----------------------
Ando Sonenblick
SpriTec Software
www.spritec.com