diff options
author | pixel <pixel> | 2004-02-27 10:35:44 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-02-27 10:35:44 +0000 |
commit | b4348d5503e3718bbb6d1a3b7109f049908d5625 (patch) | |
tree | 393f954694b1533fd9b0c0c0f0fc879f7fdc4be2 | |
parent | 124bbb2b7d331495073986e470126aa9dc0e2a15 (diff) |
Eww.... functions != methods
-rw-r--r-- | include/BLua.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/BLua.h b/include/BLua.h index 0f76284..dc2d963 100644 --- a/include/BLua.h +++ b/include/BLua.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: BLua.h,v 1.12 2003-12-26 20:36:07 pixel Exp $ */ +/* $Id: BLua.h,v 1.13 2004-02-27 10:35:44 pixel Exp $ */ #ifndef __BLUA_H__ #define __BLUA_H__ @@ -182,10 +182,13 @@ class LuaHelpers : public Base { Lua * L = Lua::find(_L); int add = method ? 1 : 0; int n = L->gettop() - add; - T * obj = (T *) LuaObject::getme(L); + T * obj = 0; int i; bool invalid = false; + if (method) + obj = (T *) LuaObject::getme(L); + if ((n < tab[caller].minargs) || (n > tab[caller].maxargs)) { invalid = true; } else { |