summaryrefslogtreecommitdiff
path: root/src/sp_config_utils.c
diff options
context:
space:
mode:
authorjvoisin2017-10-09 11:54:11 +0200
committerGitHub2017-10-09 11:54:11 +0200
commit7234fdbb0cb0dd45ed1d6e7814c91e596126ee25 (patch)
tree1b29ad0e25f37b55390d309fd0b7f4cd406cbb7a /src/sp_config_utils.c
parent50bb0ed72d5c221d40f16690d980db5e7ccee46a (diff)
Implement matching on the calltrace (#17)
* Implement matching on the calltrace
Diffstat (limited to '')
-rw-r--r--src/sp_config_utils.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/sp_config_utils.c b/src/sp_config_utils.c
index 3ea82d0..b0c7d3c 100644
--- a/src/sp_config_utils.c
+++ b/src/sp_config_utils.c
@@ -167,3 +167,23 @@ int array_to_list(char **name_ptr, sp_node_t **keys) {
167 *name_ptr = pestrdup(tmp, 1); 167 *name_ptr = pestrdup(tmp, 1);
168 return in_key; 168 return in_key;
169} 169}
170
171
172zend_always_inline sp_node_t *parse_functions_list(char *value) {
173 const char *sep = ">";
174
175 if (NULL == strchr(value, sep[0])) {
176 return NULL;
177 }
178
179 sp_node_t *list = sp_new_list();
180 char* tmp = strdup(value);
181 char* function_name;
182 char *next_token = tmp;
183 while ((function_name = strtok_r(NULL, sep, &next_token))) {
184 sp_list_prepend(list, strdup(function_name));
185 }
186 free(tmp);
187
188 return list;
189} \ No newline at end of file