mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-17 20:35:40 +02:00
Add in slots to object model
This commit is contained in:
@@ -23,6 +23,8 @@ class ReadOnlyMapping(collections.abc.Mapping):
|
||||
modified, making an immutable mapping.
|
||||
"""
|
||||
|
||||
__slots__ = ("_dict",)
|
||||
|
||||
def __init__(self, dictionary: Mapping[str, Any]) -> None:
|
||||
self._dict = dictionary
|
||||
|
||||
@@ -63,6 +65,8 @@ class ObjectInformation(ReadOnlyMapping):
|
||||
in a single place. These values are based on the :class:`ReadOnlyMapping` class, to prevent their modification.
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
layer_name: str,
|
||||
@@ -98,6 +102,8 @@ class ObjectInterface(metaclass=abc.ABCMeta):
|
||||
"""A base object required to be the ancestor of every object used in
|
||||
volatility."""
|
||||
|
||||
__slots__ = ()
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
context: "interfaces.context.ContextInterface",
|
||||
@@ -305,6 +311,8 @@ class Template:
|
||||
constructed at resolution time and then cached.
|
||||
"""
|
||||
|
||||
__slots__ = "_vol"
|
||||
|
||||
def __init__(self, type_name: str, **arguments) -> None:
|
||||
"""Stores the keyword arguments for later object creation."""
|
||||
# Allow the updating of template arguments whilst still in template form
|
||||
|
||||
Reference in New Issue
Block a user