>IIRC, if you use varargs then the compiler can't detect if the supplied
>parameters
>are of wrong type. Example :
[...]
>The compiler won't notice that the parameter is of wrong type
>and when the function will try to extract an int from the stack,
>it will get garbage.

This is indeed true, and that's why I chose to divide the function in 3 to
clarify this to the user.

>But if this is of no concern , then a simpler interface can be used :
[...]
>LAME_END_MARKER informs the lame_set_parameters to stop reading values,
>as AFAIK

This is exactly how my current interface works (based on TagItems when passed
on stack).

>there is not other way to determine whether all the args has been read 
>the __FLOAT and __INT attachments are there only to help illustrate my
>idea,
>but could be helpful in the actual implementation too

Yes, but this still requires the parameters to be correct, and parsing gets
abit more messy...


- CISC

--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to