368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
|
@try {
id object;
if ((object = va_arg(ctx->arguments, id)) != nil) {
void *pool = objc_autoreleasePoolPush();
tmpLen = asprintf(&tmp, ctx->subformat,
[[object description] UTF8String]);
objc_autoreleasePoolPop(pool);
} else
tmpLen = asprintf(&tmp, ctx->subformat,
"(nil)");
} @catch (id e) {
free(ctx->buffer);
|
|
|
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
|
@try {
id object;
if ((object = va_arg(ctx->arguments, id)) != nil) {
void *pool = objc_autoreleasePoolPush();
tmpLen = asprintf(&tmp, ctx->subformat,
[object description].UTF8String);
objc_autoreleasePoolPop(pool);
} else
tmpLen = asprintf(&tmp, ctx->subformat,
"(nil)");
} @catch (id e) {
free(ctx->buffer);
|
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
|
stringWithUTF8String: tmp
length: tmpLen];
OFString *point = [OFLocale decimalPoint];
if (point != nil)
[tmpStr
replaceOccurrencesOfString: point
withString: @"."];
if ([tmpStr UTF8StringLength] > INT_MAX)
return false;
tmpLen = (int)[tmpStr UTF8StringLength];
tmp2 = malloc(tmpLen);
memcpy(tmp2, [tmpStr UTF8String], tmpLen);
} @finally {
free(tmp);
objc_autoreleasePoolPop(pool);
}
tmp = tmp2;
}
|
|
|
|
|
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
|
stringWithUTF8String: tmp
length: tmpLen];
OFString *point = [OFLocale decimalPoint];
if (point != nil)
[tmpStr
replaceOccurrencesOfString: point
withString: @"."];
if (tmpStr.UTF8StringLength > INT_MAX)
return false;
tmpLen = (int)tmpStr.UTF8StringLength;
tmp2 = malloc(tmpLen);
memcpy(tmp2, tmpStr.UTF8String, tmpLen);
} @finally {
free(tmp);
objc_autoreleasePoolPop(pool);
}
tmp = tmp2;
}
|