summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
authorGeorge Wang <gwang@php.net>2014-10-03 16:43:58 -0400
committerGeorge Wang <gwang@php.net>2014-10-03 16:43:58 -0400
commit2fd7d60ea06aa07b99dc219655be7ab42b7e2e16 (patch)
tree2835e4d2625870eb707e0361a769e4921aff8609 /ext/json/json.c
parenta7d2747890846ed68cc86c6e8d3fd005525ff0cc (diff)
parente9b23401514a642b58084784305c1d19cf86a823 (diff)
downloadphp-git-2fd7d60ea06aa07b99dc219655be7ab42b7e2e16.tar.gz
Merge branch 'master' of git.php.net:php-src
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/json/json.c b/ext/json/json.c
index 24324bbe99..16e452a004 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
@@ -26,7 +26,7 @@
#include "php_ini.h"
#include "ext/standard/info.h"
#include "ext/standard/html.h"
-#include "ext/standard/php_smart_str.h"
+#include "zend_smart_str.h"
#include "JSON_parser.h"
#include "php_json.h"
#include <zend_exceptions.h>
@@ -384,7 +384,7 @@ static void json_escape_string(smart_str *buf, char *s, size_t len, int options
{
int status;
unsigned int us, next_us = 0;
- size_t pos, checkpoint, newlen;
+ size_t pos, checkpoint;
if (len == 0) {
smart_str_appendl(buf, "\"\"", 2);
@@ -789,7 +789,7 @@ static PHP_FUNCTION(json_encode)
ZVAL_FALSE(return_value);
} else {
smart_str_0(&buf); /* copy? */
- ZVAL_STR(return_value, buf.s);
+ ZVAL_NEW_STR(return_value, buf.s);
}
}
/* }}} */