From 59b3db273e6e628afb188681e178ea53d571b03d Mon Sep 17 00:00:00 2001 From: Ben Foster Date: Wed, 25 Oct 2017 22:25:30 +0100 Subject: Renames `sp_new_list` -> `sp_list_new` To be consistent with the rest of the `sp_list` functions. --- src/snuffleupagus.c | 6 +++--- src/sp_config_keywords.c | 4 ++-- src/sp_config_utils.c | 4 ++-- src/sp_list.c | 4 ++-- src/sp_list.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index 1c0455f..2cc31d8 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c @@ -82,9 +82,9 @@ PHP_GINIT_FUNCTION(snuffleupagus) { SP_INIT(snuffleupagus_globals->config.config_cookie_encryption); SP_INIT(snuffleupagus_globals->config.config_disabled_constructs); - snuffleupagus_globals->config.config_disabled_constructs->construct_include = sp_new_list(); - snuffleupagus_globals->config.config_disabled_functions->disabled_functions = sp_new_list(); - snuffleupagus_globals->config.config_disabled_functions_ret->disabled_functions = sp_new_list(); + snuffleupagus_globals->config.config_disabled_constructs->construct_include = sp_list_new(); + snuffleupagus_globals->config.config_disabled_functions->disabled_functions = sp_list_new(); + snuffleupagus_globals->config.config_disabled_functions_ret->disabled_functions = sp_list_new(); SP_INIT_HT(snuffleupagus_globals->config.config_cookie_encryption->names); diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index 3101ee1..569542c 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c @@ -259,7 +259,7 @@ int parse_disabled_functions(char *line) { } if (df->param && strchr(df->param, '[')) { // assume that this is an array - df->param_array_keys = sp_new_list(); + df->param_array_keys = sp_list_new(); if (0 != array_to_list(&df->param, &df->param_array_keys)) { pefree(df->param_array_keys, 1); return -1; @@ -268,7 +268,7 @@ int parse_disabled_functions(char *line) { } if (df->var && strchr(df->var, '[')) { // assume that this is an array - df->var_array_keys = sp_new_list(); + df->var_array_keys = sp_list_new(); if (0 != array_to_list(&df->var, &df->var_array_keys)) { pefree(df->var_array_keys, 1); return -1; diff --git a/src/sp_config_utils.c b/src/sp_config_utils.c index 62fb7c1..2e97ba8 100644 --- a/src/sp_config_utils.c +++ b/src/sp_config_utils.c @@ -179,7 +179,7 @@ zend_always_inline sp_node_t *parse_functions_list(char *value) { return NULL; } - sp_node_t *list = sp_new_list(); + sp_node_t *list = sp_list_new(); char* tmp = strdup(value); char* function_name; char *next_token = tmp; @@ -189,4 +189,4 @@ zend_always_inline sp_node_t *parse_functions_list(char *value) { free(tmp); return list; -} \ No newline at end of file +} diff --git a/src/sp_list.c b/src/sp_list.c index 112d822..c671f51 100644 --- a/src/sp_list.c +++ b/src/sp_list.c @@ -11,7 +11,7 @@ void sp_list_free(sp_node_t *node) { } } -sp_node_t *sp_new_list() { +sp_node_t *sp_list_new() { sp_node_t *new = pecalloc(sizeof(*new), 1, 1); new->next = new->data = new->head = NULL; return new; @@ -52,4 +52,4 @@ void sp_list_prepend(sp_node_t *list, void *data) { new->data = list->data; list->data = data; } -} \ No newline at end of file +} diff --git a/src/sp_list.h b/src/sp_list.h index 476c64c..dda139f 100644 --- a/src/sp_list.h +++ b/src/sp_list.h @@ -8,7 +8,7 @@ typedef struct sp_node_s { } sp_node_t; -sp_node_t *sp_new_list(); +sp_node_t *sp_list_new(); void sp_list_insert(sp_node_t *, void *); void sp_list_free(sp_node_t *); void sp_list_prepend(sp_node_t *, void *); -- cgit v1.3