Re: [pygccxml-development] improving user experience
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <ba...@ir...> - 2006-07-24 08:47:17
|
Roman Yakovenko wrote: > On 7/23/06, Matthias Baas <ba...@ir...> wrote: >> Declaration "MTime & MTime::operator--(int arg0) [member_operator]" >> could not be exported. >> "operator--" is not supported. >> See Boost.Python documentation: >> http://www.boost.org/libs/python/doc/v2/operators.html#introduction. >> >> Declaration "MTime & MTime::operator--(int arg0) [member_operator]": >> Function "MTime & MTime::operator--(int arg0) [member_operator]" takes >> as argument (name=arg0, pos=0 ) non-const reference to C++ fundamental >> type - function could not be called from Python. > > Matthias, I tried to reproduce this bug, but I cannot. Can you create > small test case? Well, I also get the warnings when I just try to wrap this minimal example: class Foo { public: Foo& operator--(int a); }; Here are the warnings: WARNING Declaration "Foo & Foo::operator--(int a) [member_operator]" could not be exported. "operator--" is not supported. See Boost.Python documentation: http://www.boost.org/libs/python/doc/v2/operators.html#introduction. WARNING Declaration "Foo & Foo::operator--(int a) [member_operator]": Function "Foo & Foo::operator--(int a) [member_operator]" takes as argument (name=a, pos=0 ) non-const reference to C++ fundamental type - function could not be called from Python. I don't know if it's of any help but here's the XML output from gccxml v0.6.0: <?xml version="1.0"?> <GCC_XML> <Namespace id="_1" name="::" members="_3 " mangled="_Z2::"/> <Namespace id="_2" name="std" context="_1" members="" mangled="_Z3std"/> <Class id="_3" name="Foo" context="_1" mangled="3Foo" location="f0:6" file="f0" line="6" members="_4 _5 _6 " bases=""/> <Constructor id="_4" name="Foo" artificial="1" throw="" context="_3" mangled="_ZN3FooC1ERKS_ *INTERNAL* " location="f0:6" file="f0" line="6"> <Argument name="_ctor_arg" type="_7"/> </Constructor> <Constructor id="_5" name="Foo" artificial="1" throw="" context="_3" mangled="_ZN3FooC1Ev *INTERNAL* " location="f0:6" file="f0" line="6"/> <OperatorMethod id="_6" name="--" returns="_8" context="_3" mangled="_ZN3FoommEi" location="f0:8" file="f0" line="8" extern="1"> <Argument name="a" type="_9"/> </OperatorMethod> <ReferenceType id="_7" type="_3c"/> <ReferenceType id="_8" type="_3"/> <FundamentalType id="_9" name="int"/> <CvQualifiedType id="_3c" type="_3" const="1"/> <File id="f0" name="source.h"/> </GCC_XML> By the way, the second message does not appear when I remove the reference from the return value, so it seems pyplusplus somehow mixes those up. - Matthias - |