def _key_for_each_helper(keymap, key, data): l = ffi.from_handle(data) l.append(key)
def _log_handler(user_data, level, message): context = ffi.from_handle(user_data) if context._log_fn: context._log_fn(context, level, ffi.string(message).decode('utf8'))