summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-12-21 18:47:16 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-12-21 18:51:17 -0800
commitd2714d65e85b44abedf5f82e1a31506dba397ef2 (patch)
tree4c0133f3d38b430ef362a106269b376981d921b8
parent6459f9a48a82de3bc0235bd36acab2df11e436d5 (diff)
Revert "Mark atom names argument to XInternAtoms as const"
This reverts commit c8701115462b482d99ecff24d9de0f2806084ba5. The constification of a pointer to a pointer caused unexpected issues, and xorg-devel was unable to come up with a clean, safe, reasonable way to handle them, so we're chalking this up for now as yet another mistake in the Xlib API definition we'll be living with. See https://bugs.freedesktop.org/show_bug.cgi?id=32098 for details. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--include/X11/Xlib.h2
-rw-r--r--man/XInternAtom.man8
-rw-r--r--specs/libX11/CH04.xml4
-rw-r--r--src/IntAtom.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/include/X11/Xlib.h b/include/X11/Xlib.h
index b0d7d4dc..5c6c7707 100644
--- a/include/X11/Xlib.h
+++ b/include/X11/Xlib.h
@@ -1548,7 +1548,7 @@ extern Atom XInternAtom(
);
extern Status XInternAtoms(
Display* /* dpy */,
- _Xconst char** /* names */,
+ char** /* names */,
int /* count */,
Bool /* onlyIfExists */,
Atom* /* atoms_return */
diff --git a/man/XInternAtom.man b/man/XInternAtom.man
index 44aa68a6..237ed91c 100644
--- a/man/XInternAtom.man
+++ b/man/XInternAtom.man
@@ -144,11 +144,11 @@
XInternAtom, XInternAtoms, XGetAtomName, XGetAtomNames \- create or return atom names
.SH SYNTAX
.HP
-Atom XInternAtom\^(\^Display *\fIdisplay\fP\^, const char *\fIatom_name\fP\^,
-Bool \fIonly_if_exists\fP\^);
+Atom XInternAtom\^(\^Display *\fIdisplay\fP\^, char *\fIatom_name\fP\^, Bool
+\fIonly_if_exists\fP\^);
.HP
-Status XInternAtoms\^(\^Display *\fIdisplay\fP\^, const char **\fInames\fP\^,
-int \fIcount\fP\^, Bool \fIonly_if_exists\fP\^, Atom *\fIatoms_return\fP\^);
+Status XInternAtoms\^(\^Display *\fIdisplay\fP\^, char **\fInames\fP\^, int
+\fIcount\fP\^, Bool \fIonly_if_exists\fP\^, Atom *\fIatoms_return\fP\^);
.HP
char *XGetAtomName\^(\^Display *\fIdisplay\fP\^, Atom \fIatom\fP\^);
.HP
diff --git a/specs/libX11/CH04.xml b/specs/libX11/CH04.xml
index e2bca721..8a3e8c53 100644
--- a/specs/libX11/CH04.xml
+++ b/specs/libX11/CH04.xml
@@ -1054,7 +1054,7 @@ To return an atom for a given name, use
<funcprototype>
<funcdef>Atom <function>XInternAtom</function></funcdef>
<paramdef>Display<parameter> *display</parameter></paramdef>
- <paramdef>const char<parameter> *atom_name</parameter></paramdef>
+ <paramdef>char<parameter> *atom_name</parameter></paramdef>
<paramdef>Bool<parameter> only_if_exists</parameter></paramdef>
</funcprototype>
</funcsynopsis>
@@ -1136,7 +1136,7 @@ To return atoms for an array of names, use
<funcprototype>
<funcdef>Status <function>XInternAtoms</function></funcdef>
<paramdef>Display<parameter> *display</parameter></paramdef>
- <paramdef>const char<parameter> **names</parameter></paramdef>
+ <paramdef>char<parameter> **names</parameter></paramdef>
<paramdef>int<parameter> count</parameter></paramdef>
<paramdef>Bool<parameter> only_if_exists</parameter></paramdef>
<paramdef>Atom<parameter> *atoms_return</parameter></paramdef>
diff --git a/src/IntAtom.c b/src/IntAtom.c
index 80d78c08..7a562584 100644
--- a/src/IntAtom.c
+++ b/src/IntAtom.c
@@ -190,7 +190,7 @@ XInternAtom (
typedef struct {
unsigned long start_seq;
unsigned long stop_seq;
- const char **names;
+ char **names;
Atom *atoms;
int count;
Status status;
@@ -239,7 +239,7 @@ Bool _XIntAtomHandler(
Status
XInternAtoms (
Display *dpy,
- const char **names,
+ char **names,
int count,
Bool onlyIfExists,
Atom *atoms_return)