diff options
author | Jakub Zelenka <bukka@php.net> | 2016-05-11 20:54:42 +0100 |
---|---|---|
committer | Jakub Zelenka <bukka@php.net> | 2016-05-11 20:54:42 +0100 |
commit | b91c05ea1411778876d7afd85461864cbde0d67a (patch) | |
tree | 864839e290a2ae485f852c62bddbd60038c30cd3 /ext/json/json_parser.y | |
parent | afb4062c2c66d3080c08693af47c670bb63c285e (diff) | |
download | php-git-b91c05ea1411778876d7afd85461864cbde0d67a.tar.gz |
Fix and clean up exporting of json parser
Diffstat (limited to 'ext/json/json_parser.y')
-rw-r--r-- | ext/json/json_parser.y | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ext/json/json_parser.y b/ext/json/json_parser.y index a2d96efd8e..fafe75cbf3 100644 --- a/ext/json/json_parser.y +++ b/ext/json/json_parser.y @@ -309,7 +309,7 @@ static void php_json_yyerror(php_json_parser *parser, char const *msg) } } -php_json_error_code php_json_parser_error_code(const php_json_parser *parser) +PHP_JSON_API php_json_error_code php_json_parser_error_code(const php_json_parser *parser) { return parser->scanner.errcode; } @@ -326,7 +326,7 @@ static const php_json_parser_methods default_parser_methods = NULL, }; -void php_json_parser_init_ex(php_json_parser *parser, +PHP_JSON_API void php_json_parser_init_ex(php_json_parser *parser, zval *return_value, char *str, size_t str_len, @@ -342,7 +342,7 @@ void php_json_parser_init_ex(php_json_parser *parser, memcpy(&parser->methods, parser_methods, sizeof(php_json_parser_methods)); } -void php_json_parser_init(php_json_parser *parser, +PHP_JSON_API void php_json_parser_init(php_json_parser *parser, zval *return_value, char *str, size_t str_len, @@ -358,3 +358,8 @@ void php_json_parser_init(php_json_parser *parser, max_depth, &default_parser_methods); } + +PHP_JSON_API int php_json_parse(php_json_parser *parser) +{ + return php_json_yyparse(parser); +} |