We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 422b290 commit df82e9bCopy full SHA for df82e9b
pyray/__init__.py
@@ -13,6 +13,7 @@
13
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
14
15
from raylib import rl, ffi
16
+from ctypes import c_int, c_float, c_double, c_uint
17
from inspect import ismethod,getmembers,isbuiltin
18
import inflection
19
@@ -70,11 +71,13 @@ def to_str(value):
70
71
return ffi.string(value).decode('utf-8')
72
73
def to_pointer(value):
- return ffi.addressof(value)
74
+ if str(type(value)) == "<class '_cffi_backend.__CDataOwn'>":
75
+ return ffi.addressof(value)
76
+ return value
77
78
79
def makeFunc(c_func):
- #print("makefunc ",a, ffi.typeof(a).args)
80
+ #print("makefunc ", c_func, ffi.typeof(c_func).args)
81
82
# based on ctypes of arguments of the c function
83
# we build a list of converters to call on python function arguments
0 commit comments