[PATCH:libxkbfile 4/4] Constify atom name argument to XkbInternAtom
Alan Coopersmith
alan.coopersmith at oracle.com
Sat Oct 26 23:10:02 CEST 2013
Matches XInternAtom, which it wraps, and quiets a bunch of const warnings
in xkbcomp.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
include/X11/extensions/XKBfile.h | 2 +-
src/xkbatom.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/X11/extensions/XKBfile.h b/include/X11/extensions/XKBfile.h
index a59b16a..1455463 100644
--- a/include/X11/extensions/XKBfile.h
+++ b/include/X11/extensions/XKBfile.h
@@ -249,7 +249,7 @@ extern char * XkbAtomGetString(
extern Atom XkbInternAtom(
Display * /* dpy */,
- char * /* name */,
+ const char */* name */,
Bool /* onlyIfExists */
);
diff --git a/src/xkbatom.c b/src/xkbatom.c
index 8878892..c55ee44 100644
--- a/src/xkbatom.c
+++ b/src/xkbatom.c
@@ -103,7 +103,7 @@ static unsigned long tableLength;
static NodePtr *nodeTable;
static Atom
-_XkbMakeAtom(char *string, unsigned len, Bool makeit)
+_XkbMakeAtom(const char *string, unsigned len, Bool makeit)
{
register NodePtr *np;
unsigned i;
@@ -204,7 +204,7 @@ XkbAtomGetString(Display *dpy, Atom atm)
/***====================================================================***/
Atom
-XkbInternAtom(Display *dpy, char *name, Bool onlyIfExists)
+XkbInternAtom(Display *dpy, const char *name, Bool onlyIfExists)
{
if (name == NULL)
return None;
--
1.7.9.2
More information about the xorg-devel
mailing list