Refresh callback pointer XXX (HaaTa) For some reason, either garbage collection, or something else, the pointer becomes stale in certain situations Usually when calling different library functions This just refreshes the pointer (shouldn't be necessary, but it works...)
()
| 638 | |
| 639 | |
| 640 | def refresh_callback(): |
| 641 | ''' |
| 642 | Refresh callback pointer |
| 643 | |
| 644 | XXX (HaaTa) |
| 645 | For some reason, either garbage collection, or something else, the pointer becomes stale in certain situations |
| 646 | Usually when calling different library functions |
| 647 | This just refreshes the pointer (shouldn't be necessary, but it works...) |
| 648 | ''' |
| 649 | # Prevent garbage collection |
| 650 | global callback_func |
| 651 | callback_func = control.CTYPE_callback( callback ) |
| 652 | |
| 653 | control.CTYPE_callback_ref = kiibohd.Host_register_callback( callback_func ) |
| 654 | |
| 655 | |
| 656 | def callback( command, args ): |
no outgoing calls
no test coverage detected
searching dependent graphs…