File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -329,12 +329,23 @@ def build_typeinfo(self, typeinfo):
329
329
typeinfo .wrapper_type = const + 'void*'
330
330
331
331
def call_cdef_param_setup (self , typeinfo , name ):
332
+ if typeinfo .flags .out :
333
+ return ("{0}{1.CFFI_PARAM_SUFFIX} = ffi.new('void**')"
334
+ .format (name , typeinfo ))
335
+
336
+ if typeinfo .flags .inout :
337
+ return """\
338
+ {0}{1.CFFI_PARAM_SUFFIX} = ffi.new('void**', {0})
339
+ """ .format (name , typeinfo )
340
+
332
341
return name + typeinfo .CFFI_PARAM_SUFFIX + ' = ' + name
333
342
334
343
def convert_variable_cpp_to_c (self , typeinfo , name ):
335
344
return name
336
345
337
346
def convert_variable_c_to_py (self , typeinfo , name ):
347
+ if typeinfo .flags .out or typeinfo .flags .inout :
348
+ return '%s%s[0]' % (name , typeinfo .CFFI_PARAM_SUFFIX )
338
349
return name
339
350
340
351
def user_cpp_param_inline (self , typeinfo , name ):
You can’t perform that action at this time.
0 commit comments