48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
return;
if ((ivars = malloc(sizeof(*ivars))) == NULL)
@throw [OFOutOfMemoryException newWithClass: isa
requestedSize: sizeof(*ivars)];
memset(ivars, 0, sizeof(*ivars));
ivars->string = (char*)s;
ivars->length = initialized;
switch (of_string_check_utf8(ivars->string, ivars->length)) {
case 1:
ivars->isUTF8 = YES;
break;
case -1:
free(ivars);
@throw [OFInvalidEncodingException newWithClass: isa];
}
|
|
|
|
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
return;
if ((ivars = malloc(sizeof(*ivars))) == NULL)
@throw [OFOutOfMemoryException newWithClass: isa
requestedSize: sizeof(*ivars)];
memset(ivars, 0, sizeof(*ivars));
ivars->cString = (char*)s;
ivars->cStringLength = initialized;
switch (of_string_check_utf8(ivars->cString, ivars->cStringLength)) {
case 1:
ivars->isUTF8 = YES;
break;
case -1:
free(ivars);
@throw [OFInvalidEncodingException newWithClass: isa];
}
|
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
|
{
if (initialized != SIZE_MAX)
[self completeInitialization];
return [super compare: object];
}
/* From protocol OFSerialization */
- (OFXMLElement*)XMLElementBySerializing
{
if (initialized != SIZE_MAX)
[self completeInitialization];
return [super XMLElementBySerializing];
}
/* From OFObject, but reimplemented in OFString */
- (BOOL)isEqual: (id)object
{
if (initialized != SIZE_MAX)
[self completeInitialization];
return [super isEqual: object];
|
<
<
<
<
<
<
<
<
<
|
374
375
376
377
378
379
380
381
382
383
384
385
386
387
|
{
if (initialized != SIZE_MAX)
[self completeInitialization];
return [super compare: object];
}
/* From OFObject, but reimplemented in OFString */
- (BOOL)isEqual: (id)object
{
if (initialized != SIZE_MAX)
[self completeInitialization];
return [super isEqual: object];
|