From f41d9a88c07226d107b56873bdbc801e484b524e Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Fri, 14 Mar 2025 18:25:12 -0600 Subject: lib9p: Have all IDL-defined types implement fmt_formatter --- build-aux/measurestack/app_plugins.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (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 3a09272..36e661b 100644 --- a/build-aux/measurestack/app_plugins.py +++ b/build-aux/measurestack/app_plugins.py @@ -274,8 +274,20 @@ class Lib9PPlugin: _CONFIG_9P_NUM_SOCKS: int | None CONFIG_9P_SRV_MAX_REQS: int | None CONFIG_9P_SRV_MAX_DEPTH: int | None + formatters: typing.Collection[BaseName] + + def __init__( + self, + arg_base_dir: str, + arg_c_fnames: typing.Collection[str], + libobj_plugin: LibObjPlugin, + ) -> None: + self.formatters = { + x.base() + for x in libobj_plugin.objcalls["format"] + if str(x.base()).startswith("lib9p_") + } - def __init__(self, arg_base_dir: str, arg_c_fnames: typing.Collection[str]) -> None: # Find filenames ####################################################### def _is_config_h(fname: str) -> bool: @@ -389,6 +401,9 @@ class Lib9PPlugin: 2, self._skipmodel__lib9p_validate_unmarshal_marshal, ), + BaseName("_vfctprintf"): analyze.SkipModel( + self.formatters, self._skipmodel__vfctprintf + ), } if isinstance(self.CONFIG_9P_SRV_MAX_DEPTH, int): ret[BaseName("srv_util_pathfree")] = analyze.SkipModel( @@ -419,6 +434,13 @@ class Lib9PPlugin: ) return False + def _skipmodel__vfctprintf( + self, chain: typing.Sequence[QName], call: QName + ) -> bool: + if call.base() == BaseName("libfmt_conv_formatter"): + return any(c.base() in self.formatters for c in chain) + return False + class LibMiscPlugin: def is_intrhandler(self, name: QName) -> bool: -- cgit v1.2.3-2-g168b