summaryrefslogtreecommitdiff
path: root/src/sp_disabled_functions.h
diff options
context:
space:
mode:
authorxXx-caillou-xXx2018-07-13 10:36:50 +0200
committerjvoisin2018-07-13 08:36:50 +0000
commit7963580d72a358975133f86f01de2d2eab08ba38 (patch)
tree4bec345d70f687a2a6002b36e2f2fc79318959f6 /src/sp_disabled_functions.h
parent12b740bc7bb01ffe397cecc5b6fa25b136304911 (diff)
Massively optimize how rules are handled
This commit does a lot of things: - Use hashtables instead of lists to store the rules - Rules that can be applied at launch time won't be tried at runtime - Improve feedback when writing nonsensical rules - Make intensive use of `zend_string` instead of `char*`
Diffstat (limited to 'src/sp_disabled_functions.h')
-rw-r--r--src/sp_disabled_functions.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sp_disabled_functions.h b/src/sp_disabled_functions.h
index f80c9c2..4e795a1 100644
--- a/src/sp_disabled_functions.h
+++ b/src/sp_disabled_functions.h
@@ -2,8 +2,11 @@
2#define __SP_DISABLE_FUNCTIONS_H 2#define __SP_DISABLE_FUNCTIONS_H
3 3
4int hook_disabled_functions(); 4int hook_disabled_functions();
5bool should_disable(zend_execute_data *, const char *, const char *, 5bool should_disable(zend_execute_data *, const char *, const zend_string *,
6 const char *); 6 const char *, const sp_list_node *, const zend_string *);
7bool should_drop_on_ret(zval *, const zend_execute_data *const); 7bool should_disable_ht(zend_execute_data *, const char *, const zend_string *,
8 const char *, const sp_list_node *, const HashTable *);
9bool should_drop_on_ret_ht(zval *, const zend_execute_data *const, const sp_list_node* config, const HashTable *);
10bool should_drop_on_ret(zval *, const sp_list_node* config, const char *);
8 11
9#endif /* __SP_DISABLE_FUNCTIONS_H */ 12#endif /* __SP_DISABLE_FUNCTIONS_H */