Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86496 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57191 invoked from network); 5 Jun 2015 13:58:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jun 2015 13:58:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.172 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.223.172 mail-ie0-f172.google.com Received: from [209.85.223.172] ([209.85.223.172:35352] helo=mail-ie0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D8/20-54427-21BA1755 for ; Fri, 05 Jun 2015 09:58:42 -0400 Received: by iesa3 with SMTP id a3so58442712ies.2 for ; Fri, 05 Jun 2015 06:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=J62mMwrjgTDUet85mopc3xXgSqQOVRquVzrrV/YM/UA=; b=O88kuZ7tDbM6m26zFYDAqNpeFL7o4thwg+sIjUw3BXVKKgvla6reXdXh9Z4QI810xy Hr4jS0f5mJBgOUUCnJ1T3ULdd6T+AfHWhIJTpblrdS5E2yTT8NOnQxyfvbRxEyL7x0Nm smHr16zffCreBSQTt/gO8WyzP0YvZGRWH+ooswq3l7lQav0F1zVe/vY7Ez8Dc9I8qG3R OqhWc2fI4jrlhnSRwoZM7MikOYhnU0mFG3VSuFspo1R9FbCNn+/m3NU85nNmgSsQxmvK ZZmKc9Ia5s1C5q64IEnJZ5udcc4Y0bXzxqP7MHM4gLcD7C+jhwIWx5b/iNXzrXMUC2At RILw== MIME-Version: 1.0 X-Received: by 10.42.161.74 with SMTP id s10mr10414608icx.5.1433512719076; Fri, 05 Jun 2015 06:58:39 -0700 (PDT) Sender: morrison.levi@gmail.com Received: by 10.79.20.5 with HTTP; Fri, 5 Jun 2015 06:58:39 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Jun 2015 07:58:39 -0600 X-Google-Sender-Auth: l3yE7OCiNwQw-Upqwt2r8muB4Vs Message-ID: To: Joe Watkins Cc: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] offsetof and XtOffsetOf From: levim@php.net (Levi Morrison) 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.