|
|
|
|
|
by vore
910 days ago
|
|
How do you know how much memory you need to allocate when you need to do the work in the first place to determine it? Maybe if snprintf was resumable by supplying a larger buffer while it was doing its work, but this seems like a lot of complexity. |
|
With the approach of having the caller allocate you have carefully design the API to make it possible.