[Jean Delvare]
> Your original reason for not going with a "static" set of function
> pointers but instead using a struct of them was that it would "allow
> for some extra flexibility". Could you elaborate on this?

I must admit, I do no longer remember why I wrote this.

Looking at the code, the advantage I see is that using a struct of
function pointers instead of direct references to functions make sure
all methods calls need to go through this defined interface, and that
new members can be appended to the struct in a later version without any
changes to precompiled library clients.  It also allow changes to the
implementation of these methods (like inserting a new output format or
an alternative implementation for the same format) without rebuilding
the client, which can be selected by new logic in set_output_format()
without affecting shared library clients.

I do not really care which approach is selected, my goal with the patch
was to make sure my proposed approach was understood and demonstrated to
be working, as I got the impression that my suggestion was to brief.

-- 
Happy hacking
Petter Reinholdtsen

Reply via email to