[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: lua_getref problem
- From: Juergen Fuhrmann <fuhrmann@...>
- Date: Wed, 19 May 1999 13:59:37 +0200
Dear men(&women) on the moon,
We are successfully using now lua as an extension language for several
numerics packages (I confess I still have to post this info onto the
list of projects using lua), and with things becoming more complex we
are stuck now with the following problem:
I have written a package olua which manages proxies of C structs using
lua tables. The central data type of this is oluaObject which is a
struct holding a _reference_ to an lua object created by lua_ref --
after running into trouble by using luaObjects directly due some
possibly rather common misunderstanding of luaObjects.
Everytime I want to access the luaObject behind the oluaObject I now
have to call lua_getref. These calls to lua_getref increase the C2lua
stack by calling put_luaObject. The result is that, when doing this in
a complex environment, I get the "Lua2C - C2Lua overflow" message just
by accessing these references a lot of times. Of course I could
increase the stack limit in my source to fit our needs for the time
being, but I consider this as rather unnatural...
Is this a bug, a feature or a mis-understanding from my side ?
Still in honeyemoon with lua -
Juergen Fuhrmann
Numerical Mathematics & Scientific Computing
Weierstrass Institute for Applied Analysis and Stochastics
Mohrenstr. 39 10117 Berlin fon:+49 30 20372560 fax:+49 30 2044975
http://www.wias-berlin.de/~fuhrmann mailto:fuhrmann@wias-berlin.de