Differences From Artifact [f0e2960871]:
- File src/OFString.m — part of check-in [2517f18272] at 2010-04-17 16:09:37 on branch trunk — Give the methods in OFNumber better names. (user: js, size: 20509) [annotate] [blame] [check-ins using]
To Artifact [7f39ded0e7]:
- File
src/OFString.m
— part of check-in
[37db8f0fb3]
at
2010-04-17 22:27:17
on branch trunk
— New ivar naming convention.
ivars are now named like this: thisIsAnIVar. If an accessor exists for
the ivar, the ivar is named like the accessor. This is required for
@property to work. (user: js, size: 20503) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
338 339 340 341 342 343 344 | @throw e; } switch (encoding) { case OF_STRING_ENCODING_UTF_8: switch (of_string_check_utf8(str, length)) { case 1: | | | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | @throw e; } switch (encoding) { case OF_STRING_ENCODING_UTF_8: switch (of_string_check_utf8(str, length)) { case 1: isUTF8 = YES; break; case -1:; /* * We can't use [super dealloc] on OS X here. * Compiler bug? Anyway, [self dealloc] will do here as * we don't reimplement dealloc. */ |
︙ | ︙ | |||
402 403 404 405 406 407 408 | */ Class c = isa; [self dealloc]; @throw [OFInvalidEncodingException newWithClass: c]; } | | | 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | */ Class c = isa; [self dealloc]; @throw [OFInvalidEncodingException newWithClass: c]; } isUTF8 = YES; chr_bytes = of_string_unicode_to_utf8(chr, buf); if (chr_bytes == 0) { /* * We can't use [super dealloc] on OS X * here. Compiler bug? Anyway, * [self dealloc] will do here as we |
︙ | ︙ | |||
505 506 507 508 509 510 511 | */ @throw [OFOutOfMemoryException newWithClass: c]; } length = t; switch (of_string_check_utf8(string, length)) { case 1: | | | 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 | */ @throw [OFOutOfMemoryException newWithClass: c]; } length = t; switch (of_string_check_utf8(string, length)) { case 1: isUTF8 = YES; break; case -1:; Class c = isa; free(string); [super dealloc]; @throw [OFInvalidEncodingException newWithClass: c]; } |
︙ | ︙ | |||
550 551 552 553 554 555 556 | Class c; self = [super init]; len = [first cStringLength]; switch (of_string_check_utf8([first cString], len)) { case 1: | | | | 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 | Class c; self = [super init]; len = [first cStringLength]; switch (of_string_check_utf8([first cString], len)) { case 1: isUTF8 = YES; break; case -1: c = isa; [self dealloc]; @throw [OFInvalidEncodingException newWithClass: c]; } length += len; va_copy(args2, args); while ((component = va_arg(args2, OFString*)) != nil) { len = [component cStringLength]; length += 1 + len; switch (of_string_check_utf8([component cString], len)) { case 1: isUTF8 = YES; break; case -1: c = isa; [self dealloc]; @throw [OFInvalidEncodingException newWithClass: c]; } } |
︙ | ︙ | |||
607 608 609 610 611 612 613 | self = [super init]; string = (char*)[str cString]; length = [str cStringLength]; switch (of_string_check_utf8(string, length)) { case 1: | | | 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 | self = [super init]; string = (char*)[str cString]; length = [str cStringLength]; switch (of_string_check_utf8(string, length)) { case 1: isUTF8 = YES; break; case -1:; Class c = isa; [self dealloc]; @throw [OFInvalidEncodingException newWithClass: c]; } |
︙ | ︙ |