lua-users home
lua-l archive

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

>From Tue Jul 27 01:54:42 1999
>From: Pablo Saldo <>

>>It may have gone unnoticed that Lua 3.2 now supports this: the complete
>>sent to lua_dostring is now kept inside Lua, and can be retrieved with the
>>debug interface.
>Is there a way to retrieve the code in a passive way, without executing any

I'm not sure what you mean here.
lua_dostring always executes the string it gets, but this execution can be
simply the definition of some functions, eg:

 function f(x)
  return x+g(x)

So, doing lua_dostring on this strings simply defines the function f.
(More precisely, it simply stores a function value into the global variable f.)