[pygccxml-development] Py++ typedef handling
Brought to you by:
mbaas,
roman_yakovenko
From: Patrick H. <pat...@pr...> - 2009-04-23 17:01:24
|
I have asked a couple of questions about typedef handling in the past, and I have yet another one: is there anything that I can do to force Py ++ to use the typedefs from the original code in function default argument values and in instance method return types? What I see is that the typedef gets used in some places but not others. I haven't identified a pattern to this yet, but I am sure that there is one. I have attached code that demonstrates the behavior that I see. test.cpp was generated on Windows using Py++ 1.0 and GCC-XML (emulating Visual C++ 9.0) built from its CVS repository as of April 21, 2009. I have added comments to the generated test.cpp where I see unexpected behavior. From looking at the output generated by GCC-XML, I think I understand how the typedef information used in template parameters gets lost, and that is unfortunate. Maybe there is some room to improve GCC-XML in this area. In case it matters, the use of 64-bit integers in the example is deliberate. Our code uses 64-bit types, and we use typedefs to mask the variation in the type declaration depending on operating system and bit width of the binary output. 64-bit integers are not the only type that has caused us problems, but this is the one that crops up most consistently. -Patrick -- Patrick L. Hartling Senior Software Engineer, Priority 5 http://www.priority5.com/ The information transmitted in this communication is intended only for the person or entity to which it is addressed and contains proprietary material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please destroy any copies, contact the sender and delete the material from any computer. |