Attention is currently required from: daniel, fixeria, lynxis lazus, osmith, pespin.
1 comment:
File src/tcap.c:
But as mentioned above, defining it as weak actually deceives the reason to have the global symbol in first place, apps are still not required to set it, so we are in the same position as with using a real function API.
I was thinking of declaring it as non-weak in the library, but defining it as weak in all the applications/libraries that use it. This way at least one of them must define it, while still not clashing?
The "perfect" solutions for multiple users of libasn1c would likely have been to make all calls pass around a context, so each user (in another library or application) can pass the talloc context into each encode/decode operation, and hence track only their own objects' memory usage wherever they want - doing away with a global variable in the first place. That in turn however of course breaks the asn1c API. Too late for libasn1c, but potentially not yet for libosmo-asn1-tcap. However, I think the number of new users we see for libosmo-asn1-tcap is likely very low, so also not really worth it.
Feel free to go ahead with your approach, if you think it's superior.
To view, visit change 42219. To unsubscribe, or for help writing mail filters, visit settings.