lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thanks, Fabian, but I'm using version 5.0.2 , and the
code doesn't worked (crashed!)!

> this code is valid for luna template for lua 4.x (I
> think)
> 
> int your_class::check(lua_State *L)
> {
> 	your_class *p;
> 	lua_pushnumber(L, 0); /* userdata object is stored
> in index 0 */
> 	lua_gettable(L, 1);		/* first argument for the user
> function y the table object
> 	p = (some_class *)lua_touserdata(L,-1);
> 	lua_pop(L,1);
> 	...



	
	
		
Yahoo! Acesso Grátis - Internet rápida e grátis. 
Instale o discador agora! http://br.acesso.yahoo.com/