Generating data types automatically

Torsten Bronger bronger at physik.rwth-aachen.de
Mon Mar 14 06:09:44 EST 2005


Hallöchen!

Thomas Heller <theller at python.net> writes:

> Torsten Bronger <bronger at physik.rwth-aachen.de> writes:
>
>> I have to generate a lot of data types (for ctypes by the way).
>> An example is
>>
>> ViUInt32  = u_long
>> ViPUInt32 = POINTER(ViUInt32)
>> ViAUInt32 = ViPUInt32
>>
>> [...]
>
> Others have answered your question already, but I would like to
> note one thing: The POINTER() function caches its results, so you
> could (and should, imo) write 'POINTER(ViUInt32)' instead
> everywhere in your code.  Calling POINTER(ViUInt32) *allways*
> returns the same type.

Actually I don't think that we will use them (ViP...) at all, since
we'll make use of "byref" whereever they occur in an args list.

But they are in the spec that we try to mimic, and as long as I
don't know for sure that nobody uses them, they don't hurt.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus



More information about the Python-list mailing list