diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-08-13 18:18:52 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-08-13 18:18:52 (GMT) |
commit | 9ed5f2726607c57c894af24159b6a7ccf660da7f (patch) | |
tree | e1b779ecf1afd5d86eb955ed44b476f2d88dab10 /Objects/tupleobject.c | |
parent | 9eaa3e6732debf6a633f44cf3c82a0eaf8879a51 (diff) | |
download | cpython-9ed5f2726607c57c894af24159b6a7ccf660da7f.zip cpython-9ed5f2726607c57c894af24159b6a7ccf660da7f.tar.gz cpython-9ed5f2726607c57c894af24159b6a7ccf660da7f.tar.bz2 |
Issue #18722: Remove uses of the "register" keyword in C code.
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r-- | Objects/tupleobject.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 52896b7..a33d8c0 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -63,9 +63,9 @@ _PyTuple_DebugMallocStats(FILE *out) } PyObject * -PyTuple_New(register Py_ssize_t size) +PyTuple_New(Py_ssize_t size) { - register PyTupleObject *op; + PyTupleObject *op; Py_ssize_t i; if (size < 0) { PyErr_BadInternalCall(); @@ -122,7 +122,7 @@ PyTuple_New(register Py_ssize_t size) } Py_ssize_t -PyTuple_Size(register PyObject *op) +PyTuple_Size(PyObject *op) { if (!PyTuple_Check(op)) { PyErr_BadInternalCall(); @@ -133,7 +133,7 @@ PyTuple_Size(register PyObject *op) } PyObject * -PyTuple_GetItem(register PyObject *op, register Py_ssize_t i) +PyTuple_GetItem(PyObject *op, Py_ssize_t i) { if (!PyTuple_Check(op)) { PyErr_BadInternalCall(); @@ -147,10 +147,10 @@ PyTuple_GetItem(register PyObject *op, register Py_ssize_t i) } int -PyTuple_SetItem(register PyObject *op, register Py_ssize_t i, PyObject *newitem) +PyTuple_SetItem(PyObject *op, Py_ssize_t i, PyObject *newitem) { - register PyObject *olditem; - register PyObject **p; + PyObject *olditem; + PyObject **p; if (!PyTuple_Check(op) || op->ob_refcnt != 1) { Py_XDECREF(newitem); PyErr_BadInternalCall(); @@ -224,10 +224,10 @@ PyTuple_Pack(Py_ssize_t n, ...) /* Methods */ static void -tupledealloc(register PyTupleObject *op) +tupledealloc(PyTupleObject *op) { - register Py_ssize_t i; - register Py_ssize_t len = Py_SIZE(op); + Py_ssize_t i; + Py_ssize_t len = Py_SIZE(op); PyObject_GC_UnTrack(op); Py_TRASHCAN_SAFE_BEGIN(op) if (len > 0) { @@ -330,10 +330,10 @@ error: static Py_hash_t tuplehash(PyTupleObject *v) { - register Py_uhash_t x; /* Unsigned for defined overflow behavior. */ - register Py_hash_t y; - register Py_ssize_t len = Py_SIZE(v); - register PyObject **p; + Py_uhash_t x; /* Unsigned for defined overflow behavior. */ + Py_hash_t y; + Py_ssize_t len = Py_SIZE(v); + PyObject **p; Py_uhash_t mult = _PyHASH_MULTIPLIER; x = 0x345678UL; p = v->ob_item; @@ -370,7 +370,7 @@ tuplecontains(PyTupleObject *a, PyObject *el) } static PyObject * -tupleitem(register PyTupleObject *a, register Py_ssize_t i) +tupleitem(PyTupleObject *a, Py_ssize_t i) { if (i < 0 || i >= Py_SIZE(a)) { PyErr_SetString(PyExc_IndexError, "tuple index out of range"); @@ -381,12 +381,12 @@ tupleitem(register PyTupleObject *a, register Py_ssize_t i) } static PyObject * -tupleslice(register PyTupleObject *a, register Py_ssize_t ilow, - register Py_ssize_t ihigh) +tupleslice(PyTupleObject *a, Py_ssize_t ilow, + Py_ssize_t ihigh) { - register PyTupleObject *np; + PyTupleObject *np; PyObject **src, **dest; - register Py_ssize_t i; + Py_ssize_t i; Py_ssize_t len; if (ilow < 0) ilow = 0; @@ -423,10 +423,10 @@ PyTuple_GetSlice(PyObject *op, Py_ssize_t i, Py_ssize_t j) } static PyObject * -tupleconcat(register PyTupleObject *a, register PyObject *bb) +tupleconcat(PyTupleObject *a, PyObject *bb) { - register Py_ssize_t size; - register Py_ssize_t i; + Py_ssize_t size; + Py_ssize_t i; PyObject **src, **dest; PyTupleObject *np; if (!PyTuple_Check(bb)) { @@ -836,8 +836,8 @@ PyTypeObject PyTuple_Type = { int _PyTuple_Resize(PyObject **pv, Py_ssize_t newsize) { - register PyTupleObject *v; - register PyTupleObject *sv; + PyTupleObject *v; + PyTupleObject *sv; Py_ssize_t i; Py_ssize_t oldsize; |