summaryrefslogtreecommitdiff
path: root/Modules/_ctypes/ctypes.h
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2017-02-04 15:05:40 -0800
committerSteve Dower <steve.dower@microsoft.com>2017-02-04 15:05:40 -0800
commitb2fa705fd3887c326e811c418469c784353027f4 (patch)
treeb3428f73de91453edbfd4df1a5d4a212d182eb44 /Modules/_ctypes/ctypes.h
parent134e58fd3aaa2e91390041e143f3f0a21a60142b (diff)
parentb53654b6dbfce8318a7d4d1cdaddca7a7fec194b (diff)
downloadcpython-b2fa705fd3887c326e811c418469c784353027f4.tar.gz
Issue #29392: Prevent crash when passing invalid arguments into msvcrt module.
Diffstat (limited to 'Modules/_ctypes/ctypes.h')
-rw-r--r--Modules/_ctypes/ctypes.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h
index f2df5c0e37..5d3b966338 100644
--- a/Modules/_ctypes/ctypes.h
+++ b/Modules/_ctypes/ctypes.h
@@ -31,9 +31,7 @@ union value {
long l;
float f;
double d;
-#ifdef HAVE_LONG_LONG
- PY_LONG_LONG ll;
-#endif
+ long long ll;
long double D;
};
@@ -303,9 +301,7 @@ struct tagPyCArgObject {
short h;
int i;
long l;
-#ifdef HAVE_LONG_LONG
- PY_LONG_LONG q;
-#endif
+ long long q;
long double D;
double d;
float f;
@@ -327,7 +323,7 @@ extern int
PyCData_set(PyObject *dst, PyObject *type, SETFUNC setfunc, PyObject *value,
Py_ssize_t index, Py_ssize_t size, char *ptr);
-extern void _ctypes_extend_error(PyObject *exc_class, char *fmt, ...);
+extern void _ctypes_extend_error(PyObject *exc_class, const char *fmt, ...);
struct basespec {
CDataObject *base;