From a226a1adf5e07f4281fcf95d3a69b7964159a95a Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Thu, 15 May 2025 13:16:20 -0600 Subject: lib9p: srv.c: Simplify handler calling --- build-aux/measurestack/app_plugins.py | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'build-aux/measurestack/app_plugins.py') diff --git a/build-aux/measurestack/app_plugins.py b/build-aux/measurestack/app_plugins.py index 1b10b67..f9dfe40 100644 --- a/build-aux/measurestack/app_plugins.py +++ b/build-aux/measurestack/app_plugins.py @@ -255,9 +255,6 @@ class LibCRIPCPlugin: class Lib9PPlugin: - re_tmessage_handler = re.compile( - r"^\s*\[LIB9P_TYP_T[^]]+\]\s*=\s*\(tmessage_handler\)\s*(?P\S+),\s*$" - ) re_lib9p_msg_entry = re.compile(r"^\s*_MSG_(?:[A-Z]+)\((?P\S+)\),$") re_lib9p_caller = re.compile( r"^lib9p_(?P[TR])msg_(?Pvalidate|unmarshal|marshal)$" @@ -266,7 +263,6 @@ class Lib9PPlugin: r"^(?Pvalidate|unmarshal|marshal)_(?P(?P[TR]).*)$" ) - tmessage_handlers: set[QName] | None lib9p_msgs: set[str] _CONFIG_9P_MAX_CONNS: int | None _CONFIG_9P_MAX_REQS: int | None @@ -323,16 +319,6 @@ class Lib9PPlugin: # Read sources ######################################################### - tmessage_handlers: set[QName] | None = None - if lib9p_srv_c_fname: - tmessage_handlers = set() - with open(lib9p_srv_c_fname, "r", encoding="utf-8") as fh: - for line in fh: - line = line.rstrip() - if m := self.re_tmessage_handler.fullmatch(line): - tmessage_handlers.add(QName(m.group("handler"))) - self.tmessage_handlers = tmessage_handlers - lib9p_msgs: set[str] = set() if lib9p_generated_c_fname: with open(lib9p_generated_c_fname, "r", encoding="utf-8") as fh: @@ -369,13 +355,6 @@ class Lib9PPlugin: ) -> tuple[typing.Collection[QName], bool] | None: if "/3rd-party/" in loc: return None - if ( - self.tmessage_handlers - and "/srv.c:" in loc - and "tmessage_handlers[typ](" in line - ): - # Functions for disabled protocol extensions will be missing. - return self.tmessage_handlers, True if self.lib9p_msgs and "/9p.c:" in loc: for meth in ["validate", "unmarshal", "marshal"]: if line.startswith(f"tentry.{meth}("): -- cgit v1.2.3-2-g168b