Ah-ha

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Ah-ha

Josh Klint

Here’s the solution to my previous problem:

 

      void Interpreter::PushObject(Object* o)

      {

            luabind::object lo = luabind::object(L,o);

            lo.push(L);

            lo = luabind::object(luabind::from_stack(L,-1));

            Object* test = luabind::object_cast<Object*>(lo);

            if  (o != test)

            {

                  Notify("Doesn't match!");

            }

      }

 

 

Best Regards,

 

Josh Klint

CEO

Leadwerks Software

www.leadwerks.com

 


------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

g++ 4.5 and luabind downcasting bug

Nigel Atkinson-2
I think I've found a regression in luabind 0.9 between using g++ 4.4.5
and 4.5.2 (installed with Ubuntu 11.04).

The 4.4.5 version works as I expect.

When using the later version, the down-casting seems to only work for
the last derived class bound.

I've attached a program that shows the problem and the output I get from
compiling it with each.

Nigel



------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user

g++-4.4.5.txt (114 bytes) Download Attachment
g++-4.5.2.txt (116 bytes) Download Attachment
main.cpp (1K) Download Attachment