Skip to content

Commit e717161

Browse files
committed
Use REP_ constants in input.c
1 parent 1f083ad commit e717161

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/evdev/input.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,23 +301,23 @@ static PyObject *
301301
ioctl_EVIOCGREP(PyObject *self, PyObject *args)
302302
{
303303
int fd, ret;
304-
unsigned int rep[2] = {0};
304+
unsigned int rep[REP_CNT] = {0};
305305
ret = PyArg_ParseTuple(args, "i", &fd);
306306
if (!ret) return NULL;
307307

308308
ret = ioctl(fd, EVIOCGREP, &rep);
309309
if (ret == -1)
310310
return NULL;
311311

312-
return Py_BuildValue("(ii)", rep[0], rep[1]);
312+
return Py_BuildValue("(ii)", rep[REP_DELAY], rep[REP_PERIOD]);
313313
}
314314

315315

316316
static PyObject *
317317
ioctl_EVIOCSREP(PyObject *self, PyObject *args)
318318
{
319319
int fd, ret;
320-
unsigned int rep[2] = {0};
320+
unsigned int rep[REP_CNT] = {0};
321321

322322
ret = PyArg_ParseTuple(args, "iii", &fd, &rep[0], &rep[1]);
323323
if (!ret) return NULL;

0 commit comments

Comments
 (0)