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

Haridev, Meghana mharidev at qualcomm.com
Tue Jun 12 19:52:23 CEST 2007


Hi Roman,

Here's another use-case for which I get another error "IndexError" at
the same location in addition to the "Assertion Error":
File "./../pyplusplus/module_creator/creator.py", line 182, in
_adopt_free_operator 

I am attaching another set of files free_operators_to_be_exported.hpp
and corresponding Py++ code free_operators_tester.py to reproduce the
IndexError.

Note that in this case also, I get the index 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()

---------------------------------------------------------
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 182, in
_adopt_free_operator
IndexError: list index out of range
---------------------------------------------------------

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: 884 bytes
Desc: free_operators_to_be_exported.hpp
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070612/b89e1c4c/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/b89e1c4c/attachment-0001.obj>


More information about the Cplusplus-sig mailing list