use typedefs when constructing structs
This commit is contained in:
parent
d3fcb40408
commit
11c5b1a728
2 changed files with 3 additions and 1 deletions
|
@ -126,7 +126,7 @@ def _make_struct_constructor_function(struct):
|
|||
or isinstance(arg, (array, bytes, bytearray, memoryview)))):
|
||||
arg = ffi.from_buffer(field[1].type, arg)
|
||||
modified_args.append(arg)
|
||||
s = ffi.new(f"struct {struct} *", modified_args)[0]
|
||||
s = ffi.new(f"{struct} *", modified_args)[0]
|
||||
global_weakkeydict[s] = modified_args
|
||||
return s
|
||||
|
||||
|
|
Reference in a new issue