[C++-sig] Bugs with Pyste and vector_indexing_suite.
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Tue Aug 19 04:49:43 CEST 2003
Hi,
Three bugs.
1. The issue with vector_indexing_suite and exposing
std::vector<bool> still remains. I've patched my local copy with
the fix that Joel posted but this is not yet in CVS. Would
appreciate if this could be fixed in CVS. Thanks!
2. Pyste from CVS has problems I have not had the time to track it
down and reduce it to a small problem but the problem is with the
declarations.py. Some of the methods do not appear to have the
'throws' attribute. I get errors like this:
Traceback (most recent call last):
File "/usr/local/bin/pyste.py", line 5, in ?
pyste.main()
File "/usr/local/stow/pyste/lib/python2.2/site-packages/Pyste/pyste.py", line
367, in main
status = Begin()
File "/usr/local/stow/pyste/lib/python2.2/site-packages/Pyste/pyste.py", line
213, in Begin
return GenerateCode(parser, module, out, interfaces, multiple)
File "/usr/local/stow/pyste/lib/python2.2/site-packages/Pyste/pyste.py", line
334, in GenerateCode
export.GenerateCode(codeunit, exported_names)
File "/usr/local/stow/pyste/lib/python2.2/site-packages/Pyste/Exporter.py", li
ne 45, in GenerateCode
self.Export(codeunit, exported_names)
File "/usr/local/stow/pyste/lib/python2.2/site-packages/Pyste/ClassExporter.py
", line 88, in Export
self.InheritMethods(exported_names)
File "/usr/local/stow/pyste/lib/python2.2/site-packages/Pyste/ClassExporter.py
", line 116, in InheritMethods
pointers = [x.PointerDeclaration(True) for x in self.class_ if isinstance(x,
Method)]
File "./declarations.py", line 313, in PointerDeclaration
File "./declarations.py", line 213, in Exceptions
AttributeError: 'Method' object has no attribute 'throws'
I quietly fixed them (without looking for the cause) by changing
this in declarations.py:
212 def Exceptions(self):
213 if self.throws is None:
214 return ""
to:
212 def Exceptions(self):
213 if not hasattr(self, 'throws') or self.throws is None:
214 return ""
It seems to work fine with this. Sorry, I can't give you a
specific test case.
3. Pyste also has problems with Include and Import used together. I
again don't have a small test case but perhaps Nicodemus will be
able to figure this one out. Essentially if I add an
Include(...) after an Import(...) nothing gets included. However
if I place the Include before the Import, everything seems to
work OK.
Thanks and sorry for the lack of specific test cases. I'm really
short on time now.
cheers,
prabhu
More information about the Cplusplus-sig
mailing list