MCPcopy Create free account
hub / github.com/kiibohd/controller / refresh_callback

Function refresh_callback

Lib/host.py:640–653  ·  view source on GitHub ↗

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...)

()

Source from the content-addressed store, hash-verified

638
639
640def 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
656def callback( command, args ):

Callers 5

callback_setupMethod · 0.85
loopMethod · 0.85
refresh_callbackMethod · 0.85
cmdMethod · 0.85
callbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…