summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-08-13 18:18:52 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-08-13 18:18:52 (GMT)
commit9ed5f2726607c57c894af24159b6a7ccf660da7f (patch)
treee1b779ecf1afd5d86eb955ed44b476f2d88dab10 /Objects/bytesobject.c
parent9eaa3e6732debf6a633f44cf3c82a0eaf8879a51 (diff)
downloadcpython-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/bytesobject.c')
-rw-r--r--Objects/bytesobject.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 056ac36..3a2906c 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -74,7 +74,7 @@ static PyBytesObject *nullstring;
PyObject *
PyBytes_FromStringAndSize(const char *str, Py_ssize_t size)
{
- register PyBytesObject *op;
+ PyBytesObject *op;
if (size < 0) {
PyErr_SetString(PyExc_SystemError,
"Negative size passed to PyBytes_FromStringAndSize");
@@ -126,8 +126,8 @@ PyBytes_FromStringAndSize(const char *str, Py_ssize_t size)
PyObject *
PyBytes_FromString(const char *str)
{
- register size_t size;
- register PyBytesObject *op;
+ size_t size;
+ PyBytesObject *op;
assert(str != NULL);
size = strlen(str);
@@ -513,7 +513,7 @@ PyObject *PyBytes_DecodeEscape(const char *s,
/* object api */
Py_ssize_t
-PyBytes_Size(register PyObject *op)
+PyBytes_Size(PyObject *op)
{
if (!PyBytes_Check(op)) {
PyErr_Format(PyExc_TypeError,
@@ -524,7 +524,7 @@ PyBytes_Size(register PyObject *op)
}
char *
-PyBytes_AsString(register PyObject *op)
+PyBytes_AsString(PyObject *op)
{
if (!PyBytes_Check(op)) {
PyErr_Format(PyExc_TypeError,
@@ -535,9 +535,9 @@ PyBytes_AsString(register PyObject *op)
}
int
-PyBytes_AsStringAndSize(register PyObject *obj,
- register char **s,
- register Py_ssize_t *len)
+PyBytes_AsStringAndSize(PyObject *obj,
+ char **s,
+ Py_ssize_t *len)
{
if (s == NULL) {
PyErr_BadInternalCall();
@@ -579,7 +579,7 @@ PyBytes_AsStringAndSize(register PyObject *obj,
PyObject *
PyBytes_Repr(PyObject *obj, int smartquotes)
{
- register PyBytesObject* op = (PyBytesObject*) obj;
+ PyBytesObject* op = (PyBytesObject*) obj;
Py_ssize_t i, length = Py_SIZE(op);
size_t newsize, squotes, dquotes;
PyObject *v;
@@ -718,12 +718,12 @@ bytes_concat(PyObject *a, PyObject *b)
}
static PyObject *
-bytes_repeat(register PyBytesObject *a, register Py_ssize_t n)
+bytes_repeat(PyBytesObject *a, Py_ssize_t n)
{
- register Py_ssize_t i;
- register Py_ssize_t j;
- register Py_ssize_t size;
- register PyBytesObject *op;
+ Py_ssize_t i;
+ Py_ssize_t j;
+ Py_ssize_t size;
+ PyBytesObject *op;
size_t nbytes;
if (n < 0)
n = 0;
@@ -793,7 +793,7 @@ bytes_contains(PyObject *self, PyObject *arg)
}
static PyObject *
-bytes_item(PyBytesObject *a, register Py_ssize_t i)
+bytes_item(PyBytesObject *a, Py_ssize_t i)
{
if (i < 0 || i >= Py_SIZE(a)) {
PyErr_SetString(PyExc_IndexError, "index out of range");
@@ -1461,9 +1461,9 @@ table, which must be a bytes object of length 256.");
static PyObject *
bytes_translate(PyBytesObject *self, PyObject *args)
{
- register char *input, *output;
+ char *input, *output;
const char *table;
- register Py_ssize_t i, c, changed = 0;
+ Py_ssize_t i, c, changed = 0;
PyObject *input_obj = (PyObject*)self;
const char *output_start, *del_table=NULL;
Py_ssize_t inlen, tablen, dellen = 0;
@@ -2748,9 +2748,9 @@ PyTypeObject PyBytes_Type = {
};
void
-PyBytes_Concat(register PyObject **pv, register PyObject *w)
+PyBytes_Concat(PyObject **pv, PyObject *w)
{
- register PyObject *v;
+ PyObject *v;
assert(pv != NULL);
if (*pv == NULL)
return;
@@ -2764,7 +2764,7 @@ PyBytes_Concat(register PyObject **pv, register PyObject *w)
}
void
-PyBytes_ConcatAndDel(register PyObject **pv, register PyObject *w)
+PyBytes_ConcatAndDel(PyObject **pv, PyObject *w)
{
PyBytes_Concat(pv, w);
Py_XDECREF(w);
@@ -2788,8 +2788,8 @@ PyBytes_ConcatAndDel(register PyObject **pv, register PyObject *w)
int
_PyBytes_Resize(PyObject **pv, Py_ssize_t newsize)
{
- register PyObject *v;
- register PyBytesObject *sv;
+ PyObject *v;
+ PyBytesObject *sv;
v = *pv;
if (!PyBytes_Check(v) || Py_REFCNT(v) != 1 || newsize < 0) {
*pv = 0;