Re: [PATCHES] symbol visibility



On Sat, 2008-08-16 at 02:39 +0200, Michael Biebl wrote:
> Michael Biebl wrote:
> > Dan Williams wrote:
> >> On Fri, 2008-08-15 at 23:06 +0200, Michael Biebl wrote:
> >>> Marcel Holtmann wrote:
> >>>
> >>>> If the versioning script would handle regular expression by itself, then
> >>>> that would be a lot simpler actually. At least I couldn't get that to
> >>>> work.
> >>> Afaik, this should work just fine. A version script like
> >>> {
> >>> global:
> >>> 	conman_*;
> >>> local:
> >>> 	*;
> >>> }
> >>>
> >>> should work in your case.
> >>>
> >>> Problem is, that within NM, the nm_* prefix is also used for private
> >>> functions, so we can't use that, unless we change all those private
> >>> functions to something like _nm_* (which would mean a lot of code changes)
> >> I don't really mind renaming internal things since that's obviously the
> >> "correct" thing to do.
> >>
> > 
> > Ok, so would you actually prefer this approach then?
> > A common nm_* prefix for publicly exported API and renaming of the
> > private API to _nm_* (or __nm_*) while symplifying the version script
> > and using a regexp nm_* (which means the version script doesn't have to
> > be touched on API changes)?
> > 
> 
> I did a bit of search and replace using sed and implemented this approach.
> 
> Patch 0002 now uses a regex and patch 0003 updates the sources to
> replace all occurences of private nm_* functions with __nm_*.
> I didn't change (private) functions, which don't start with a nm_
> prefix, like the crypto_* ones.
> 
> Patch 0004 finally fixes the test-crypto compilation (instead of
> removing it).
> 
> Dan, if you prefer to list all exported symbols explicitly in the
> version script, we could use patch 0002 from my last email, instead of
> the attached one.

Yes, lets do explicit listing for now.  If we hate it later we can
switch to a regex since that's an internal thing.  Lets get this in.

There are a few things that we can fix post-commit; for example the
crypto error quark type function needs to be public so that users of
nm_setting_802_1x_set_private_key() can figure out what the error
actually is; maybe a few others.

Thanks!
Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]