lua-users home
lua-l archive

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


Date sent:      	Wed, 14 Jun 2000 11:57:55 -0300 (EST)
Send reply to:  	lua-l@tecgraf.puc-rio.br
From:           	Ville Sulko <Ville.Sulko@tpo.fi>
To:             	Multiple recipients of list <lua-l@tecgraf.puc-rio.br>
Subject:        	Re: Calling C++ class methods from lua ?
Organization:   	Tampere Telephone Plc

> > >From: Ville Sulko <vms@dubbi.atk.tpo.fi>
> > >what would be the best method for accessing C++ objects'
> > >methods from the lua code? Do I have to pass the objects this-pointer
> > >to the lua code as userdata and then write static wrappers in the C++
> > >class which take the userdata as an argument and then call the
> > >method of the given object (with parsed as given)?
> > 
> > From lua-l@tecgraf.puc-rio.br  Wed Jun 14 10:50:31 2000
> > tolua does this for you. see http://www.tecgraf.puc-rio.br/~celes/tolua/
> 
> Hmmm... It seems that tolua supports (not supprising, actually) only
> the stable version 3.2, at least it wouldn't compile out-of-the-box
> with lua 4 alpha. However I need the features of the version 4, most
> notably the support for multiple states... Maybe I could install the
> 3.2-version and try tolua out anyway, at least just to see how it
> does it's magic...
> 
> -Ville
> 
> 

There is an interface which works the other way, from C++ to Lua.

http://www.tecgraf.puc-rio.br/~celes/lua++/lua++.html

That is even older (Lua 2.5) and I was intending to ask if it would be 
updated?

John Fletcher

-------------------------------------------------------------------
Dr John P. Fletcher          Tel: (44) 121 359 3611 ext 4625
Chemical Engineering and Applied Chemistry (CEAC),
School of Engineering and Applied Science (SEAS),
Aston University,            Fax: (44) 121 359 4094
Aston Triangle,              Email: J.P.Fletcher@aston.ac.uk
BIRMINGHAM B4 7ET  U.K.      CEAC Web site http://www.ceac.aston.ac.uk/