>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/ )
- Re: [MP3 ENCODER] TagItem issues... Robert Hegemann
- Re: [MP3 ENCODER] TagItem issues... Sigbjørn Skjæret
- Re: [MP3 ENCODER] TagItem issues... Robert Hegemann
- Re: [MP3 ENCODER] TagItem issues... Sigbjørn Skjæret
- Re: [MP3 ENCODER] TagItem issues... Frank Klemm
- Re: [MP3 ENCODER] TagItem issues... Mark Taylor
- Re: [MP3 ENCODER] TagItem issues... Robert Hegemann
- Re: [MP3 ENCODER] TagItem issues... Takehiro Tominaga
- Re: [MP3 ENCODER] TagItem issues... Sigbjørn Skjæret
- Re: [MP3 ENCODER] TagItem issues... David Balazic
- Re: [MP3 ENCODER] TagItem issues... Sigbjørn Skjæret
- Re: [MP3 ENCODER] TagItem issues... David Balazic
- Re: [MP3 ENCODER] TagItem issues... Sigbjørn Skjæret
- Re: [MP3 ENCODER] TagItem issues... David Balazic
- Re: [MP3 ENCODER] TagItem issues... Sigbjørn Skjæret
- [MP3 ENCODER] Please Vote: Interface types Frank Klemm
- Re: [MP3 ENCODER] Please Vote: Interface types Robert Hegemann
- Re: [MP3 ENCODER] Please Vote: Interface types Whatever
- Re: [MP3 ENCODER] TagItem issues... David Balazic
- Re: [MP3 ENCODER] TagItem issues... Frank Klemm
- Re: [MP3 ENCODER] TagItem issues... David Balazic