Differences From Artifact [ddf9f2532e]:
- File
src/OFString.h
— part of check-in
[5eada9f7b0]
at
2013-11-23 03:24:43
on branch trunk
— of_asprintf: Change %C to %k.
In Cocoa, %C means unichar, which is unsigned short and thus compilers
expect %C to be unichar when the language is set to ObjC. It would be
hard to let compilers detect whether %C should be unichar or
of_unichar_t, especially when mixing ObjFW and Cocoa code, thus the
change to %k. (user: js, size: 33117) [annotate] [blame] [check-ins using]
To Artifact [add596737a]:
- File
src/OFString.h
— part of check-in
[945ff1043d]
at
2013-11-23 17:48:21
on branch trunk
— of_asprintf: Add %K format specifier.
%K is for const of_unichar_t*. (user: js, size: 33226) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
261 262 263 264 265 266 267 | length: (size_t)length byteOrder: (of_byte_order_t)byteOrder; /*! * @brief Creates a new OFString from a format string. * * See printf for the format syntax. As an addition, %@ is available as format | | | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | length: (size_t)length byteOrder: (of_byte_order_t)byteOrder; /*! * @brief Creates a new OFString from a format string. * * See printf for the format syntax. As an addition, %@ is available as format * specifier for objects, %k for of_unichar_t and %K for const of_unichar_t*. * * @param format A string used as format to initialize the OFString * @return A new autoreleased OFString */ + (instancetype)stringWithFormat: (OFConstantString*)format, ...; /*! |
︙ | ︙ | |||
490 491 492 493 494 495 496 | length: (size_t)length byteOrder: (of_byte_order_t)byteOrder; /*! * @brief Initializes an already allocated OFString with a format string. * * See printf for the format syntax. As an addition, %@ is available as format | | | | | 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 | length: (size_t)length byteOrder: (of_byte_order_t)byteOrder; /*! * @brief Initializes an already allocated OFString with a format string. * * See printf for the format syntax. As an addition, %@ is available as format * specifier for objects, %k for of_unichar_t and %K for const of_unichar_t*. * * @param format A string used as format to initialize the OFString * @return An initialized OFString */ - initWithFormat: (OFConstantString*)format, ... OF_FORMAT_FUNCTION(1, 2); /*! * @brief Initializes an already allocated OFString with a format string. * * See printf for the format syntax. As an addition, %@ is available as format * specifier for objects, %k for of_unichar_t and %K for const of_unichar_t*. * * @param format A string used as format to initialize the OFString * @param arguments The arguments used in the format string * @return An initialized OFString */ - initWithFormat: (OFConstantString*)format arguments: (va_list)arguments; |
︙ | ︙ |