This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libiberty: hashtab allocation functions with an extra argument
Is there any reason we can't reuse the existing function pointers, by
passing the extra pointer as the *last* argument? That would avoid
the case where both sets of pointers are set. The question is, is
there a platform where passing more parameters than expected causes
problems?
Apps which need the extra-arg variant would simply cast the function
to the original type, like this:
htab_alloc(... (htab_free)my_free, ...);