On Sat, May 22, 2010 at 08:11:29PM -0700, Keith Packard wrote: > On Sat, 22 May 2010 09:16:48 -0700, Jeremy Huddleston <[email protected]> > wrote: > > > I think in this case, miFillPolyHelper should take a const pGC and > > pass it casted to non-const to ChangeGC (since it knows it will be > > preserved by another handshaking method). > > Yuck. I'd rather not see the server cluttered by casts in the name of > adding 'const' everywhere. It's just not that useful.
In most cases, that simply indicates that the problem isn't superficial, and requires some work. fwiw, I use this patch to filter out some of the longstanding deficiences in X's headers. ymmv / awai -- Thomas E. Dickey <[email protected]> http://invisible-island.net ftp://invisible-island.net
--- Intrinsic.h.orig 2009-08-25 13:22:15.000000000 -0400
+++ Intrinsic.h 2009-12-06 09:48:39.000000000 -0500
@@ -66,7 +66,11 @@
#define XtSpecificationRelease 6
+#ifdef _CONST_X_STRING
+typedef const char *String;
+#else
typedef char *String;
+#endif
/* We do this in order to get "const" declarations to work right. We
* use _XtString instead of String so that C++ applications can
--- Xresource.h.orig 2009-07-19 14:43:21.000000000 -0400
+++ Xresource.h 2009-12-06 10:11:19.000000000 -0500
@@ -338,8 +338,8 @@
} XrmOptionKind;
typedef struct {
- char *option; /* Option abbreviation in argv */
- char *specifier; /* Resource specifier */
+ _Xconst char *option; /* Option abbreviation in argv */
+ _Xconst char *specifier; /* Resource specifier */
XrmOptionKind argKind; /* Which style of option it is */
XPointer value; /* Value to provide if XrmoptionNoArg */
} XrmOptionDescRec, *XrmOptionDescList;
signature.asc
Description: Digital signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
