tolua is compatible with Lua 5.1.1?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

tolua is compatible with Lua 5.1.1?

jose marin2
Hello.

I would like to use tolua 5.0 (the original, not
tolua++) in a Lua 5.1.1 project.

It is compatible with the Lua 5.1.1 new gc?

Can I use tolua 5.0 safely on Lua 5.1.1?

Thanks




		
_______________________________________________________ 
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! 
http://br.mobile.yahoo.com/mailalertas/ 
 


Reply | Threaded
Open this post in threaded view
|

Re: tolua is compatible with Lua 5.1.1?

jose marin2
When compiling to Lua 5.1.1, tolua lacks 2 functions:
lua_unboxpointer, it's just a macro, easy to port and
lua_setgcthreshold.

What's the Lua 5.1.1 version of lua_setgcthreshold?




		
_______________________________________________________ 
Abra sua conta no Yahoo! Mail: 1GB de espaço, alertas de e-mail no celular e anti-spam realmente eficaz. 
http://mail.yahoo.com.br/

Reply | Threaded
Open this post in threaded view
|

Re: tolua is compatible with Lua 5.1.1?

jose marin2
Problems solved!

Just define the folowing

#define lua_unboxpointer(L,i)	(*(void
**)(lua_touserdata(L, i)))

(from Lua 5.0.3)


and subst lua_setgcthreshold(L,0) to lua_gc(L,
LUA_GCCOLLECT, 0) (thsi will force garbage
collection).

Sorry for this "noise", but this could be usefull to
someone else.




	



	
		
_______________________________________________________ 
Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/

Reply | Threaded
Open this post in threaded view
|

Re: tolua is compatible with Lua 5.1.1?

Fabian Peña
Can you send, where you are doing this?.
Thanks.