Skip to content

Commit d70049c

Browse files
author
Ivan Dlugos
committed
explicitly declare C return type even for obx_err returning functions
1 parent 12aae0f commit d70049c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

objectbox/c.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,14 @@ def check_result(result, func, args):
212212
def fn(name: str, restype: type, argtypes):
213213
func = C.__getattr__(name)
214214

215+
func.argtypes = argtypes
216+
func.restype = restype
217+
215218
if restype is obx_err:
216219
func.errcheck = check_obx_err
217220
elif restype is not None:
218221
func.errcheck = check_result
219-
func.restype = restype
220222

221-
func.argtypes = argtypes
222223
return func
223224

224225

0 commit comments

Comments
 (0)