Comment 2 for bug 570683

Revision history for this message
Gustavo Carneiro (gjc) wrote :

Hi. Sorry for not merging this yet. I had look at the patch a long time ago, found something wrong, wanted to fix it myself, but then I ran out of time.

IIRC, one thing I found wrong is:

 class UnsignedIntPtrParam(PointerParameter):

     DIRECTIONS = [Parameter.DIRECTION_IN, Parameter.DIRECTION_OUT, Parameter.DIRECTION_INOUT]
- CTYPES = ['unsigned int*', 'uint32_t*']
+ CTYPES = ['uint32_t*', 'unsigned int*', 'unsigned long*', 'long unsigned*', 'long unsigned int*', 'unsigned long int*']

The problem is that "unsigned long" is a 64-bit integer on LP64 platforms (64-bit linux, for instance), and 32-bit one in ILP32 (32-bit system) or LLP64 (64-bit Windows). So we really can't mix "long int" and "int".

I think there was something wrong in the gccxmlparser.py part, but I don't remember exactly what it was. I hope to eventually find time to review this patch. If you're in a hurry to get this in, one thing that can help is the inclusion of unit tests to exercise this new array field functionality.