lua-l archive
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
Is it normal that luaL_checkudata() makes my program to dye
From
: Laurent FAILLIE <l_faillie@
...
>
Date
: Tue, 1 May 2018 21:36:31 +0000 (UTC)
Hello,
Reading example in
https://www.lua.org/pil/28.2.html
, I guessed that
luaL_checkudata() only return a NULL pointer if the argument doesn't match an user data of the given type.
But unfortunately, it raise a fatal error :
My code is
...
} else if( (r = luaL_checkudata(L, -1, "SelSharedFunc")) )
func = *r;
puts("bla bla"); ...
but puts() is never reached if the argument is not matching and raise following error :
Selenites/MQTT.sel:53: bad argument #-2 to 'Subscribe' (SelSharedFunc expected, got nil)
Did I misunderstood the documentation or there is another problem ?
Thanks
Laurent
Follow-Ups
:
Re: Is it normal that luaL_checkudata() makes my program to dye
,
Peter Cawley
Re: Is it normal that luaL_checkudata() makes my program to dye
,
Javier Guerra Giraldez
Re: Is it normal that luaL_checkudata() makes my program to dye
,
Sean Conner
Prev by Date:
Re: LuaRocks GUI
Next by Date:
Re: Is it normal that luaL_checkudata() makes my program to dye
Previous by thread:
Re: LuaRocks GUI
Next by thread:
Re: Is it normal that luaL_checkudata() makes my program to dye
Index(es):
Date
Thread