72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
size: (size_t)size
{
[self doesNotRecognizeSelector: _cmd];
abort();
}
- (void*)resizeMemory: (void*)ptr
toNItems: (size_t)nitems
withSize: (size_t)size
{
[self doesNotRecognizeSelector: _cmd];
abort();
}
- (void)freeMemory: (void*)ptr
{
|
|
|
|
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
size: (size_t)size
{
[self doesNotRecognizeSelector: _cmd];
abort();
}
- (void*)resizeMemory: (void*)ptr
size: (size_t)nitems
count: (size_t)size
{
[self doesNotRecognizeSelector: _cmd];
abort();
}
- (void)freeMemory: (void*)ptr
{
|
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
|
struct of_string_utf8_ivars *ivars;
if ((ivars = calloc(1, sizeof(*ivars))) == NULL)
@throw [OFOutOfMemoryException
exceptionWithClass: [self class]
requestedSize: sizeof(*ivars)];
ivars->cString = cString;
ivars->cStringLength = cStringLength;
switch (of_string_utf8_check(ivars->cString, ivars->cStringLength,
&ivars->length)) {
case 1:
ivars->isUTF8 = YES;
break;
case -1:
free(ivars);
@throw [OFInvalidEncodingException
exceptionWithClass: [self class]];
}
cString = (char*)ivars;
object_setClass(self, [OFString_const class]);
}
+ alloc
{
[self doesNotRecognizeSelector: _cmd];
abort();
|
|
|
|
|
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
|
struct of_string_utf8_ivars *ivars;
if ((ivars = calloc(1, sizeof(*ivars))) == NULL)
@throw [OFOutOfMemoryException
exceptionWithClass: [self class]
requestedSize: sizeof(*ivars)];
ivars->cString = _cString;
ivars->cStringLength = _cStringLength;
switch (of_string_utf8_check(ivars->cString, ivars->cStringLength,
&ivars->length)) {
case 1:
ivars->isUTF8 = YES;
break;
case -1:
free(ivars);
@throw [OFInvalidEncodingException
exceptionWithClass: [self class]];
}
_cString = (char*)ivars;
object_setClass(self, [OFString_const class]);
}
+ alloc
{
[self doesNotRecognizeSelector: _cmd];
abort();
|