static XS (XS_Xchat_Embed_plugingui_remove) { void *gui_entry; dXSARGS; if (items != 1) { hexchat_print (ph, "Usage: Xchat::Embed::plugingui_remove(handle)"); } else { gui_entry = INT2PTR (void *, SvUV (ST (0))); hexchat_plugingui_remove (ph, gui_entry); } XSRETURN_EMPTY; }
static void destroy_script(script_info *info) { if (info) { g_clear_pointer(&info->hooks, g_ptr_array_unref); g_clear_pointer(&info->unload_hooks, g_ptr_array_unref); g_clear_pointer(&info->state, lua_close); if (info->handle) hexchat_plugingui_remove(ph, info->handle); g_free(info->filename); g_free(info->name); g_free(info->description); g_free(info->version); g_free(info); } }