From ec995ebef060569f0a2eef754842a0a03a113d53 Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Fri, 25 Jan 2019 11:32:49 -0800 Subject: [PATCH] _CBFUNC should be defined outside init_c_api, both because it doesn't depend on the C API and because it is used elsewhere and wasn't available globally as previously written --- bindings/python/fdb/impl.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bindings/python/fdb/impl.py b/bindings/python/fdb/impl.py index 1b1120027e..7adeedbbac 100644 --- a/bindings/python/fdb/impl.py +++ b/bindings/python/fdb/impl.py @@ -1284,6 +1284,7 @@ def optionalParamToBytes(v): _FDBBase.capi = _capi +_CBFUNC = ctypes.CFUNCTYPE(None, ctypes.c_void_p) def init_c_api(): _capi.fdb_select_api_version_impl.argtypes = [ctypes.c_int, ctypes.c_int] @@ -1327,8 +1328,6 @@ def init_c_api(): _capi.fdb_future_is_ready.argtypes = [ctypes.c_void_p] _capi.fdb_future_is_ready.restype = ctypes.c_int - _CBFUNC = ctypes.CFUNCTYPE(None, ctypes.c_void_p) - _capi.fdb_future_set_callback.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p] _capi.fdb_future_set_callback.restype = int _capi.fdb_future_set_callback.errcheck = check_error_code