Differences From Artifact [0f6776e0aa]:
- File src/of_asprintf.m — part of check-in [e803913a9d] at 2013-11-22 19:27:05 on branch trunk — of_asprintf: Add %C format specifier. (user: js, size: 12764) [annotate] [blame] [check-ins using]
To Artifact [7dd06b0a1f]:
- File
src/of_asprintf.m
— part of check-in
[0232e0c975]
at
2013-11-23 03:02:17
on branch trunk
— of_asprintf: Don't accept length modifiers for %@.
Same for %C. (user: js, size: 12902) [annotate] [blame] [check-ins using]
︙ | |||
291 292 293 294 295 296 297 298 299 300 301 302 303 304 | 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | + + + | int tmpLen = 0; if (!appendSubformat(ctx, ctx->format + ctx->i, 1)) return false; switch (ctx->format[ctx->i]) { case '@': if (ctx->lengthModifier != LENGTH_MODIFIER_NONE) return false; ctx->subformat[ctx->subformatLen - 1] = 's'; @try { id object; if ((object = va_arg(ctx->arguments, id)) != nil) { void *pool = objc_autoreleasePoolPush(); |
︙ | |||
313 314 315 316 317 318 319 320 321 322 323 324 325 326 | 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | + + + | } @catch (id e) { free(ctx->buffer); @throw e; } break; case 'C': if (ctx->lengthModifier != LENGTH_MODIFIER_NONE) return false; ctx->subformat[ctx->subformatLen - 1] = 's'; { char buffer[5]; size_t len = of_string_utf8_encode( va_arg(ctx->arguments, of_unichar_t), buffer); |
︙ |