It might be possible to provide a C API for {fmt} but usability will be shit because C
-
It might be possible to provide a C API for {fmt} but usability will be shit because C
-
It might be possible to provide a C API for {fmt} but usability will be shit because C
But unlike printf it can be safe even with runtime format strings
-
But unlike printf it can be safe even with runtime format strings
@vitaut i would use it.
-
It might be possible to provide a C API for {fmt} but usability will be shit because C
@vitaut you can actually make it usable with _Generic and a nasty macro. I have my own printf implementation that is runtime safe in C, but i feel bad each time I think of the macro :(
-
@vitaut you can actually make it usable with _Generic and a nasty macro. I have my own printf implementation that is runtime safe in C, but i feel bad each time I think of the macro :(
@tanoxyz I am not sure
-
@tanoxyz I am not sure
@tanoxyz how do you achieve runtime safety?
-
@tanoxyz how do you achieve runtime safety?
@vitaut the api receives a null terminated array of arg_t the you have how many arguments you have, the type of each one etc...
Example of a crappy sprintf that writes in a static buffer: -
undefined oblomov@sociale.network shared this topic