diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-31 22:11:20 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-01 05:09:45 -0600 |
commit | 571ac844642796eb899dedccabcdc3c20926cac1 (patch) | |
tree | a064e0683be527d4601a70c54dd2f060c8a226d2 | |
parent | 2ced5e02eacfc6b9e67435fe3a24dcb6c3a29037 (diff) |
measurestack: Avoid using sorted() during analysis
-rw-r--r-- | build-aux/measurestack/analyze.py | 2 | ||||
-rw-r--r-- | build-aux/measurestack/app_plugins.py | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/build-aux/measurestack/analyze.py b/build-aux/measurestack/analyze.py index 871ff2d..0fb20ef 100644 --- a/build-aux/measurestack/analyze.py +++ b/build-aux/measurestack/analyze.py @@ -250,7 +250,7 @@ def analyze( if ":" not in str(funcname): qnames = qualified.get(BaseName(str(funcname)), set()) if len(qnames) == 1: - return sorted(qnames)[0] + return next(name for name in qnames) return None diff --git a/build-aux/measurestack/app_plugins.py b/build-aux/measurestack/app_plugins.py index 0bd5486..7eb7706 100644 --- a/build-aux/measurestack/app_plugins.py +++ b/build-aux/measurestack/app_plugins.py @@ -806,13 +806,14 @@ class TinyUSBDevicePlugin: assert m call = m.group("func") if call == "_ctrl_xfer.complete_cb": - return [ - # "process_test_mode_cb", + ret = { + # QName("process_test_mode_cb"), QName("tud_vendor_control_xfer_cb"), - *sorted(self.tud_drivers["control_xfer_cb"]), - ], False + } + ret.update(self.tud_drivers["control_xfer_cb"]) + return ret, False if call.startswith("driver->"): - return sorted(self.tud_drivers[call[len("driver->") :]]), False + return self.tud_drivers[call[len("driver->") :]], False if call == "event.func_call.func": # callback from usb_defer_func() return [], False |