Hi,
On Mon, Jul 30, 2012 at 10:26 AM, Alex Converse <[email protected]> wrote:
> On Mon, Jul 30, 2012 at 10:07 AM, Ronald S. Bultje <[email protected]> wrote:
>> Hi,
>>
>> On Wed, Jul 25, 2012 at 10:40 PM, Luca Barbato <[email protected]> wrote:
>>> On 07/26/2012 05:37 AM, Ronald S. Bultje wrote:
>>>> From: "Ronald S. Bultje" <[email protected]>
>>>>
>>>> ---
>>>> libavutil/eval.c | 35 +++++++++++++++++++++++++++++++++++
>>>> 1 file changed, 35 insertions(+)
>>>>
>>>
>>> As for the snprintf, I'd rather have those workaround in os_support,
>>> move it to libavutil and have os_support.h included.
>>>
>>> I'd move this code to
>>>
>>> ff_strtod()
>>>
>>> and have #define strtod ff_strtod
>>
>> I'm a little bit concerned about having a function called ff_strtod()
>> which is only called from a function called av_strtod().
>>
>
> What about avpriv_strtod_internal()
>
> The longer name makes it less likely someone will use it accidentally
> and the avpriv_ prefix should allow it to be used in all of the
> libraries.
My point is more that it seems we want people to use av_strtod(), so
making it externally visible is not necessary. Although the data
speaks against that:
$ grep strtod ../lib{avcodec,avformat,avfilter,avresample,avutil,swscale}/*.c
../libavformat/rtmpproto.c: ff_amf_write_number(p, strtod(value, NULL));
../libavfilter/vf_frei0r.c: val.d = strtod(param, &tail);
../libavutil/eval.c:double av_strtod(const char *numstr, char **tail)
../libavutil/eval.c: d = strtod(numstr, &next);
../libavutil/eval.c: d->value = av_strtod(p->s, &next);
../libavutil/parseutils.c: alpha = 255 * strtod(alpha_string, &tail);
Why is av_strtod() externally visible instead of static, if it is
completely unused? Should all uses of strtod() use av_strtod()? I
think the answer to the ff_strtod() vs. #ifdef _MSC_VER vs.
avpriv_strtod() question depends on that first question?
Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel