summaryrefslogtreecommitdiff
path: root/Modules/_ctypes
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-05-14 07:25:37 +0000
committerMartin Panter <vadmium+py@gmail.com>2016-05-14 07:25:37 +0000
commitf45c1755c32bac80059e463039f7f0a644593189 (patch)
treef587076cd3547b7ad8647df66cec07057961f4fe /Modules/_ctypes
parent0e1c5f7dae23ce0a3a8604a950349c2f0767de32 (diff)
downloadcpython-git-f45c1755c32bac80059e463039f7f0a644593189.tar.gz
Remove PEP 291 compatibility requirements for ctypes and modulefinder
https://mail.python.org/pipermail/python-dev/2016-May/144502.html
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r--Modules/_ctypes/_ctypes.c3
-rw-r--r--Modules/_ctypes/_ctypes_test.c7
-rw-r--r--Modules/_ctypes/callbacks.c3
-rw-r--r--Modules/_ctypes/callproc.c3
-rw-r--r--Modules/_ctypes/cfield.c3
-rw-r--r--Modules/_ctypes/ctypes.h3
-rw-r--r--Modules/_ctypes/ctypes_dlfcn.h4
-rw-r--r--Modules/_ctypes/malloc_closure.c4
-rw-r--r--Modules/_ctypes/stgdict.c5
9 files changed, 12 insertions, 23 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index fe79b08c00..9baf4b36ff 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -1,5 +1,6 @@
/*****************************************************************
- This file should be kept compatible with Python 2.3, see PEP 291.
+ This file contains remnant Python 2.3 compatibility code that is no longer
+ strictly required.
*****************************************************************/
diff --git a/Modules/_ctypes/_ctypes_test.c b/Modules/_ctypes/_ctypes_test.c
index a52f650a2b..57628b8993 100644
--- a/Modules/_ctypes/_ctypes_test.c
+++ b/Modules/_ctypes/_ctypes_test.c
@@ -1,12 +1,7 @@
-/*****************************************************************
- This file should be kept compatible with Python 2.3, see PEP 291.
- *****************************************************************/
-
-
#include <Python.h>
/*
- Backwards compatibility:
+ Backwards compatibility, no longer strictly required:
Python2.2 used LONG_LONG instead of PY_LONG_LONG
*/
#if defined(HAVE_LONG_LONG) && !defined(PY_LONG_LONG)
diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c
index 47dbe05a51..b1e85ced8e 100644
--- a/Modules/_ctypes/callbacks.c
+++ b/Modules/_ctypes/callbacks.c
@@ -1,5 +1,6 @@
/*****************************************************************
- This file should be kept compatible with Python 2.3, see PEP 291.
+ This file contains remnant Python 2.3 compatibility code that is no longer
+ strictly required.
*****************************************************************/
#include "Python.h"
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index 7007b7cebd..280a315828 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -1,5 +1,6 @@
/*****************************************************************
- This file should be kept compatible with Python 2.3, see PEP 291.
+ This file contains remnant Python 2.3 compatibility code that is no longer
+ strictly required.
*****************************************************************/
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
index 85b5ad2890..0585ed28dd 100644
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -1,5 +1,6 @@
/*****************************************************************
- This file should be kept compatible with Python 2.3, see PEP 291.
+ This file contains remnant Python 2.3 compatibility code that is no longer
+ strictly required.
*****************************************************************/
#include "Python.h"
diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h
index b88cf4f469..a61ce5f326 100644
--- a/Modules/_ctypes/ctypes.h
+++ b/Modules/_ctypes/ctypes.h
@@ -1,5 +1,6 @@
/*****************************************************************
- This file should be kept compatible with Python 2.3, see PEP 291.
+ This file contains remnant Python 2.3 compatibility code that is no longer
+ strictly required.
*****************************************************************/
#if defined (__SVR4) && defined (__sun)
diff --git a/Modules/_ctypes/ctypes_dlfcn.h b/Modules/_ctypes/ctypes_dlfcn.h
index d8bf904be2..54cdde9a4f 100644
--- a/Modules/_ctypes/ctypes_dlfcn.h
+++ b/Modules/_ctypes/ctypes_dlfcn.h
@@ -1,7 +1,3 @@
-/*****************************************************************
- This file should be kept compatible with Python 2.3, see PEP 291.
- *****************************************************************/
-
#ifndef _CTYPES_DLFCN_H_
#define _CTYPES_DLFCN_H_
diff --git a/Modules/_ctypes/malloc_closure.c b/Modules/_ctypes/malloc_closure.c
index b98d43b6d0..248c6a6702 100644
--- a/Modules/_ctypes/malloc_closure.c
+++ b/Modules/_ctypes/malloc_closure.c
@@ -1,7 +1,3 @@
-/*****************************************************************
- This file should be kept compatible with Python 2.3, see PEP 291.
- *****************************************************************/
-
#include <Python.h>
#include <ffi.h>
#ifdef MS_WIN32
diff --git a/Modules/_ctypes/stgdict.c b/Modules/_ctypes/stgdict.c
index 17b9760143..31528af0f7 100644
--- a/Modules/_ctypes/stgdict.c
+++ b/Modules/_ctypes/stgdict.c
@@ -1,7 +1,3 @@
-/*****************************************************************
- This file should be kept compatible with Python 2.3, see PEP 291.
- *****************************************************************/
-
#include "Python.h"
#include <ffi.h>
#ifdef MS_WIN32
@@ -449,6 +445,7 @@ PyCStructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct
Py_DECREF(pair);
PyErr_Format(PyExc_TypeError,
#if (PY_VERSION_HEX < 0x02050000)
+ /* Compatibility no longer strictly required */
"second item in _fields_ tuple (index %d) must be a C type",
#else
"second item in _fields_ tuple (index %zd) must be a C type",