Digital | 10 Aug 2012 15:23

error checking on lua_getglobal

How can I best check for lua_getglobal returns?

In case the variable it checks is nil or isn't initialized.

Luiz Henrique de Figueiredo | 10 Aug 2012 19:10
Picon

Re: error checking on lua_getglobal

> How can I best check for lua_getglobal returns?
> 
> In case the variable it checks is nil or isn't initialized.

Use lua_isnil(L,-1).


Gmane