Skip to content

Commit ca6ca42

Browse files
committed
use Py_RETURN_NONE instead of packing a return tuple
1 parent f8a4a19 commit ca6ca42

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎evdev/uinput.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ uinput_create(PyObject *self, PyObject *args) {
7676
if (ioctl(fd, UI_DEV_CREATE) < 0)
7777
goto on_err;
7878

79-
80-
return Py_BuildValue("i", 1);
79+
Py_RETURN_NONE;
8180

8281
on_err:
8382
_uinput_close(fd);
@@ -99,7 +98,7 @@ uinput_close(PyObject *self, PyObject *args)
9998
return NULL;
10099
}
101100

102-
return Py_BuildValue("i", 1);
101+
Py_RETURN_NONE;
103102
}
104103

105104

@@ -124,7 +123,7 @@ uinput_write(PyObject *self, PyObject *args)
124123
return NULL;
125124
}
126125

127-
return Py_BuildValue("i", 1);
126+
Py_RETURN_NONE;
128127
}
129128

130129

@@ -158,7 +157,7 @@ uinput_enable_event(PyObject *self, PyObject *args)
158157
if (ioctl(fd, req, code) < 0)
159158
goto on_err;
160159

161-
return Py_BuildValue("i", 1);
160+
Py_RETURN_NONE;
162161

163162
on_err:
164163
_uinput_close(fd);

0 commit comments

Comments
 (0)