Callables vs functions
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Callables vs functions
- From: "Thiago L." <fakedme@...>
- Date: 2014年11月19日 19:26:45 -0200
<SoniEx2> %5.3 t=setmetatable({")",
"'test'", "print("},{__call = function(t,...) return
table.remove(t) end}) load(t)()
<yalb> SoniEx2: sandbox:1: bad argument #1 to 'load'
(function expected, got table); stack traceback:; [C]: in function
'load'; sandbox:1: in main chunk
Can we please get a callable API? (for example, iscallable(obj), or
in C, lua_iscallable(whatever))