[Python-checkins] cpython: the days of pre-standard C compilers are gone

benjamin.peterson python-checkins at python.org
Sun Feb 26 21:54:52 CET 2012


http://hg.python.org/cpython/rev/6322bf1647de
changeset:   75297:6322bf1647de
user:        Benjamin Peterson <benjamin at python.org>
date:        Sun Feb 26 15:54:47 2012 -0500
summary:
  the days of pre-standard C compilers are gone

files:
  Include/structmember.h |  10 ----------
  1 files changed, 0 insertions(+), 10 deletions(-)


diff --git a/Include/structmember.h b/Include/structmember.h
--- a/Include/structmember.h
+++ b/Include/structmember.h
@@ -9,16 +9,6 @@
 
 #include <stddef.h> /* For offsetof */
 
-/* The offsetof() macro calculates the offset of a structure member
-   in its structure.  Unfortunately this cannot be written down
-   portably, hence it is provided by a Standard C header file.
-   For pre-Standard C compilers, here is a version that usually works
-   (but watch out!): */
-
-#ifndef offsetof
-#define offsetof(type, member) ( (int) & ((type*)0) -> member )
-#endif
-
 /* An array of PyMemberDef structures defines the name, type and offset
    of selected members of a C structure.  These can be read by
    PyMember_GetOne() and set by PyMember_SetOne() (except if their READONLY

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list