Revert "Mark atom names argument to XInternAtoms as const"

This reverts commit c870111546.

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>
This commit is contained in:
Alan Coopersmith 2010-12-21 18:47:16 -08:00
parent 6459f9a48a
commit d2714d65e8
4 changed files with 9 additions and 9 deletions

View file

@ -1548,7 +1548,7 @@ extern Atom XInternAtom(
);
extern Status XInternAtoms(
Display* /* dpy */,
_Xconst char** /* names */,
char** /* names */,
int /* count */,
Bool /* onlyIfExists */,
Atom* /* atoms_return */

View file

@ -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

View file

@ -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>

View file

@ -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)