Differences From Artifact [57e4df0b5d]:
- File src/OFMutableUTF8String.m — part of check-in [6c3ec63d96] at 2022-09-04 18:46:17 on branch trunk — Remove -[prependString:] and -[reverse] (user: js, size: 17696) [annotate] [blame] [check-ins using] [more...]
To Artifact [5369441523]:
- File
src/OFMutableUTF8String.m
— part of check-in
[c86b8f10f0]
at
2022-11-16 01:27:26
on branch trunk
— Add OFAssert()
This uses the same format as OFEnsure(). (user: js, size: 17680) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
14 15 16 17 18 19 20 | */ #include "config.h" #include <stdarg.h> #include <stdlib.h> #include <string.h> | < | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | */ #include "config.h" #include <stdarg.h> #include <stdlib.h> #include <string.h> #import "OFMutableUTF8String.h" #import "OFASPrintF.h" #import "OFString.h" #import "OFUTF8String.h" #import "OFInvalidArgumentException.h" |
︙ | ︙ | |||
75 76 77 78 79 80 81 | char *newCString; bool isStart = true; if (!_s->isUTF8) { uint8_t t; const OFUnichar *const *table; | | | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | char *newCString; bool isStart = true; if (!_s->isUTF8) { uint8_t t; const OFUnichar *const *table; OFAssert(startTableSize >= 1 && middleTableSize >= 1); _s->hasHash = false; for (i = 0; i < _s->cStringLength; i++) { if (isStart) table = startTable; else |
︙ | ︙ | |||
169 170 171 172 173 174 175 | OFFreeMemory(unicodeString); OFFreeMemory(newCString); @throw [OFInvalidEncodingException exception]; } j += d; } | | | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | OFFreeMemory(unicodeString); OFFreeMemory(newCString); @throw [OFInvalidEncodingException exception]; } j += d; } OFAssert(j == newCStringLength); newCString[j] = 0; OFFreeMemory(unicodeString); OFFreeMemory(_s->cString); _s->hasHash = false; _s->cString = newCString; _s->cStringLength = newCStringLength; |
︙ | ︙ |