[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Determine if function is defined with C API?
- From: Ben Kelly <ranavin@...>
- Date: Thu, 31 Jul 2008 22:42:31 -0400
>>> How would I do something like this? From lua_pcall, I get a return
>>> value of 2 but is this defined somewhere? Should I just check for
>>> that value or is there a preferred constant?
> This requires the function be on the stack and that you know the index,
If he's in a position to use pcall on it, it's already on stack and thus
using lua_isfunction() is entirely reasonable, no?