[Libre-soc-bugs] [Bug 1094] insndb instruction database visitor-walker is needed
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Sat Jun 10 17:05:28 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=1094
--- Comment #103 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Dmitry Selyutin from comment #96)
> class VisitorMeta(type):
> def __init__(cls, name, bases, ns):
> cls.__registry = {}
> return super().__init__(cls)
this is placing the registry in *VisitorMeta*.
it needed to be the other way round:
x = super().__new__(cls, name, bases, dct)
x.registry = collections.defaultdict
return x
(remember also to pass *all* the arguments to type() otherwise it will
(a) have no base classes (b) have no functions... i mean *maybe* this
is good? doesn't seem like it, given that there are other functions
in VisitorMeta)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list