Overview
Comment: | Improve -[compare:]. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6772512e3ea6538bcd68e2ab1b4c24b8 |
User & Date: | js on 2009-11-10 15:32:14 |
Other Links: | manifest | tags |
Context
2009-11-10
| ||
15:34 | Improve of_string_utf8_to_unicode. check-in: 3d007c8393 user: js tags: trunk | |
15:32 | Improve -[compare:]. check-in: 6772512e3e user: js tags: trunk | |
2009-11-09
| ||
23:18 | Fix a bug in OFStream that was introduced by the new \0 behaviour. check-in: 16786b4e7e user: js tags: trunk | |
Changes
Modified src/OFDataArray.h from [2b9722b935] to [ba261f3f5c].
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - - + + - - + | * \return All elements of the OFDataArray as a C array */ - (void*)cArray; /** * Compares the OFDataArray to another object. * |
︙ |
Modified src/OFDataArray.m from [7648ed9d0c] to [dff98ec80e].
︙ | |||
149 150 151 152 153 154 155 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | - + - + - + - + - - + + - - - - + + - - + + - - - + + - - + + + + + | return NO; if (memcmp([obj cArray], data, count * itemsize)) return NO; return YES; } |
︙ |
Modified src/OFObject.h from [916163ab90] to [1dd4852877].
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | + + + + + + + + + + + + | #include <stdint.h> #import <objc/objc.h> #ifndef __objc_INCLUDE_GNU #import <objc/message.h> #endif /** * A result of a comparison. */ typedef enum { /// The left object is smaller than the right OF_ORDERED_ASCENDING = -1, /// Both objects are equal OF_ORDERED_SAME = 0, /// The left object is bigger than the right OF_ORDERED_DESCENDING = 1 } of_comparison_result_t; /** * The OFObject class is the base class for all other classes inside ObjFW. */ @interface OFObject { /// The class of the object Class isa; |
︙ |
Modified src/OFString.h from [d44d424d71] to [1b35f65444].
︙ | |||
199 200 201 202 203 204 205 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | - + - - + + - - + | /** * \return The length of the string which cString would return */ - (size_t)cStringLength; /** |
︙ |
Modified src/OFString.m from [d81f7e695a] to [c3f91002a4].
︙ | |||
558 559 560 561 562 563 564 | 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 | - + + + - + + + + + + + + - + + + + + + + + + + + + + + | } - (id)mutableCopy { return [[OFMutableString alloc] initWithString: self]; } |
︙ |
Modified tests/OFDataArray.m from [15ada11ae3] to [1c9d8d3ad2].
︙ | |||
59 60 61 62 63 64 65 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - - + + | [array[1] removeNItems: 1] && ![array[0] isEqual: array[1]]) TEST(@"-[copy]", (array[1] = [[array[0] copy] autorelease]) && [array[0] isEqual: array[1]]) TEST(@"-[compare]", [array[0] compare: array[1]] == 0 && [array[1] removeNItems: 1] && |
︙ |
Modified tests/OFString.m from [e331bfd14a] to [335c787098].
︙ | |||
49 50 51 52 53 54 55 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - - + + | s[0] = [OFMutableString stringWithString: @"täs€"]; s[1] = [OFMutableString string]; s[2] = [[s[0] copy] autorelease]; TEST(@"-[isEqual:]", [s[0] isEqual: s[2]] && ![s[0] isEqual: [[[OFObject alloc] init] autorelease]]) |
︙ |