[vlc-devel] [PATCH] Add open_memstream replacement
Rémi Denis-Courmont
remi at remlab.net
Thu Aug 25 08:38:28 CEST 2016
Le torstaina 25. elokuuta 2016, 6.57.18 EEST Rémi Denis-Courmont a écrit :
> Now if you know a better C string buffers API, please advise. snprintf() is
> NOT a better C string buffers API, and I don´t suppose you suggest switching
> to C++.
There are none in ISO C. The closest standard function is tmpfile(). It
supports output and seeking but does not automatically expose the result in
memory upon fflush() and fclose().
Though I don´t know it would matter. AFAICT, where open_memstream() is
missing, either funopen/fopencookie are present (Mac/Android), or we own/
control the C run-time library (Windows), or we don´t use "native" FILE
pointers at all?
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list