Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 95 10:15:56 MST
From:      terry@cs.weber.edu (Terry Lambert)
To:        dawes@physics.usyd.edu.au (David Dawes)
Cc:        ugen@netvision.net.il, hasty@netcom.com, dawes@physics.usyd.edu.au, hackers@FreeBSD.org
Subject:   Re: patches for X11R6??
Message-ID:  <9503161715.AA23508@cs.weber.edu>
In-Reply-To: <199503161146.AA01352@physics.su.oz.au> from "David Dawes" at Mar 16, 95 09:46:16 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> >Seems like <X11/Xlib.h> has a bug in XFree 3.0.
> >The bug is in definition of type Display (actually iy just
> >left undefined)
> 
> The details of the Display struct are supposed to be private (because
> they are implementation dependent).  For this reason, Display is
> defined in Xlib.h as:
> 
> typedef struct _XDisplay Display;
> 
> and struct _XDisplay is left undefined (although it is defined in
> Xlibint.h for internal use).  This means that the only legal way to
> refer to this type in a user program is as a pointer to it.
> 
> If you compile with XLIB_ILLEGAL_ACCESS defined, then struct _XDisplay
> is defined in Xlib.h.  Code that requires this is not portable.

Apparently there has been an opaquing of several structs in the
latest X release, including the GC.

I don't necessarily agree with all of the changes in this direction,
since there is a significant loss in speed in the additional function
call overhead for reading GC pixel value contents, for instance.  If
done on a SPARC processer, this in fact forces a push of the entire
stack frame (SPARC does this each four calls), which is a *very*
significant hit.  8-(.

I can understand them not wanting you to write the values directly
because of "server" side caching, but not wanting you to read
them makes little or no sense.

The "_ILLEGAL_ACCESS" for the GC is not backward compatible in any
case, since there are (gratuitous) changes to the layout of the
structure contents (elements are renamed).

There is a major difference between interface abstraction and the
rigorous enforcement of abstraction boundries.


					Terry Lambert
					terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9503161715.AA23508>