Differences From Artifact [887f63d0ca]:
- File
src/OFString+JSONValue.m
— part of check-in
[acd8e03f58]
at
2012-02-06 11:31:19
on branch trunk
— Return mutable collections in -[JSONValue].
This allows modifying data and getting the JSON representation again. (user: js, size: 8626) [annotate] [blame] [check-ins using]
To Artifact [9190d7a166]:
- File
src/OFString+JSONValue.m
— part of check-in
[c8a5922af2]
at
2012-02-24 20:38:35
on branch 0.6
— Don't use OF_INLINE where the function contains a @try block.
Doing so does not work if exceptions are SJLJ. (user: js, size: 8611) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
92 93 94 95 96 97 98 | old = *pointer; skipWhitespaces(pointer, stop); skipComment(pointer, stop); } } | | | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
old = *pointer;
skipWhitespaces(pointer, stop);
skipComment(pointer, stop);
}
}
static inline uint16_t
parseUnicodeEscape(const char *pointer, const char *stop)
{
uint16_t ret = 0;
char i;
if (pointer + 5 >= stop)
return 0xFFFF;
|
| ︙ | ︙ | |||
121 122 123 124 125 126 127 | else return 0xFFFF; } return ret; } | | | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
else
return 0xFFFF;
}
return ret;
}
static inline OFString*
parseString(const char *restrict *pointer, const char *stop)
{
char *buffer;
size_t i = 0;
if (++(*pointer) + 1 >= stop)
return nil;
|
| ︙ | ︙ | |||
255 256 257 258 259 260 261 | } } free(buffer); return nil; } | | | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
}
}
free(buffer);
return nil;
}
static inline OFMutableArray*
parseArray(const char *restrict *pointer, const char *stop)
{
OFMutableArray *array = [OFMutableArray array];
if (++(*pointer) >= stop)
return nil;
|
| ︙ | ︙ | |||
297 298 299 300 301 302 303 | } (*pointer)++; return array; } | | | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
}
(*pointer)++;
return array;
}
static inline OFMutableDictionary*
parseDictionary(const char *restrict *pointer, const char *stop)
{
OFMutableDictionary *dictionary = [OFMutableDictionary dictionary];
if (++(*pointer) >= stop)
return nil;
|
| ︙ | ︙ | |||
349 350 351 352 353 354 355 | } (*pointer)++; return dictionary; } | | | 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
}
(*pointer)++;
return dictionary;
}
static inline OFNumber*
parseNumber(const char *restrict *pointer, const char *stop)
{
BOOL hasDecimal = NO;
size_t i;
OFString *string;
OFNumber *number;
|
| ︙ | ︙ |