[Python-checkins] cpython: All modern compilers provide a offsetof() function
victor.stinner
python-checkins at python.org
Tue Jun 3 18:45:15 CEST 2014
http://hg.python.org/cpython/rev/88814d1f8c32
changeset: 90999:88814d1f8c32
user: Victor Stinner <victor.stinner at gmail.com>
date: Tue Jun 03 18:45:05 2014 +0200
summary:
All modern compilers provide a offsetof() function
offsetof() is used directly in many other .c files without any issue.
files:
Modules/socketmodule.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -288,10 +288,6 @@
#include <stddef.h>
-#ifndef offsetof
-# define offsetof(type, member) ((size_t)(&((type *)0)->member))
-#endif
-
#ifndef O_NONBLOCK
# define O_NONBLOCK O_NDELAY
#endif
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list