diff options
| author | Ben Foster | 2017-10-25 22:25:30 +0100 |
|---|---|---|
| committer | Ben Foster | 2017-10-26 21:14:00 +0100 |
| commit | 59b3db273e6e628afb188681e178ea53d571b03d (patch) | |
| tree | ce000e1cf87ea9c206bc81e2b958173e28f7c464 /src | |
| parent | eab3fb2fd6e6e827327a4971b3371fb67a7d8600 (diff) | |
Renames `sp_new_list` -> `sp_list_new`
To be consistent with the rest of the `sp_list` functions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/snuffleupagus.c | 6 | ||||
| -rw-r--r-- | src/sp_config_keywords.c | 4 | ||||
| -rw-r--r-- | src/sp_config_utils.c | 4 | ||||
| -rw-r--r-- | src/sp_list.c | 4 | ||||
| -rw-r--r-- | 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) { | |||
| 82 | SP_INIT(snuffleupagus_globals->config.config_cookie_encryption); | 82 | SP_INIT(snuffleupagus_globals->config.config_cookie_encryption); |
| 83 | SP_INIT(snuffleupagus_globals->config.config_disabled_constructs); | 83 | SP_INIT(snuffleupagus_globals->config.config_disabled_constructs); |
| 84 | 84 | ||
| 85 | snuffleupagus_globals->config.config_disabled_constructs->construct_include = sp_new_list(); | 85 | snuffleupagus_globals->config.config_disabled_constructs->construct_include = sp_list_new(); |
| 86 | snuffleupagus_globals->config.config_disabled_functions->disabled_functions = sp_new_list(); | 86 | snuffleupagus_globals->config.config_disabled_functions->disabled_functions = sp_list_new(); |
| 87 | snuffleupagus_globals->config.config_disabled_functions_ret->disabled_functions = sp_new_list(); | 87 | snuffleupagus_globals->config.config_disabled_functions_ret->disabled_functions = sp_list_new(); |
| 88 | 88 | ||
| 89 | SP_INIT_HT(snuffleupagus_globals->config.config_cookie_encryption->names); | 89 | SP_INIT_HT(snuffleupagus_globals->config.config_cookie_encryption->names); |
| 90 | 90 | ||
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) { | |||
| 259 | } | 259 | } |
| 260 | 260 | ||
| 261 | if (df->param && strchr(df->param, '[')) { // assume that this is an array | 261 | if (df->param && strchr(df->param, '[')) { // assume that this is an array |
| 262 | df->param_array_keys = sp_new_list(); | 262 | df->param_array_keys = sp_list_new(); |
| 263 | if (0 != array_to_list(&df->param, &df->param_array_keys)) { | 263 | if (0 != array_to_list(&df->param, &df->param_array_keys)) { |
| 264 | pefree(df->param_array_keys, 1); | 264 | pefree(df->param_array_keys, 1); |
| 265 | return -1; | 265 | return -1; |
| @@ -268,7 +268,7 @@ int parse_disabled_functions(char *line) { | |||
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | if (df->var && strchr(df->var, '[')) { // assume that this is an array | 270 | if (df->var && strchr(df->var, '[')) { // assume that this is an array |
| 271 | df->var_array_keys = sp_new_list(); | 271 | df->var_array_keys = sp_list_new(); |
| 272 | if (0 != array_to_list(&df->var, &df->var_array_keys)) { | 272 | if (0 != array_to_list(&df->var, &df->var_array_keys)) { |
| 273 | pefree(df->var_array_keys, 1); | 273 | pefree(df->var_array_keys, 1); |
| 274 | return -1; | 274 | 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) { | |||
| 179 | return NULL; | 179 | return NULL; |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | sp_node_t *list = sp_new_list(); | 182 | sp_node_t *list = sp_list_new(); |
| 183 | char* tmp = strdup(value); | 183 | char* tmp = strdup(value); |
| 184 | char* function_name; | 184 | char* function_name; |
| 185 | char *next_token = tmp; | 185 | char *next_token = tmp; |
| @@ -189,4 +189,4 @@ zend_always_inline sp_node_t *parse_functions_list(char *value) { | |||
| 189 | free(tmp); | 189 | free(tmp); |
| 190 | 190 | ||
| 191 | return list; | 191 | return list; |
| 192 | } \ No newline at end of file | 192 | } |
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) { | |||
| 11 | } | 11 | } |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | sp_node_t *sp_new_list() { | 14 | sp_node_t *sp_list_new() { |
| 15 | sp_node_t *new = pecalloc(sizeof(*new), 1, 1); | 15 | sp_node_t *new = pecalloc(sizeof(*new), 1, 1); |
| 16 | new->next = new->data = new->head = NULL; | 16 | new->next = new->data = new->head = NULL; |
| 17 | return new; | 17 | return new; |
| @@ -52,4 +52,4 @@ void sp_list_prepend(sp_node_t *list, void *data) { | |||
| 52 | new->data = list->data; | 52 | new->data = list->data; |
| 53 | list->data = data; | 53 | list->data = data; |
| 54 | } | 54 | } |
| 55 | } \ No newline at end of file | 55 | } |
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 { | |||
| 8 | 8 | ||
| 9 | } sp_node_t; | 9 | } sp_node_t; |
| 10 | 10 | ||
| 11 | sp_node_t *sp_new_list(); | 11 | sp_node_t *sp_list_new(); |
| 12 | void sp_list_insert(sp_node_t *, void *); | 12 | void sp_list_insert(sp_node_t *, void *); |
| 13 | void sp_list_free(sp_node_t *); | 13 | void sp_list_free(sp_node_t *); |
| 14 | void sp_list_prepend(sp_node_t *, void *); | 14 | void sp_list_prepend(sp_node_t *, void *); |
