Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

Commit 5475ec8

Browse files
committed
Merge pull request gvalkov#49 from paulo-raca/no_unpack
remove `_input.unpack`, which is used nowhere
2 parents a0ee068 + b7f9afa commit 5475ec8

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

evdev/input.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -119,25 +119,6 @@ device_read_many(PyObject *self, PyObject *args)
119119
}
120120

121121

122-
// Unpack a single event (this is essentially a struct.unpack(), without having
123-
// to worry about word size.
124-
static PyObject *
125-
event_unpack(PyObject *self, PyObject *args)
126-
{
127-
struct input_event event;
128-
129-
const char *data;
130-
int len;
131-
132-
int ret = PyArg_ParseTuple(args, "s#", &data, &len);
133-
if (!ret) return NULL;
134-
135-
memcpy(&event, data, sizeof(event));
136-
137-
Py_RETURN_NONE;
138-
}
139-
140-
141122
// Get the event types and event codes that the input device supports
142123
static PyObject *
143124
ioctl_capabilities(PyObject *self, PyObject *args)
@@ -445,7 +426,6 @@ erase_effect(PyObject *self, PyObject *args)
445426

446427

447428
static PyMethodDef MethodTable[] = {
448-
{ "unpack", event_unpack, METH_VARARGS, "unpack a single input event" },
449429
{ "ioctl_devinfo", ioctl_devinfo, METH_VARARGS, "fetch input device info" },
450430
{ "ioctl_capabilities", ioctl_capabilities, METH_VARARGS, "fetch input device capabilities" },
451431
{ "ioctl_EVIOCGREP", ioctl_EVIOCGREP, METH_VARARGS},

0 commit comments

Comments
 (0)