On Mittwoch 13 Januar 2010, Roman Yakovenko wrote: > On Wed, Jan 13, 2010 at 8:57 AM, blp330 <blp...@msn.com> wrote: > > class Document > > { > > public: > > .... > > > > bool operator==(const Document& other) const > > { > > return Compare(other); > > } > [...] > If I understand you right, you need: > > 1. define new global function, which takes Document& as the first argument > > bool Document_EqualWrap( const Document& x, const Document& y ){...}
Not necessary AFAIK, a member function should work, too. (i.e. directly exposing &Document::operator==) > 2. Expose it: > > ... > .def( "__eq__", &Document_EqualWrap ) > > Is not the working code, but it should give you a direction. Yes, I think that's what he was missing. -- Ciao, / / .o. /--/ ..o / / ANS ooo
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig