void * grn_plugin_sym(grn_ctx *ctx, grn_id id, const char *symbol) { grn_plugin *plugin; grn_dl_symbol func; if (id == GRN_ID_NIL) { return NULL; } CRITICAL_SECTION_ENTER(grn_plugins_lock); if (!grn_hash_get_value(&grn_gctx, grn_plugins, id, &plugin)) { func = NULL; goto exit; } grn_dl_clear_error(); if (!(func = grn_dl_sym(plugin->dl, symbol))) { const char *label; label = grn_dl_sym_error_label(); SERR("%s", label); } exit: CRITICAL_SECTION_LEAVE(grn_plugins_lock); return func; }
void * grn_plugin_sym(grn_ctx *ctx, grn_id id, const char *symbol) { grn_plugin *plugin; grn_dl_symbol func; if (!grn_hash_get_value(ctx, grn_plugins, id, &plugin)) { return NULL; } grn_dl_clear_error; if (!(func = grn_dl_sym(plugin->dl, symbol))) { const char *label; label = grn_dl_sym_error_label; SERR(label); } return func; }