I have pyplusplus churning out code, now I'm trying to get it to resemble
what I need. I need to use add_override_precall_code, to add some thread
locking to my overrides, but I can't seem to figure out how to use it from
the docs. Also, I have a set of overloaded virtual functions, and previously
I've had a wrapper class where the python exports rename the overloads, like
so:

class Connection
{
    virtual void Callback(const Type_A&);
    virtual void Callback(const Type_B&);
}

the wrapper looked like:

ConnectionWrap : Connection, wrapper<Connection>
{
    void Callback(const Type_A& arg)
    {
        ScopedGILLock lock(m_state); // the reason I'm trying to figure out
add_override_porecall_code
        if (override o = this->get_override("Callback_Type_A"))
        { o(arg);  }
    }
};


I'm getting the rest of the override as above, but setting
use_overload_macro doesn't rename the overloads as I need. Any clues (since
pointers are references are both 'overloaded' in this context')
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to