[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how does swig manages std::strings in Lua?
- From: Mark Gossage <mark@...>
- Date: Mon, 25 Feb 2008 03:03:00 +0000 (GMT)
Hello Luo Hei,
I wrote the code for std::string management in Lua.
As mentioned by others, the main goal was a direct mapping from Lua strings to std::string.
So that
std::string some_func(std::string)
would be accept and return Lua strings.
It also managed const std::string& without issue as well.
I have added a fairly basic wrapper for the std::string class as well, but normally you don't need it. Its easier to manipulate the strings in Lua than std::string.
Any other questions?
Regards,
Mark
Well, thats the question. I would like to pass strings to lua scripts
via swig generated wrappers. Can i use std::string or should I fall back
to C style
strings?
Sent from Yahoo! Mail.
A Smarter Inbox.