summaryrefslogtreecommitdiff
path: root/ext/json
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2015-01-03 01:22:58 -0800
committerStanislav Malyshev <stas@php.net>2015-01-10 15:07:38 -0800
commitb7a7b1a624c97945c0aaa49d46ae996fc0bdb6bc (patch)
tree0e09490075ee4f9a75a77ef4168d8ee254c52e5b /ext/json
parent773c8b0c092a0e9ad5c5548815bcb9991d54d5c1 (diff)
downloadphp-git-b7a7b1a624c97945c0aaa49d46ae996fc0bdb6bc.tar.gz
trailing whitespace removal
Diffstat (limited to 'ext/json')
-rw-r--r--ext/json/JSON_parser.c8
-rw-r--r--ext/json/JSON_parser.h6
-rw-r--r--ext/json/json.c4
-rw-r--r--ext/json/utf8_decode.c14
4 files changed, 16 insertions, 16 deletions
diff --git a/ext/json/JSON_parser.c b/ext/json/JSON_parser.c
index 2e4f258b1e..22508b79b1 100644
--- a/ext/json/JSON_parser.c
+++ b/ext/json/JSON_parser.c
@@ -188,9 +188,9 @@ static const int state_transition_table[NR_STATES][NR_CLASSES] = {
These modes can be pushed on the stack.
*/
enum modes {
- MODE_ARRAY,
- MODE_DONE,
- MODE_KEY,
+ MODE_ARRAY,
+ MODE_DONE,
+ MODE_KEY,
MODE_OBJECT,
};
@@ -634,7 +634,7 @@ parse_JSON_ex(JSON_parser jp, zval *z, unsigned short utf16_json[], int length,
zval *arr = &jp->the_zstack[jp->top];
array_init(arr);
-
+
if (jp->top == 1) {
ZVAL_COPY_VALUE(z, arr);
}
diff --git a/ext/json/JSON_parser.h b/ext/json/JSON_parser.h
index 91081e8bf6..718b9197b6 100644
--- a/ext/json/JSON_parser.h
+++ b/ext/json/JSON_parser.h
@@ -21,9 +21,9 @@ typedef struct JSON_parser_struct {
enum error_codes {
PHP_JSON_ERROR_NONE = 0,
- PHP_JSON_ERROR_DEPTH,
- PHP_JSON_ERROR_STATE_MISMATCH,
- PHP_JSON_ERROR_CTRL_CHAR,
+ PHP_JSON_ERROR_DEPTH,
+ PHP_JSON_ERROR_STATE_MISMATCH,
+ PHP_JSON_ERROR_CTRL_CHAR,
PHP_JSON_ERROR_SYNTAX,
PHP_JSON_ERROR_UTF8,
PHP_JSON_ERROR_RECURSION,
diff --git a/ext/json/json.c b/ext/json/json.c
index 481ab756ed..1381a3a5ff 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -426,7 +426,7 @@ static void json_escape_string(smart_str *buf, char *s, size_t len, int options)
if (json_utf8_to_utf16(NULL, s, len) < 0) {
JSON_G(error_code) = PHP_JSON_ERROR_UTF8;
smart_str_appendl(buf, "null", 4);
- return;
+ return;
}
}
@@ -551,7 +551,7 @@ static void json_escape_string(smart_str *buf, char *s, size_t len, int options)
break;
}
} while (pos < len || next_us);
-
+
smart_str_appendc(buf, '"');
}
/* }}} */
diff --git a/ext/json/utf8_decode.c b/ext/json/utf8_decode.c
index 2d0422bedb..f704b1bf07 100644
--- a/ext/json/utf8_decode.c
+++ b/ext/json/utf8_decode.c
@@ -55,7 +55,7 @@ SOFTWARE.
/*
Get the next byte. It returns UTF8_END if there are no more bytes.
*/
-static int
+static int
get(json_utf8_decode *utf8)
{
int c;
@@ -72,7 +72,7 @@ get(json_utf8_decode *utf8)
Get the 6-bit payload of the next continuation byte.
Return UTF8_ERROR if it is not a contination byte.
*/
-static int
+static int
cont(json_utf8_decode *utf8)
{
int c = get(utf8);
@@ -83,7 +83,7 @@ cont(json_utf8_decode *utf8)
/*
Initialize the UTF-8 decoder. The decoder is not reentrant,
*/
-void
+void
utf8_decode_init(json_utf8_decode *utf8, char p[], int length)
{
utf8->the_index = 0;
@@ -97,7 +97,7 @@ utf8_decode_init(json_utf8_decode *utf8, char p[], int length)
/*
Get the current byte offset. This is generally used in error reporting.
*/
-int
+int
utf8_decode_at_byte(json_utf8_decode *utf8)
{
return utf8->the_byte;
@@ -108,7 +108,7 @@ utf8_decode_at_byte(json_utf8_decode *utf8)
Get the current character offset. This is generally used in error reporting.
The character offset matches the byte offset if the text is strictly ASCII.
*/
-int
+int
utf8_decode_at_character(json_utf8_decode *utf8)
{
return utf8->the_char > 0 ? utf8->the_char - 1 : 0;
@@ -121,7 +121,7 @@ utf8_decode_at_character(json_utf8_decode *utf8)
or UTF8_END (the end)
or UTF8_ERROR (error)
*/
-int
+int
utf8_decode_next(json_utf8_decode *utf8)
{
int c; /* the first byte of the character */
@@ -151,7 +151,7 @@ utf8_decode_next(json_utf8_decode *utf8)
return r >= 128 ? r : UTF8_ERROR;
}
/*
- Two continuation (2048 to 55295 and 57344 to 65535)
+ Two continuation (2048 to 55295 and 57344 to 65535)
*/
if ((c & 0xF0) == 0xE0) {
int c1 = cont(utf8);