[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Struggling with userdata concepts
- From: Miles Bader <miles@...>
- Date: Mon, 29 Aug 2011 14:03:25 +0900
Jeff Smith <firstname.lastname@example.org> writes:
> Thanks for the suggestion, but I am already using SWIG in the embedded
> project I am working on. I chose Swig as it had the advantage of not
> having any Windows dependencies, so it was pretty easy to use in an
> embedded environment. I have found it has some limitations, for example
> as far as I can see it cannot really handle arrays of data, hence my
> question here.
Hmm, SWIG's default handling of arrays isn't so great, but it allows
enough customization that they can be accomodated ("table on the Lua
side, C-style array and count argument or std::vector on the C/C++
side") with some custom typemaps and code.
[There are SWIG bugs that make this a little annoying in some cases, at
least in some versions of SWIG though...]
For my attempts at doing some of this look at
and search for "[" or "std::vector".
"Yorton, Wressle, and Gospel Oak, the richness of your heritage is ended.
We shall not stop at you again; for Dr Beeching stops at nothing."