From cee55351d6c2865447e72d9e3e8ba5922647162d Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 29 Apr 2023 16:46:02 +0200 Subject: Improve how the parser is generated - use long variant of options for re2c in its makefile - use `define` instead of magic numbers - add some consts - trailing `;` are now mandatory for conditions - NULL bytes are no longer allowed in configuration file - the parser shouldn't crash in the absence of trailing new line at the end of its configuration file --- src/sp_config_scanner.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp_config_scanner.h') diff --git a/src/sp_config_scanner.h b/src/sp_config_scanner.h index 8ce1fb7..71f8f7e 100644 --- a/src/sp_config_scanner.h +++ b/src/sp_config_scanner.h @@ -18,7 +18,7 @@ typedef struct { long lineno; } sp_parsed_keyword; -zend_result sp_config_scan(char *data, zend_result (*process_rule)(sp_parsed_keyword*)); +zend_result sp_config_scan(const char *data, zend_result (*process_rule)(sp_parsed_keyword*)); zend_string *sp_get_arg_string(sp_parsed_keyword const *const kw); zend_string *sp_get_textual_representation(sp_parsed_keyword const *const parsed_rule); -- cgit v1.3