Add API for structure
This commit is contained in:
parent
f1e10e849f
commit
184e4ea1a1
5 changed files with 109 additions and 12 deletions
|
|
@ -7,6 +7,7 @@ int = Type.int(32)
|
|||
int16 = short
|
||||
int32 = int
|
||||
int64 = Type.int(64)
|
||||
|
||||
float = Type.float()
|
||||
double = Type.double()
|
||||
|
||||
|
|
@ -15,3 +16,14 @@ double = Type.double()
|
|||
pointer = Type.pointer
|
||||
|
||||
void_p = pointer(char)
|
||||
|
||||
# platform dependent
|
||||
|
||||
def _determine_pointer_size():
|
||||
from ctypes import sizeof, c_void_p
|
||||
return sizeof(c_void_p) * 8
|
||||
|
||||
pointer_size = _determine_pointer_size()
|
||||
|
||||
intp = {32: int32, 64: int64}[pointer_size]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue