mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Minor fiddling related to
SF patch 416251 2.1c1 mmapmodule: unused vrbl cleanup
This commit is contained in:
parent
8449f6b95e
commit
d6283b84c8
1 changed files with 2 additions and 5 deletions
|
@ -163,16 +163,13 @@ static PyObject *
|
|||
mmap_read_byte_method(mmap_object *self,
|
||||
PyObject *args)
|
||||
{
|
||||
char value;
|
||||
char *where;
|
||||
CHECK_VALID(NULL);
|
||||
if (!PyArg_ParseTuple(args, ":read_byte"))
|
||||
return NULL;
|
||||
if (self->pos < self->size) {
|
||||
where = self->data + self->pos;
|
||||
value = (char) *(where);
|
||||
char value = self->data[self->pos];
|
||||
self->pos += 1;
|
||||
return Py_BuildValue("c", (char) *(where));
|
||||
return Py_BuildValue("c", value);
|
||||
} else {
|
||||
PyErr_SetString (PyExc_ValueError, "read byte out of range");
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue