This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
IMHO the right way to do it is to define a "base class" struct, with only common elements (starting with int length and struct ops*), and let the I/O module create a derived structure with extra fields if it needs it. I don't like the "void *cookie" solution because (1) you get an additional pointer dereferencing cost, and (2) you get an extra set of malloc/free overhead.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |