Differences From Artifact [16be464aa0]:
- File src/OFString+JSONValue.m — part of check-in [9c24db3c6d] at 2013-02-23 18:00:44 on branch trunk — Disallow \u0000 in JSON and fix ObjFW.h. (user: js, size: 13052) [annotate] [blame] [check-ins using]
To Artifact [b110ce39ff]:
- File
src/OFString+JSONValue.m
— part of check-in
[c5ef582958]
at
2013-03-04 17:20:15
on branch trunk
— Replace BOOL with bool.
The only places where BOOL is left are those where they are required by
the ABI. (user: js, size: 13063) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
60 61 62 63 64 65 66 | if (*pointer + 1 >= stop) return; (*pointer)++; if (**pointer == '*') { | | | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | if (*pointer + 1 >= stop) return; (*pointer)++; if (**pointer == '*') { bool lastIsAsterisk = false; (*pointer)++; while (*pointer < stop) { if (lastIsAsterisk && **pointer == '/') { (*pointer)++; return; |
︙ | ︙ | |||
531 532 533 534 535 536 537 | return dictionary; } static inline OFNumber* parseNumber(const char *restrict *pointer, const char *stop, size_t *restrict line) { | | | | | 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 | return dictionary; } static inline OFNumber* parseNumber(const char *restrict *pointer, const char *stop, size_t *restrict line) { bool isHex = (*pointer + 1 < stop && (*pointer)[1] == 'x'); bool hasDecimal = false; size_t i; OFString *string; OFNumber *number; for (i = 0; *pointer + i < stop; i++) { if ((*pointer)[i] == '.') hasDecimal = true; if ((*pointer)[i] == ' ' || (*pointer)[i] == '\t' || (*pointer)[i] == '\r' || (*pointer)[i] == '\n' || (*pointer)[i] == ',' || (*pointer)[i] == ']' || (*pointer)[i] == '}') { if ((*pointer)[i] == '\n') (*line)++; |
︙ | ︙ | |||
603 604 605 606 607 608 609 | return nil; if (memcmp(*pointer, "true", 4)) return nil; (*pointer) += 4; | | | | 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 | return nil; if (memcmp(*pointer, "true", 4)) return nil; (*pointer) += 4; return [OFNumber numberWithBool: true]; case 'f': if (*pointer + 4 >= stop) return nil; if (memcmp(*pointer, "false", 5)) return nil; (*pointer) += 5; return [OFNumber numberWithBool: false]; case 'n': if (*pointer + 3 >= stop) return nil; if (memcmp(*pointer, "null", 4)) return nil; |
︙ | ︙ |