Re: offsetof and XtOffsetOf
| From: | Joe Watkins | Date: | Fri, 05 Jun 2015 14:42:41 +0000 |
| Subject: | Re: offsetof and XtOffsetOf | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86497@lists.php.net to get a copy of this message | ||
The comment seems to suggest we copied the XtOffset stuff from apache
source (which copied it from X), verbatim, is that not explanation enough ?
Is there any particular reason to change it ?
Cheers
Joe
On Fri, Jun 5, 2015 at 2:58 PM, Levi Morrison <levim@php.net> wrote:
> On Thu, Jun 4, 2015 at 11:58 PM, Joe Watkins <pthreads@pthreads.org>
> wrote:
> > Explained here:
> > http://lxr.php.net/xref/PHP_TRUNK/main/php.h#415
> >
> >
> > On Fri, Jun 5, 2015 at 5:06 AM, Levi Morrison <levim@php.net> wrote:
> >>
> >> The macro offsetof is required by the C89 standard to be defined in
> >> stddef.h and remains in newer standards. The macro XtOffsetOf is
> >> non-standard that is as far as I can tell a part of the X Toolkit
> >> Intrinsics or Xlib.
> >>
> >> Does anyone know the reasons why we are using the non-standard macro
> >> instead of the standard one?
>
> Thanks, Joe. However, that code just explains why are macros are that
> way. It doesn't justify the use of XtOffsetOf over offsetof, just how
> the ifdefs were obtained.
>