1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 11:43:13 +02:00

core: many improvements on hdata

New features:
- add optional hdata name for variables in hdata
- add plugin API functions: hdata_get_var_hdata
- use hashtable to store hdata (created by WeeChat and plugins)
- free hdata and infolists created by plugin on plugin unload
- free all hdata on exit
- add "free" option to command /debug hdata
- remove hdata for hooks
This commit is contained in:
Sebastien Helleu
2011-06-26 18:15:42 +02:00
parent 2a630031fd
commit 19bc95b961
58 changed files with 2049 additions and 3052 deletions
+10 -5
View File
@@ -40,6 +40,7 @@
#include "wee-config-file.h"
#include "wee-debug.h"
#include "wee-hashtable.h"
#include "wee-hdata.h"
#include "wee-hook.h"
#include "wee-input.h"
#include "wee-list.h"
@@ -1154,7 +1155,10 @@ COMMAND_CALLBACK(debug)
}
else if (string_strcasecmp (argv[1], "hdata") == 0)
{
debug_hdata ();
if ((argc > 2) && (string_strcasecmp (argv[2], "free") == 0))
hdata_free_all ();
else
debug_hdata ();
}
else if (string_strcasecmp (argv[1], "infolists") == 0)
{
@@ -4846,8 +4850,8 @@ command_init ()
N_("list"
" || set <plugin> <level>"
" || dump [<plugin>]"
" || buffer|color|hdata|infolists|memory|tags|term"
"|windows"),
" || buffer|color|infolists|memory|tags|term|windows"
" || hdata [free]"),
N_(" list: list plugins with debug levels\n"
" set: set debug level for plugin\n"
" plugin: name of plugin (\"core\" for WeeChat core)\n"
@@ -4857,7 +4861,8 @@ command_init ()
" buffer: dump buffer content with hexadecimal values "
"in log file\n"
" color: display infos about current color pairs\n"
" hdata: display infos about hdata\n"
" hdata: display infos about hdata (with free: remove "
"all hdata in memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" tags: display tags for lines\n"
@@ -4868,7 +4873,7 @@ command_init ()
" || dump %(plugins_names)|core"
" || buffer"
" || color"
" || hdata"
" || hdata free"
" || infolists"
" || memory"
" || tags"