Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python
ctypes details was: Re: syntax for code blocks
 

Index | Next | Previous | View Flat


mwilson at the-wire

Apr 30, 2012, 8:42 AM


Views: 334
Permalink
ctypes details was: Re: syntax for code blocks

> On 4/30/2012 17:02, Kiuhnm wrote:
>> BignumTypePtr = ctypes.POINTER(BignumType)
>>
>> for op, op_word in ((libbnem.BN_add, libbnem.BN_add_word),
>> (libbnem.BN_sub, libbnem.BN_sub_word)):
>> op.argtypes = [BignumTypePtr] * 3
>> op_word.argtypes = [BignumTypePtr, ctypes.c_ulong]
>> op.restype = op_word.restype = ctypes.c_int
>
> On second thought, BignumPtrType is probably the right name.

(Way off the original topic, aren't we?) I haven't looked inside ctypes,
and don't know what kind of thing ctypes.POINTER actually constructs. I was
worried about falling into a [[a]]*3 kind of error -- unwittingly sharing a
mutable object. I guess I really should look.

Mel.

--
http://mail.python.org/mailman/listinfo/python-list

Subject User Time
ctypes details was: Re: syntax for code blocks mwilson at the-wire Apr 30, 2012, 8:42 AM
    Re: ctypes details was: Re: syntax for code blocks kiuhnm03.4t.yahoo.it at mail Apr 30, 2012, 8:54 AM
        Re: ctypes details was: Re: syntax for code blocks mwilson at the-wire Apr 30, 2012, 9:05 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.