[C++-sig] Py++ Error for function operator *()

Haridev, Meghana mharidev at qualcomm.com
Tue Jun 12 19:41:36 CEST 2007


Hi Roman,
I have attached the files that reproduce this bug. These are modified
versions of the files: 
pyplusplus/unittests/data/free_operators_to_be_exported.hpp and
corresponding Py++ code in pyplusplus/unittests/free_operators_tester.py


Note that I get the assertion error when I want to do the following in
the Py++ code.
#Exclude all classes first - say I want to expose just one class later
and #want to get rid of all the other classes from being exposed
mb.classes().exclude()
#just expose one class: testclass
mb.class_("testclass").include()

-----------------------------------------------------
Traceback (most recent call last):
  File "/opt/data/pyplusplus/unittests/fundamental_tester_base.py", line
147, in test
    self._create_extension_source_file()
  File "/opt/data/pyplusplus/unittests/fundamental_tester_base.py", line
94, in _create_extension_source_file
    mb.build_code_creator( self.__module_name,
doc_extractor=doc_extractor )
  File "./../pyplusplus/module_builder/builder.py", line 247, in
build_code_creator
  File "./../pyplusplus/module_creator/creator.py", line 316, in create
  File "./../pyplusplus/module_creator/creator.py", line 186, in
_adopt_free_operator
AssertionError
-----------------------------------------------------

Thanks, 
Meghana.

-----Original Message-----
From: c++-sig-bounces at python.org [mailto:c++-sig-bounces at python.org] On
Behalf Of Roman Yakovenko
Sent: Sunday, June 10, 2007 1:04 PM
To: Development of Python/C++ integration
Subject: Re: [C++-sig] Py++ Error for function operator *()

On 6/7/07, Haridev, Meghana <mharidev at qualcomm.com> wrote:
> When I moved from Py++ 0.8.5 to Py++ 0.9.0, Py++ fails for the
following
> function declaration during the module_builder's build_code_creator()
> phase:
>
> operator * (const ACE_Time_Value &tv, double d)
> {
>    //.....
> }
>
> Here's the Error message:
>
>     self.moduleBuilder.build_code_creator(self.moduleName,
> create_casting_constructor=flag_casting_constr)
>   File
>
"/opt/data/BTBLD_rhine_1080/thirdParty/lib/python2.4/site-packages/pyplu
> splus/module_builder/builder.py", line 247, in build_code_creator
>     self.__code_creator = creator.create()
>   File
>
"/opt/or-tree/mharidev/thirdParty/lib/python2.4/site-packages/pyplusplus
> /module_creator/creator.py", line 315, in create
>     self._adopt_free_operator( operator )
>   File
>
"/opt/or-tree/mharidev/thirdParty/lib/python2.4/site-packages/pyplusplus
> /module_creator/creator.py", line 185, in _adopt_free_operator
>     assert isinstance( arg_type, declarations.declarated_t )
> AssertionError

Hi. I tried to reproduce the bug, but failed.

Here is the link to test case:
http://pygccxml.svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/unitt
ests/data/free_operators_to_be_exported.hpp?revision=1051&view=markup

I am testing the current version, but it is not that different from the
0.9.0.

Can you modify the test to reproduce the bug? If not you can send me
privately gccxml generated file and the Py++ script.


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
_______________________________________________
C++-sig mailing list
C++-sig at python.org
http://mail.python.org/mailman/listinfo/c++-sig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: free_operators_to_be_exported.hpp
Type: application/octet-stream
Size: 731 bytes
Desc: free_operators_to_be_exported.hpp
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070612/654440b7/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: free_operators_tester.py
Type: application/octet-stream
Size: 1015 bytes
Desc: free_operators_tester.py
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070612/654440b7/attachment-0001.obj>


More information about the Cplusplus-sig mailing list