[pygccxml-development] Comments on code in FT package
Brought to you by:
mbaas,
roman_yakovenko
|
From: Roman Y. <rom...@gm...> - 2006-10-20 19:49:53
|
Hi. I started to work on FT package, please don't work on it.
I just want to comment some code I saw, I fill this is important.
reftype = arg.type
if not (isinstance(reftype, declarations.reference_t) or
isinstance(reftype, declarations.pointer_t) ):
...
This is the wrong way to test for type being pointer or reference(
hint typedef ).
The right way is to use type traits functionality from declarations package:
reftype = arg.type
if not( declarations.is_reference( reftype ) \
or declarations.is_pointer( reftype ) ):
...
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
|