[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Adopting lua for game scripting
- From: Jeremy Ong <jeremycong@...>
- Date: Mon, 24 Mar 2014 12:11:10 -0700
It's even better now.
sel::tie(difference, greeting) = state["subtract_and_hello"](1, 3)
Assuming state is an instance of sel::State.
On Mon, Mar 24, 2014 at 12:09 PM, Camilo Bravo Valdés
> On 3/24/14, Jeremy Ong <firstname.lastname@example.org> wrote:
>> As an additional plug, if you have a modern C++11 compiler, you're
>> encouraged to check out Selene . I used it for pretty much exactly
>> what you're doing. I recommend not using the native C api because you
>> give up type safety and keeping track of the stack can be a headache.
>> A good binding library will let the compiler do the work for you.
>>  https://github.com/jeremyong/Selene
> While reading through the article  that presents the library, I
> stumbled upon this:
> std::tie(difference, greeting) = l.Call<int,
> std::string>("subtract_and_hello", 1, 3);
> Is this actually doable with Selene? I haven't read the whole thing,
> but this syntax I find cute.
>  http://www.jeremyong.com/blog/2014/01/10/interfacing-lua-with-templates-in-c-plus-plus-11/
> -- Camilo