Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cpp/primitives/id_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

namespace omnimalloc {

// Must match IdType in src/python/omnimalloc/primitives/allocation.py
using IdType = std::variant<int64_t, std::string>;

struct IdTypeHash {
Expand Down
5 changes: 3 additions & 2 deletions src/python/omnimalloc/common/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
class Registered(ABC):
"""Mixin for auto-registering and managing subclasses.

Any direct subclass of will maintain its own registry. Any subclass of that
subclass that's not abstract will be registered in the subclass's registry.
Any direct subclass of Registered will maintain its own registry. Any
subclass of that subclass that's not abstract will be registered in the
direct subclass's registry.
"""

_registry: ClassVar[dict[str, type[Self]]]
Expand Down
1 change: 1 addition & 0 deletions src/python/omnimalloc/primitives/allocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from omnimalloc._cpp import Allocation, BufferKind

# Type alias for allocation identifiers (int or str)
# Must match IdType in src/cpp/primitives/id_type.hpp
IdType = int | str

__all__ = ["Allocation", "BufferKind", "IdType"]
Loading