diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-12 10:47:46 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-12 10:47:46 -0300 |
commit | b8d57092ebbaefb088bf63fca7fa91f77545beda (patch) | |
tree | 7cf442e45af9feec3673b6b32b07be58399d5a02 | |
parent | 0f59e3d7a70ea8c15792450496974d95dbae8d5b (diff) | |
download | lua-b8d57092ebbaefb088bf63fca7fa91f77545beda.tar.gz lua-b8d57092ebbaefb088bf63fca7fa91f77545beda.tar.bz2 lua-b8d57092ebbaefb088bf63fca7fa91f77545beda.zip |
topointer handles only types that have no other "to" function
-rw-r--r-- | lapi.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.95 2000/09/11 19:45:27 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.96 2000/09/11 20:29:27 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -175,11 +175,6 @@ void *lua_touserdata (lua_State *L, int index) { | |||
175 | const void *lua_topointer (lua_State *L, int index) { | 175 | const void *lua_topointer (lua_State *L, int index) { |
176 | StkId o = Index(L, index); | 176 | StkId o = Index(L, index); |
177 | switch (ttype(o)) { | 177 | switch (ttype(o)) { |
178 | case TAG_NUMBER: case TAG_NIL: | ||
179 | return NULL; | ||
180 | case TAG_STRING: | ||
181 | case TAG_USERDATA: | ||
182 | return tsvalue(o); | ||
183 | case TAG_TABLE: | 178 | case TAG_TABLE: |
184 | return hvalue(o); | 179 | return hvalue(o); |
185 | case TAG_CCLOSURE: case TAG_LCLOSURE: | 180 | case TAG_CCLOSURE: case TAG_LCLOSURE: |