[PATCH 1/4] Hide a number of private symbols

Julien Cristau jcristau at debian.org
Fri Jul 31 05:36:38 PDT 2009


On Fri, Jul 31, 2009 at 14:06:39 +0200, Mark Kettenis wrote:

> > From: Julien Cristau <jcristau at debian.org>
> > Date: Fri, 31 Jul 2009 13:49:39 +0200
> > 
> > Add _X_HIDDEN for some symbols that aren't used outside of Xlib.
> > Make _XKeyInitialize static (with the associated code movement inside
> > src/KeyBind.c)
> 
> > +#ifdef XKB
> > +_X_HIDDEN
> > +#endif
> > +KeySym
> > +XKeycodeToKeysym(Display *dpy,
> 
> I don't think it is a good idea to hide symbols based on #ifdefs like
> that.  It's very easy to mess up the X11 ABI this way.
> 
Right, this part is a bit messy.  If XKB is enabled, KeyBind.c does

#define XKeycodeToKeysym        _XKeycodeToKeysym
#define XKeysymToKeycode        _XKeysymToKeycode
#define XLookupKeysym           _XLookupKeysym
#define XRefreshKeyboardMapping _XRefreshKeyboardMapping
#define XLookupString           _XLookupString

so these functions become internal, and the exported ones are from
xkb/XKBBind.c.  I'm not quite sure how to handle this more cleanly, so
suggestions are welcome.

Cheers,
Julien


More information about the xorg-devel mailing list