lua-users home
lua-l archive

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


> >As far as I know the current limitation is that it cannot save C
closures,
> >isn't it?
> >Will this limitation be fixed for the final version of lua 5? Are there
any
> >other limitations?
> >and if so, are they planned to be fixed for the final version?
>
> That's right. lua_dump cannot save closures, be they C or Lua. (BTW, how
> would we save C closures?) This limitation will remain in Lua 5.0

Thanks for the fast reply. Yes, I guess there is no way to do it now that I
think about.
And I guess it cannot save registered C functions as well...
If that's the case, how does lua_dump behaves with your registered C
function as well as the default lua libraries functions? Does it simply
ignore them (avoid adding them to the state) so you have to re-register them
(both your own C functions and lua base lib / tables lib etc, functions)?
And if that happens and you call lua_dump inside a lua c function (can that
be done?) how would it know where to resume if it doesn't save the c
function?

Thanks