@@ -181,12 +181,12 @@ static const char *php_json_get_error_msg(php_json_error_code error_code) /* {{{
181181}
182182/* }}} */
183183
184- static zend_string * php_json_get_error_msg_with_location (php_json_error_code error_code , int line , int column ) /* {{{ */
184+ static zend_string * php_json_get_error_msg_with_location (php_json_error_code error_code , size_t line , size_t column ) /* {{{ */
185185{
186186 const char * base_msg = php_json_get_error_msg (error_code );
187187
188188 if (line > 0 && column > 0 ) {
189- return zend_strpprintf (0 , "%s near location %d,%d " , base_msg , line , column );
189+ return zend_strpprintf (0 , "%s near location %u,%u " , base_msg , line , column );
190190 }
191191
192192 return zend_string_init (base_msg , strlen (base_msg ), 0 );
@@ -201,8 +201,8 @@ PHP_JSON_API zend_result php_json_decode_ex(zval *return_value, const char *str,
201201
202202 if (php_json_yyparse (& parser )) {
203203 php_json_error_code error_code = php_json_parser_error_code (& parser );
204- int error_line = php_json_parser_error_line (& parser );
205- int error_column = php_json_parser_error_column (& parser );
204+ size_t error_line = php_json_parser_error_line (& parser );
205+ size_t error_column = php_json_parser_error_column (& parser );
206206
207207 if (!(options & PHP_JSON_THROW_ON_ERROR )) {
208208 JSON_G (error_code ) = error_code ;
@@ -231,8 +231,8 @@ PHP_JSON_API bool php_json_validate_ex(const char *str, size_t str_len, zend_lon
231231
232232 if (php_json_yyparse (& parser )) {
233233 php_json_error_code error_code = php_json_parser_error_code (& parser );
234- int error_line = php_json_parser_error_line (& parser );
235- int error_column = php_json_parser_error_column (& parser );
234+ size_t error_line = php_json_parser_error_line (& parser );
235+ size_t error_column = php_json_parser_error_column (& parser );
236236
237237 JSON_G (error_code ) = error_code ;
238238 JSON_G (error_line ) = error_line ;
0 commit comments