//export prescan_cb func prescan_cb(fd C.int, ftype *C.char, context unsafe.Pointer) C.cl_error_t { v := callbackFuncs["prescan"] if v == nil { return Clean } ctx := findContext(uintptr(context)) return C.cl_error_t(v.(CallbackPreScan)(int(fd), C.GoString(ftype), ctx)) }
//export postscan_cb func postscan_cb(fd, result C.int, virname *C.char, context unsafe.Pointer) C.cl_error_t { v := callbackFuncs["postscan"] if v == nil { return Clean } ctx := findContext(uintptr(context)) return C.cl_error_t(v.(CallbackPostScan)(int(fd), ErrorCode(result), C.GoString(virname), ctx)) }
//export precache_cb func precache_cb(fd C.int, ftype *C.char, context unsafe.Pointer) C.cl_error_t { fn := callbackFuncs["precache"] if fn == nil { return Clean } ctx := findContext(uintptr(context)) return C.cl_error_t(fn.(CallbackPreCache)(int(fd), C.GoString(ftype), ctx)) }