I've used boost::python in the past, but this problem has me stumped. Here's part of the class I'm having issues with:

        class Entity
{
public:
Entity();
~Entity();

//Call to check our collider against all entities that have "tag"
Collider* Collide(const std::string &tag);
};

and here is the boost::python code:

bp::class_< Entity_wrapper >( "Entity", bp::init< >() )    
        .def( 
            "Collide"
            , (::Monocle::Collider * ( ::Monocle::Entity::* )( ::std::string const & ) )( &::Monocle::Entity::Collide )
            , ( bp::arg("tag") ),
bp::return_value_policy<bp::reference_existing_object>() )

In python if I do something like this:

collider = entity.Collision("Paddle")

collider is a weakref to 'type' Not a Collider. My other functions that return pointers seem to be fine. Is it just the call policy I'm using? What Collide does is call a static function ("Collide") of the Collision class, which in turn returns a Collider* on success and NULL otherwise.

Any help would be appreciated! If you need anymore information, let me know!

--
Tom Rab