On Monday 03 September 2007, you wrote: > On Monday 03 September 2007, Henning Westerholt wrote: > > Well, i don't think introducing a wrapper function for all fixup > > functions is really pretty. > > I disagree. The module is the only one that has (and should have) > knowledge of which parameter means what. You moved that decision in a > function that wants to be generic and this created all the mess.
Good morning Dan, i tried to identify (and fix) some cases of code duplication, that was the reason that i moved the functions into the mod_fix.h. I don't changed anything of the functionality. But i understand and agree to you that the actual situation could be further improved. > > Perhaps we can introduce a additional > > parameter to the function interface? E.g.: > > > > fixup_str2int(void ** param, int param_no, int expected_param_no) > > and return an error if param_no > expected_param? > > Then what about a function that receives 2 parameters, a str and an int > which both need conversion from char* to str respectively int? Will you > write another special conversion function to handle both arguments? What > if the function changes and receives the int on the first position and > the string on the second? How many conversion functions will we need to > cover all cases? At the moment most of the modules implement their own fixup functions. If there is any "mess", than its in my opinion this practice. Cheers, Henning _______________________________________________ Devel mailing list Devel@openser.org http://openser.org/cgi-bin/mailman/listinfo/devel