File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 13
13
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
14
14
15
15
from raylib import rl , ffi
16
+ from ctypes import c_int , c_float , c_double , c_uint
16
17
from inspect import ismethod ,getmembers ,isbuiltin
17
18
import inflection
18
19
@@ -70,11 +71,13 @@ def to_str(value):
70
71
return ffi .string (value ).decode ('utf-8' )
71
72
72
73
def to_pointer (value ):
73
- return ffi .addressof (value )
74
+ if str (type (value )) == "<class '_cffi_backend.__CDataOwn'>" :
75
+ return ffi .addressof (value )
76
+ return value
74
77
75
78
76
79
def makeFunc (c_func ):
77
- #print("makefunc ",a , ffi.typeof(a ).args)
80
+ #print("makefunc ", c_func , ffi.typeof(c_func ).args)
78
81
79
82
# based on ctypes of arguments of the c function
80
83
# we build a list of converters to call on python function arguments
You can’t perform that action at this time.
0 commit comments