[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Empty function determination
- From: Rici Lake <lua@...>
- Date: Wed, 4 Aug 2004 10:21:52 -0500
On 4-Aug-04, at 9:50 AM, Dan East wrote:
Lua functions are passed to my C code. I wish to determine if the
Lua
function is empty. Is this possible?
Not really.
I don't know what problem you are trying to solve: if you are simply
trying to avoid calling an empty function, you might consider one of
the following alternatives:
1) Call it anyway. It doesn't take much time to execute an empty
function.
2) Allow nil instead of a function, and test for nil.
3) Provide the following global or package member:
function DoNothing() end
and tell them to use it instead of writing out at empty function.