diff options
| author | jvoisin | 2022-07-13 21:25:04 +0200 |
|---|---|---|
| committer | jvoisin | 2022-07-13 21:25:04 +0200 |
| commit | ed87e551efd0160f1944a5e97158ab258db65eaf (patch) | |
| tree | 0d80c4929a687e3b6b9252565ac250d1733183e2 /src/sp_utils.h | |
| parent | ce95c32c91c1d78cfb7603699b6b10e54e931f45 (diff) | |
Even more const!
Diffstat (limited to 'src/sp_utils.h')
| -rw-r--r-- | src/sp_utils.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sp_utils.h b/src/sp_utils.h index 0e595d8..7bab4ba 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h | |||
| @@ -71,8 +71,8 @@ extern int sp_debug_stderr; | |||
| 71 | #define GET_SUFFIX(x) (x == 1) ? "st" : ((x == 2) ? "nd" : "th") | 71 | #define GET_SUFFIX(x) (x == 1) ? "st" : ((x == 2) ? "nd" : "th") |
| 72 | 72 | ||
| 73 | const char *get_ipaddr(void); | 73 | const char *get_ipaddr(void); |
| 74 | void sp_log_msgf(char const *restrict feature, int level, int type, const char *restrict fmt, ...); | 74 | void sp_log_msgf(char const* const restrict feature, int level, int type, char const* const restrict fmt, ...); |
| 75 | int compute_hash(const char *const restrict filename, char *restrict file_hash); | 75 | int compute_hash(char const* const restrict filename, char *restrict file_hash); |
| 76 | const zend_string *sp_zval_to_zend_string(const zval *); | 76 | const zend_string *sp_zval_to_zend_string(const zval *); |
| 77 | bool sp_match_value(const zend_string* value, const zend_string* to_match, const sp_regexp* rx); | 77 | bool sp_match_value(const zend_string* value, const zend_string* to_match, const sp_regexp* rx); |
| 78 | bool sp_match_array_key(const zval *, const zend_string *, const sp_regexp *); | 78 | bool sp_match_array_key(const zval *, const zend_string *, const sp_regexp *); |
| @@ -83,7 +83,7 @@ bool hook_function(const char *, HashTable *, zif_handler); | |||
| 83 | void unhook_functions(HashTable *ht); | 83 | void unhook_functions(HashTable *ht); |
| 84 | int hook_regexp(const sp_pcre *, HashTable *, zif_handler); | 84 | int hook_regexp(const sp_pcre *, HashTable *, zif_handler); |
| 85 | bool check_is_in_eval_whitelist(const char* function_name); | 85 | bool check_is_in_eval_whitelist(const char* function_name); |
| 86 | int sp_log_request(const zend_string *restrict folder, const zend_string *restrict text_repr); | 86 | int sp_log_request(zend_string const* const restrict folder, zend_string const* const restrict text_repr); |
| 87 | #define sp_zend_string_equals(s1, s2) zend_string_equals((zend_string*)s1, (zend_string*)s2) | 87 | #define sp_zend_string_equals(s1, s2) zend_string_equals((zend_string*)s1, (zend_string*)s2) |
| 88 | static inline bool sp_zend_string_equals_str(const zend_string* s1, const char *str, size_t len) { | 88 | static inline bool sp_zend_string_equals_str(const zend_string* s1, const char *str, size_t len) { |
| 89 | return (ZSTR_LEN(s1) == len && !memcmp(ZSTR_VAL(s1), str, len)); | 89 | return (ZSTR_LEN(s1) == len && !memcmp(ZSTR_VAL(s1), str, len)); |
