aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-04-02 14:44:18 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-04-02 14:44:18 -0300
commitf0d523887d28c569e931eacbe1078599750cd5b7 (patch)
tree4854eea1a81e30fa5f08ea5fcafe66fc62429147
parentf29fbf2bf604aa425a5200f02a74f8311ece98f3 (diff)
downloadlua-f0d523887d28c569e931eacbe1078599750cd5b7.tar.gz
lua-f0d523887d28c569e931eacbe1078599750cd5b7.tar.bz2
lua-f0d523887d28c569e931eacbe1078599750cd5b7.zip
lua_getuserdata must return NULL if object is not userdata
-rw-r--r--lua.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lua.h b/lua.h
index 34414ca4..910ac158 100644
--- a/lua.h
+++ b/lua.h
@@ -2,7 +2,7 @@
2** LUA - Linguagem para Usuarios de Aplicacao 2** LUA - Linguagem para Usuarios de Aplicacao
3** Grupo de Tecnologia em Computacao Grafica 3** Grupo de Tecnologia em Computacao Grafica
4** TeCGraf - PUC-Rio 4** TeCGraf - PUC-Rio
5** $Id: lua.h,v 3.38 1997/03/31 20:59:09 roberto Exp roberto $ 5** $Id: lua.h,v 3.39 1997/04/01 19:02:43 roberto Exp roberto $
6*/ 6*/
7 7
8 8
@@ -89,18 +89,18 @@ lua_Object lua_createtable (void);
89 89
90#define lua_refobject(o,l) (lua_pushobject(o), lua_ref(l)) 90#define lua_refobject(o,l) (lua_pushobject(o), lua_ref(l))
91 91
92#define lua_register(n,f) (lua_pushcfunction(f), lua_storeglobal(n)) 92#define lua_register(n,f) (lua_pushcfunction(f), lua_setglobal(n))
93 93
94#define lua_pushuserdata(u) lua_pushusertag(u, 0) 94#define lua_pushuserdata(u) lua_pushusertag(u, 0)
95 95
96 96
97/* =============================================================== */ 97/* =============================================================== */
98/* for compatibility with old versions. Avoid using these macros */ 98/* for compatibility with old versions. Avoid using these macros/functions */
99 99
100#define lua_storeglobal(n) lua_setglobal(n) 100#define lua_storeglobal(n) lua_setglobal(n)
101#define lua_type(o) (lua_tag(o)) 101#define lua_type(o) (lua_tag(o))
102 102
103#define lua_getuserdata(o) (*(void **)lua_getbinarydata(o)) 103void *lua_getuserdata (lua_Object object);
104 104
105#define lua_lockobject(o) lua_refobject(o,1) 105#define lua_lockobject(o) lua_refobject(o,1)
106#define lua_lock() lua_ref(1) 106#define lua_lock() lua_ref(1)