summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-02-09 11:06:02 +0100
committerAnatol Belski <ab@php.net>2015-02-09 11:06:02 +0100
commitef2fd13de82caf672a48445e75a59328a837369f (patch)
treebc8dfcf15afa3435abec5bdb3076085d21853a2c /ext/json/json.c
parent12fff5251bc31284b82c0bb12ae401220aa84ae5 (diff)
downloadphp-git-ef2fd13de82caf672a48445e75a59328a837369f.tar.gz
fix datatype mismatches
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/json/json.c b/ext/json/json.c
index 0f8fdfb132..b40cb695d7 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -191,7 +191,7 @@ PHP_JSON_API void php_json_decode_ex(zval *return_value, char *str, size_t str_l
{
php_json_parser parser;
- php_json_parser_init(&parser, return_value, str, str_len, options, depth);
+ php_json_parser_init(&parser, return_value, str, str_len, (int)options, (int)depth);
if (php_json_yyparse(&parser)) {
JSON_G(error_code) = php_json_parser_error_code(&parser);
@@ -215,9 +215,9 @@ static PHP_FUNCTION(json_encode)
JSON_G(error_code) = PHP_JSON_ERROR_NONE;
- JSON_G(encode_max_depth) = depth;
+ JSON_G(encode_max_depth) = (int)depth;
- php_json_encode(&buf, parameter, options);
+ php_json_encode(&buf, parameter, (int)options);
if (JSON_G(error_code) != PHP_JSON_ERROR_NONE && !(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) {
smart_str_free(&buf);