summaryrefslogtreecommitdiff
path: root/src/plugins/fset/fset-command.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-06-28 19:59:45 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-06-28 19:59:45 +0200
commit987ef9e45485fac3de052ee81ef0678296bbd86c (patch)
treebfede195a27fda79d9bc6d617368e857a0f3648a /src/plugins/fset/fset-command.c
parentf851246ff667a5ab9fb03675a368988028180f9c (diff)
downloadweechat-987ef9e45485fac3de052ee81ef0678296bbd86c.zip
fset: replace hashtable by a simple structure for max length of fields
Diffstat (limited to 'src/plugins/fset/fset-command.c')
-rw-r--r--src/plugins/fset/fset-command.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/fset/fset-command.c b/src/plugins/fset/fset-command.c
index 8cc72e6f9..ee2fef084 100644
--- a/src/plugins/fset/fset-command.c
+++ b/src/plugins/fset/fset-command.c
@@ -459,7 +459,8 @@ fset_command_run_set_cb (const void *pointer, void *data,
const char *ptr_condition;
int rc, argc, old_count_marked, old_buffer_selected_line, condition_ok;
struct t_arraylist *old_options;
- struct t_hashtable *old_max_length_field, *eval_extra_vars, *eval_options;
+ struct t_fset_option_max_length *old_max_length;
+ struct t_hashtable *eval_extra_vars, *eval_options;
/* make C compiler happy */
(void) pointer;
@@ -495,8 +496,8 @@ fset_command_run_set_cb (const void *pointer, void *data,
old_options = fset_options;
fset_options = fset_option_get_arraylist_options ();
old_count_marked = fset_option_count_marked;
- old_max_length_field = fset_option_max_length_field;
- fset_option_max_length_field = fset_option_get_hashtable_max_length_field ();
+ old_max_length = fset_option_max_length;
+ fset_option_max_length = fset_option_get_max_length ();
old_filter = (fset_option_filter) ? strdup (fset_option_filter) : NULL;
fset_option_set_filter ((argc > 1) ? argv[1] : NULL);
old_buffer_selected_line = fset_buffer_selected_line;
@@ -543,8 +544,8 @@ fset_command_run_set_cb (const void *pointer, void *data,
{
if (old_options)
weechat_arraylist_free (old_options);
- if (old_max_length_field)
- weechat_hashtable_free (old_max_length_field);
+ if (old_max_length)
+ free (old_max_length);
if (old_filter)
free (old_filter);
@@ -562,8 +563,8 @@ fset_command_run_set_cb (const void *pointer, void *data,
weechat_arraylist_free (fset_options);
fset_options = old_options;
fset_option_count_marked = old_count_marked;
- weechat_hashtable_free (fset_option_max_length_field);
- fset_option_max_length_field = old_max_length_field;
+ free (fset_option_max_length);
+ fset_option_max_length = old_max_length;
fset_option_set_filter (old_filter);
if (old_filter)
free (old_filter);