[PATCH] [RFC] src: add prefix osmocom_ to all functions in libosmocore

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Sun Mar 27 20:20:54 UTC 2011


Hi Pablo,

On Sun, Mar 27, 2011 at 09:37:54PM +0200, pablo at 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_*

> 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.
-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)




More information about the OpenBSC mailing list