Open
Description
For example, both places define value_t
with slightly different sub-types. This makes it impossible to use the client library and anything depending on plugin.h
at the same time. For example, we couldn't have a plugin using the client lib and it's very hard to have common code between clients and the core without duplicating some of the core types yet another time.
I see these two solutions:
- Have a common header, say
types.h
which provides all core types in one place, then use it from wherever it's needed (e.g.plugin.h
andclient.h
). This header should not depend on anything else and any changes to it may affect the library API/ABI (hence, extra care will be required going forward). - Use different names for the types in the client lib. For example, use the
lcc_
prefix consistently.
I'd prefer the former.
Both of these changes would mean a library API change but I think that's justified (we may then want to clean up some other stuff as well, e.g. I noticed that lcc_flush()
only accepts an integer timeout while the daemon support sub-precision resolution or we may want to use char *
instead of char[LCC_NAME_LEN]