lua-users home
lua-l archive

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/14/2010 9:02 PM, Tim Mensch wrote:
> On 12/13/2010 1:19 PM, Tim Mensch wrote:
>> On 12/11/2010 2:42 PM, Anders Backman wrote:
>>
>>> I would have to say, no. Not without some additional work.
>>> I have a modified tolua++ which supports our reference counting.
>>> I had to add a few macros:
>> And as far as that goes, it DOES look to me that toLua++ would support
>> at least the reference counted part, since it supports returning objects
>> by value, and you could tell it (as I said in my example) that the
>> shared_ptr<> "derived" from the class itself. 
> The result of the experiment is that, yes, toLua++ does handle boost
> smart pointers when set up as I described above...

Except that it doesn't handle them that way. My tests were incomplete
when I posted that; further testing of the generated code revealed that
it was doing the wrong thing..

My final solution was to add operator->() to tolua++, so that Boost
shared_ptr<> templates could be handled correctly; if anyone needs that
I'm glad to share it.

Tim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNDn58AAoJENSbqLBCyKKs2F8H/04eY9Cklgshoy1yOpO7O3YW
u7Evwt8hycYH/6o6n2rIntJEdUwHaI81tlW15ttQ5yk0cKvrSNTuD+vzqpQOMeH7
O/m3YUUGcOg5gwxUyXu7NQ46obAy0cemKOqICm7Go2ed5lQ+5eWk5pbdzqS5r3dd
c77YoO273RUIeAHPLNNm1TmVXH6xA2HfWEVpA+5omDnL/it2Mrt3wJ9WHJ99i3h0
N4pVmGJ6rYNfiaGix3b6TCbJebWOR3fAWvlvpRl45pgiSGgSV4SWjLHA1RcTZEeK
WSUQ0pX8d5oOl4mRd66+G893IvBDkOOC3fBIeLQKHjmK0rTQJT9CNO+2Q4cL5tk=
=TWO3
-----END PGP SIGNATURE-----