55
55
/* emulate flex constructs */
56
56
#define BEGIN (state ) YYSETCONDITION(STATE(state))
57
57
#define YYSTATE YYGETCONDITION ()
58
- #define yytext ((char *)SCNG(yy_text))
58
+ #define yytext ((const char *)SCNG(yy_text))
59
59
#define yyleng SCNG (yy_leng)
60
- #define yyless (x ) do { YYCURSOR = (unsigned char *)yytext + x; \
60
+ #define yyless (x ) do { YYCURSOR = (const unsigned char *)yytext + x; \
61
61
yyleng = (unsigned int )x; } while (0 )
62
62
63
63
/* #define yymore() goto yymore_restart */
@@ -208,9 +208,9 @@ static void yy_pop_state(void)
208
208
zend_stack_del_top (&SCNG (state_stack));
209
209
}
210
210
211
- static void yy_scan_buffer (char *str, unsigned int len)
211
+ static void yy_scan_buffer (const char *str, unsigned int len)
212
212
{
213
- YYCURSOR = (YYCTYPE*)str;
213
+ YYCURSOR = (const YYCTYPE*)str;
214
214
SCNG (yy_start) = YYCURSOR;
215
215
YYLIMIT = YYCURSOR + len;
216
216
}
@@ -288,7 +288,7 @@ zend_result zend_ini_open_file_for_scanning(zend_file_handle *fh, int scanner_mo
288
288
/* }}} */
289
289
290
290
/* {{{ zend_ini_prepare_string_for_scanning() */
291
- zend_result zend_ini_prepare_string_for_scanning (char *str, int scanner_mode)
291
+ zend_result zend_ini_prepare_string_for_scanning (const char *str, int scanner_mode)
292
292
{
293
293
int len = (int )strlen (str);
294
294
@@ -303,7 +303,7 @@ zend_result zend_ini_prepare_string_for_scanning(char *str, int scanner_mode)
303
303
/* }}} */
304
304
305
305
/* {{{ zend_ini_escape_string() */
306
- static void zend_ini_escape_string (zval *lval, char *str, int len, char quote_type)
306
+ static void zend_ini_escape_string (zval *lval, const char *str, int len, char quote_type)
307
307
{
308
308
char *s, *t;
309
309
char *end;
@@ -493,7 +493,7 @@ SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR})
493
493
}
494
494
495
495
<ST_RAW>{RAW_VALUE_CHARS} { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */
496
- unsigned char *sc = NULL ;
496
+ const unsigned char *sc = NULL ;
497
497
EAT_LEADING_WHITESPACE ();
498
498
while (YYCURSOR < YYLIMIT) {
499
499
switch (*YYCURSOR) {
@@ -591,7 +591,7 @@ end_raw_value_chars:
591
591
return 0 ;
592
592
}
593
593
594
- unsigned char *s = SCNG (yy_text);
594
+ const unsigned char *s = SCNG (yy_text);
595
595
596
596
while (s < YYLIMIT) {
597
597
switch (*s++) {
0 commit comments