Closed schwehr closed 4 years ago
'hashtable' is not a public interface of CODA. And HARP can not depend on private interfaces of CODA. It will break things in terms of shared library versioning (how HARP links to a specific CODA shared library version for ABI compatibility), if we ever make a change in the hashtable code in CODA (since it won't be marked as a change in the public interface). Also, some platforms (e.g. Windows) don't like it if you try to use symbols that are not explicitly exported.
So the short answer is no.
The only proper way to reuse the CODA implementation of hashtable would be to make its api part of the public CODA api (which is not something we plan to do) or to turn the hashtable part into its own code base (which is overkill for how small the code is). So the current approach of having the implementation available twice is the most optimal in terms of maintenance and clear separation of the CODA and HARP code bases.
Both coda and harp have hashtable.[ch]. Can harp just use hashtable from coda as harp requires coda?
That would remove 440 lines from harp.