File tree 2 files changed +4
-45
lines changed
2 files changed +4
-45
lines changed Original file line number Diff line number Diff line change @@ -552,14 +552,10 @@ static PyMethodDef MethodTable[] = {
552
552
};
553
553
554
554
555
- #define MODULE_NAME "_input"
556
- #define MODULE_HELP "Python bindings to certain linux input subsystem functions"
557
-
558
- #if PY_MAJOR_VERSION >= 3
559
555
static struct PyModuleDef moduledef = {
560
556
PyModuleDef_HEAD_INIT ,
561
- MODULE_NAME ,
562
- MODULE_HELP ,
557
+ "_input" ,
558
+ "Python bindings to certain linux input subsystem functions" ,
563
559
-1 , /* m_size */
564
560
MethodTable , /* m_methods */
565
561
NULL , /* m_reload */
@@ -581,19 +577,3 @@ PyInit__input(void)
581
577
{
582
578
return moduleinit ();
583
579
}
584
-
585
- #else
586
- static PyObject *
587
- moduleinit (void )
588
- {
589
- PyObject * m = Py_InitModule3 (MODULE_NAME , MethodTable , MODULE_HELP );
590
- if (m == NULL ) return NULL ;
591
- return m ;
592
- }
593
-
594
- PyMODINIT_FUNC
595
- init_input (void )
596
- {
597
- moduleinit ();
598
- }
599
- #endif
Original file line number Diff line number Diff line change @@ -356,8 +356,6 @@ int _uinput_end_erase(int fd, struct uinput_ff_erase *upload)
356
356
return ioctl (fd , UI_END_FF_ERASE , upload );
357
357
}
358
358
359
- #define MODULE_NAME "_uinput"
360
- #define MODULE_HELP "Python bindings for parts of linux/uinput.c"
361
359
362
360
static PyMethodDef MethodTable [] = {
363
361
{ "open" , uinput_open , METH_VARARGS ,
@@ -390,11 +388,10 @@ static PyMethodDef MethodTable[] = {
390
388
{ NULL , NULL , 0 , NULL }
391
389
};
392
390
393
- #if PY_MAJOR_VERSION >= 3
394
391
static struct PyModuleDef moduledef = {
395
392
PyModuleDef_HEAD_INIT ,
396
- MODULE_NAME ,
397
- MODULE_HELP ,
393
+ "_uinput" ,
394
+ "Python bindings for parts of linux/uinput.c" ,
398
395
-1 , /* m_size */
399
396
MethodTable , /* m_methods */
400
397
NULL , /* m_reload */
@@ -418,21 +415,3 @@ PyInit__uinput(void)
418
415
{
419
416
return moduleinit ();
420
417
}
421
-
422
- #else
423
- static PyObject *
424
- moduleinit (void )
425
- {
426
- PyObject * m = Py_InitModule3 (MODULE_NAME , MethodTable , MODULE_HELP );
427
- if (m == NULL ) return NULL ;
428
-
429
- PyModule_AddIntConstant (m , "maxnamelen" , UINPUT_MAX_NAME_SIZE );
430
- return m ;
431
- }
432
-
433
- PyMODINIT_FUNC
434
- init_uinput (void )
435
- {
436
- moduleinit ();
437
- }
438
- #endif
You can’t perform that action at this time.
0 commit comments