Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86497 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60288 invoked from network); 5 Jun 2015 14:42:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jun 2015 14:42:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.213.51 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.213.51 mail-yh0-f51.google.com Received: from [209.85.213.51] ([209.85.213.51:34445] helo=mail-yh0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/80-54427-465B1755 for ; Fri, 05 Jun 2015 10:42:45 -0400 Received: by yhid80 with SMTP id d80so10631137yhi.1 for ; Fri, 05 Jun 2015 07:42:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=nPxJ2D2DRUP0DM4PtrXohw+Zq2beJauZUkUgTJeeOh8=; b=QYB4sYgzhrTzUAdXwu5ck/+mCeVsUYcG7lH5NHVoq0GsXGv9pJqyL69u4190AIm/kX HIyjIl+Gldctn8rH8TdUZVy9V/j9oZ5BWtzF26GQzRzJSKa2tsntSwh9YKLxP0k8vRQx H+O7437YLhxp52BPdjiiVwGnAx4sIgAQUc3ANLZyh21Wz2g4aXmYw/7gsEKDuK7tDYe6 kEb/fiaMahvCk4Q4lqAEFkpOmZ3pUsgA45/OGORVSCkNL1c952eIU0nKVboBHIJdmis1 kkSAlP2vwyPYju8loua0REKF8TkuefaKErEMJswjDlPrhNi0/OxEpslyeWcrmkctT8w3 2zHA== X-Gm-Message-State: ALoCoQmCUmoOlPlsMvpIpXYT1qWmPjymMmVT/5hP043sJ7CyQ6QxxhyNSB5O9LMN6Gt1yzicNXBZ MIME-Version: 1.0 X-Received: by 10.170.216.135 with SMTP id i129mr3808998ykf.116.1433515361933; Fri, 05 Jun 2015 07:42:41 -0700 (PDT) Received: by 10.129.72.205 with HTTP; Fri, 5 Jun 2015 07:42:41 -0700 (PDT) X-Originating-IP: [86.149.77.111] In-Reply-To: References: Date: Fri, 5 Jun 2015 15:42:41 +0100 Message-ID: To: Levi Morrison Cc: internals Content-Type: multipart/alternative; boundary=001a1139eb8eedb5780517c64d5c Subject: Re: [PHP-DEV] offsetof and XtOffsetOf From: pthreads@pthreads.org (Joe Watkins) --001a1139eb8eedb5780517c64d5c Content-Type: text/plain; charset=UTF-8 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 wrote: > On Thu, Jun 4, 2015 at 11:58 PM, Joe Watkins > 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 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. > --001a1139eb8eedb5780517c64d5c--