Skip to content
Snippets Groups Projects
Commit c80c059b authored by alexey.stratulat's avatar alexey.stratulat
Browse files

[+] Added function remove plugin from list by the name of the plugin.

parent 71f4262d
No related branches found
No related tags found
1 merge request!27Support update sdk and merge plugins repo
......@@ -31,6 +31,7 @@ dap_chain_plugin_list_module_t* dap_chain_plugins_list_get();
bool dap_chain_plugins_list_check_load_plugins(dap_chain_plugins_list_char_t *list);
void dap_chain_plugins_list_add(PyObject *module, const char *name);
void dap_chain_plugins_list_name_del(const char *name);
#ifdef __cplusplus
extern "C" {
......
......@@ -38,3 +38,20 @@ bool dap_chain_plugins_list_check_load_plugins(dap_chain_plugins_list_char_t *li
return true;
}
void dap_chain_plugins_list_name_del(const char *name){
dap_chain_plugin_list_module_t *plugin;
dap_chain_plugin_list_module_t *tmp;
bool plugin_searcging = false;
LL_FOREACH_SAFE(m_dap_chain_plugins_module_list, plugin, tmp){
if (strcmp(plugin->name, name) == 0){
DAP_FREE(plugin->name);
Py_XDECREF(plugin->obj_module);
LL_DELETE(m_dap_chain_plugins_module_list, plugin);
plugin_searcging = true;
}
}
if (!plugin_searcging){
log_it(L_WARNING, "Can't searching plugins %s for delete", name);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment