summaryrefslogtreecommitdiff
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-09-05 17:44:18 -0700
committerBenjamin Peterson <benjamin@python.org>2016-09-05 17:44:18 -0700
commit907ccded8b6fa68f6f572ae5de6760595df0d5a1 (patch)
treea03cb0fdb51f1f3233ea23064f80dd2dd5884306 /Modules/arraymodule.c
parent9ab8e90384fe86e90d02093f841411644b97ebca (diff)
downloadcpython-907ccded8b6fa68f6f572ae5de6760595df0d5a1.tar.gz
require a long long data type (closes #27961)
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 4d9a23fb99..8637cb52b1 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -418,8 +418,6 @@ LL_setitem(arrayobject *ap, Py_ssize_t i, PyObject *v)
return 0;
}
-#ifdef HAVE_LONG_LONG
-
static PyObject *
q_getitem(arrayobject *ap, Py_ssize_t i)
{
@@ -469,7 +467,6 @@ QQ_setitem(arrayobject *ap, Py_ssize_t i, PyObject *v)
((unsigned PY_LONG_LONG *)ap->ob_item)[i] = x;
return 0;
}
-#endif
static PyObject *
f_getitem(arrayobject *ap, Py_ssize_t i)
@@ -521,10 +518,8 @@ static const struct arraydescr descriptors[] = {
{'I', sizeof(int), II_getitem, II_setitem, "I", 1, 0},
{'l', sizeof(long), l_getitem, l_setitem, "l", 1, 1},
{'L', sizeof(long), LL_getitem, LL_setitem, "L", 1, 0},
-#ifdef HAVE_LONG_LONG
{'q', sizeof(PY_LONG_LONG), q_getitem, q_setitem, "q", 1, 1},
{'Q', sizeof(PY_LONG_LONG), QQ_getitem, QQ_setitem, "Q", 1, 0},
-#endif
{'f', sizeof(float), f_getitem, f_setitem, "f", 0, 0},
{'d', sizeof(double), d_getitem, d_setitem, "d", 0, 0},
{'\0', 0, 0, 0, 0, 0, 0} /* Sentinel */
@@ -1814,7 +1809,6 @@ typecode_to_mformat_code(char typecode)
intsize = sizeof(long);
is_signed = 0;
break;
-#if HAVE_LONG_LONG
case 'q':
intsize = sizeof(PY_LONG_LONG);
is_signed = 1;
@@ -1823,7 +1817,6 @@ typecode_to_mformat_code(char typecode)
intsize = sizeof(PY_LONG_LONG);
is_signed = 0;
break;
-#endif
default:
return UNKNOWN_FORMAT;
}
@@ -2685,11 +2678,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
}
}
PyErr_SetString(PyExc_ValueError,
-#ifdef HAVE_LONG_LONG
"bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)");
-#else
- "bad typecode (must be b, B, u, h, H, i, I, l, L, f or d)");
-#endif
return NULL;
}