List Info

Thread: Re: Py++ Error for function operator *()




Re: Py++ Error for function operator *()
user name
2007-06-12 12:52:23
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-bouncespython.org [mailto:c++-sig-bouncespython.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 <mharidevqualcomm.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/si
te-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-pa
ckages/pyplusplus
> /module_creator/creator.py", line 315, in create
>     self._adopt_free_operator( operator )
>   File
>
"/opt/or-tree/mharidev/thirdParty/lib/python2.4/site-pa
ckages/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/view
vc/pygccxml/pyplusplus_dev/unitt
ests/data/free_operators_to_be_exported.hpp?revision=1051&am
p;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++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

  
  
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )