diff options
| author | Catherine <whitequark@whitequark.org> | 2024-05-24 03:32:08 +0000 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2024-06-04 11:48:32 -0400 |
| commit | ba88ba867035e7cd32ac967075d6e4df0dcb18d3 (patch) | |
| tree | 0d429c4eee422324c8f1d254cf30c86b0aa33234 /python | |
| parent | def0569c3e235c02e4db6c34e9c0e49cdfb7a272 (diff) | |
python/architecture: return instance from `Architecture.register()`
Diffstat (limited to 'python')
| -rw-r--r-- | python/architecture.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/architecture.py b/python/architecture.py index ce8c4e63..87fe3ee9 100644 --- a/python/architecture.py +++ b/python/architecture.py @@ -525,13 +525,14 @@ class Architecture(metaclass=_ArchitectureMetaClass): return self.name @classmethod - def register(cls) -> None: + def register(cls) -> 'Architecture': binaryninja._init_plugins() if cls.name is None: raise ValueError("architecture 'name' is not defined") arch = cls() cls._registered_cb = arch._cb arch.handle = core.BNRegisterArchitecture(cls.name, arch._cb) + return arch @property def full_width_regs(self) -> List[RegisterName]: |
