mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Zend: use type uint32_t for lineno ini scanner global
This commit is contained in:
@@ -343,7 +343,7 @@ struct _zend_ini_scanner_globals {
|
|||||||
zend_stack state_stack;
|
zend_stack state_stack;
|
||||||
|
|
||||||
zend_string *filename;
|
zend_string *filename;
|
||||||
int lineno;
|
uint32_t lineno;
|
||||||
|
|
||||||
/* Modes are: ZEND_INI_SCANNER_NORMAL, ZEND_INI_SCANNER_RAW, ZEND_INI_SCANNER_TYPED */
|
/* Modes are: ZEND_INI_SCANNER_NORMAL, ZEND_INI_SCANNER_RAW, ZEND_INI_SCANNER_TYPED */
|
||||||
int scanner_mode;
|
int scanner_mode;
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ static ZEND_COLD void ini_error(const char *msg)
|
|||||||
error_buf_len = 128 + (int)strlen(msg) + (int)strlen(currently_parsed_filename); /* should be more than enough */
|
error_buf_len = 128 + (int)strlen(msg) + (int)strlen(currently_parsed_filename); /* should be more than enough */
|
||||||
error_buf = (char *) emalloc(error_buf_len);
|
error_buf = (char *) emalloc(error_buf_len);
|
||||||
|
|
||||||
sprintf(error_buf, "%s in %s on line %d\n", msg, currently_parsed_filename, zend_ini_scanner_get_lineno());
|
sprintf(error_buf, "%s in %s on line %" PRIu32 "\n", msg, currently_parsed_filename, zend_ini_scanner_get_lineno());
|
||||||
} else {
|
} else {
|
||||||
error_buf = estrdup("Invalid configuration directive\n");
|
error_buf = estrdup("Invalid configuration directive\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ typedef struct _zend_file_handle zend_file_handle;
|
|||||||
#define ZEND_INI_SCANNER_TYPED 2 /* Typed mode. */
|
#define ZEND_INI_SCANNER_TYPED 2 /* Typed mode. */
|
||||||
|
|
||||||
BEGIN_EXTERN_C()
|
BEGIN_EXTERN_C()
|
||||||
ZEND_COLD int zend_ini_scanner_get_lineno(void);
|
ZEND_COLD uint32_t zend_ini_scanner_get_lineno(void);
|
||||||
ZEND_COLD const char *zend_ini_scanner_get_filename(void);
|
ZEND_COLD const char *zend_ini_scanner_get_filename(void);
|
||||||
zend_result zend_ini_open_file_for_scanning(zend_file_handle *fh, int scanner_mode);
|
zend_result zend_ini_open_file_for_scanning(zend_file_handle *fh, int scanner_mode);
|
||||||
zend_result zend_ini_prepare_string_for_scanning(const char *str, int scanner_mode);
|
zend_result zend_ini_prepare_string_for_scanning(const char *str, int scanner_mode);
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ void shutdown_ini_scanner(void)
|
|||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* {{{ zend_ini_scanner_get_lineno() */
|
/* {{{ zend_ini_scanner_get_lineno() */
|
||||||
ZEND_COLD int zend_ini_scanner_get_lineno(void)
|
ZEND_COLD uint32_t zend_ini_scanner_get_lineno(void)
|
||||||
{
|
{
|
||||||
return SCNG(lineno);
|
return SCNG(lineno);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user