Hi! On 27/03/11 22:20, Harald Welte wrote:
Hi Pablo,
On Sun, Mar 27, 2011 at 09:37:54PM +0200, pablo@gnumonks.org wrote:
This patch is a RFC, I can add the prefix osmocom_ to all functions in libosmocore to fix with the existing namespace pollution.
I think 'osmocom_' is too long. 'osmo_' should be better. And yes, generally it would make sense to prefix most functions.
Exceptions: * libosmovty should have a common vty_ prefix, but not osmo. * for libosmovty we should probably simply limit the number of exported symbols. There is e.g. all the buffer_*() and vector_*() use internally, but there is no need to globally export all those symbols. * no osmo_ prefix for msgb_* and tlv_*, as they are used everywhere * no prefix for talloc * bitvec_* -> osmo_bv_* * bsc_*_timer -> osmo_timer_* * *_signal_* -> osmo_signal_*
thanks for the feedback!
Let me know if you are OK with this approach and I'll send a patchset along this week.
I think it's great. Once the namespace is cleaned up, I think we can head for a 1.0 release of the libraries.
those are good news. BTW, do you plan to maintain a stable ABI along releases for libraries? Another proposition: it may be a good idea to use some EXPORT_SYMBOL() macro, similar to what we use in the Linux kernel, to explicit tell what symbols of the library are exported. We use this in libmnl: http://git.netfilter.org/cgi-bin/gitweb.cgi?p=libmnl.git;a=summary