summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-04-04 23:51:10 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-04-05 00:59:44 +0200
commit5322de1ba8428c0231c972586217f9b1b705c45d (patch)
tree0cedf1dbe6b67a5e49382480f996f7456bc46f61 /ext/json/json.c
parentd5bbb28f7d9d0621263be5073102cd1a32170cd1 (diff)
downloadphp-git-5322de1ba8428c0231c972586217f9b1b705c45d.tar.gz
Generate functions entries from stubs for another set of extensions
Closes GH-5351
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/ext/json/json.c b/ext/json/json.c
index 10ec93e220..b78de3ea16 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -31,26 +31,12 @@
#include <zend_exceptions.h>
static PHP_MINFO_FUNCTION(json);
-static PHP_FUNCTION(json_encode);
-static PHP_FUNCTION(json_decode);
-static PHP_FUNCTION(json_last_error);
-static PHP_FUNCTION(json_last_error_msg);
PHP_JSON_API zend_class_entry *php_json_serializable_ce;
PHP_JSON_API zend_class_entry *php_json_exception_ce;
PHP_JSON_API ZEND_DECLARE_MODULE_GLOBALS(json)
-/* {{{ json_functions[] */
-static const zend_function_entry json_functions[] = {
- PHP_FE(json_encode, arginfo_json_encode)
- PHP_FE(json_decode, arginfo_json_decode)
- PHP_FE(json_last_error, arginfo_json_last_error)
- PHP_FE(json_last_error_msg, arginfo_json_last_error_msg)
- PHP_FE_END
-};
-/* }}} */
-
/* {{{ JsonSerializable methods */
static const zend_function_entry json_serializable_interface[] = {
PHP_ABSTRACT_ME(JsonSerializable, jsonSerialize, arginfo_class_JsonSerializable_jsonSerialize)
@@ -132,7 +118,7 @@ static PHP_GINIT_FUNCTION(json)
zend_module_entry json_module_entry = {
STANDARD_MODULE_HEADER,
"json",
- json_functions,
+ ext_functions,
PHP_MINIT(json),
NULL,
NULL,
@@ -239,7 +225,7 @@ PHP_JSON_API int php_json_decode_ex(zval *return_value, char *str, size_t str_le
/* {{{ proto string json_encode(mixed data [, int options[, int depth]])
Returns the JSON representation of a value */
-static PHP_FUNCTION(json_encode)
+PHP_FUNCTION(json_encode)
{
zval *parameter;
php_json_encoder encoder;
@@ -282,7 +268,7 @@ static PHP_FUNCTION(json_encode)
/* {{{ proto mixed json_decode(string json [, bool assoc [, int depth]])
Decodes the JSON representation into a PHP value */
-static PHP_FUNCTION(json_decode)
+PHP_FUNCTION(json_decode)
{
char *str;
size_t str_len;
@@ -337,7 +323,7 @@ static PHP_FUNCTION(json_decode)
/* {{{ proto int json_last_error()
Returns the error code of the last json_encode() or json_decode() call. */
-static PHP_FUNCTION(json_last_error)
+PHP_FUNCTION(json_last_error)
{
ZEND_PARSE_PARAMETERS_NONE();
@@ -347,7 +333,7 @@ static PHP_FUNCTION(json_last_error)
/* {{{ proto string json_last_error_msg()
Returns the error string of the last json_encode() or json_decode() call. */
-static PHP_FUNCTION(json_last_error_msg)
+PHP_FUNCTION(json_last_error_msg)
{
ZEND_PARSE_PARAMETERS_NONE();