[vtk-developers] Wrappers and signed char
David Gobbi
dgobbi at atamai.com
Thu Jul 21 10:05:42 EDT 2005
Hi Brad,
I saw that you added "signed char" support to the wrappers. Adding new
types to the wrappers is good, but if you're not careful, you'll run out
of available types pretty fast! You're already up to 0xD, so only 0xE
and 0xF remain.
You added a new token for "signed char".
You should have added a token for "signed" so that "signed" and "char"
in combination would make a "signed char".
This is actually pretty easy to do, because "unsigned" is already in
there, you just have to duplicate the "unsigned" code in vtkParse.y and
have "signed" evaluate to "0x20".
Then, the wrappers will see the basic type as "char", and can check to
see if it is preceeded by "signed" in exactly the same way that they
check for "unsigned".
A side benefit of this is that the wrappers will no longer choke on
"signed int" or "signed short" etc., instead they will properly
interpret these as being the same as "int" and "short".
- David
More information about the vtk-developers
mailing list