lua-users home
lua-l archive

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


On Wed, May 19, 2010 at 12:51 PM, Nikolai Kondrashov <spbnick@gmail.com> wrote:
> I wasn't able to find an answer to a seemingly basic question anywhere:
> Is it possible to disable "assert" function execution along with its
> argument evaluation in Lua? I.e. like it is done in C by defining NDEBUG?

It is just a global function, so defining it as an empty function does the job

function assert()

end

yes, ok, it still involves a function call and evaluation of the arguments.

You could macro-ize it out of the existence, of course.

steve d.