1010from vcorelib .namespace import CPP_DELIM , Namespace
1111
1212# internal
13- from runtimepy import PKG_NAME
1413from runtimepy .codec .protocol import Protocol
1514from runtimepy .enum import RuntimeEnum
16- from runtimepy .enum .registry import (
17- DEFAULT_ENUM_PRIMITIVE ,
18- EnumRegistry ,
19- RuntimeIntEnum ,
15+ from runtimepy .enum .registry import DEFAULT_ENUM_PRIMITIVE , RuntimeIntEnum
16+ from runtimepy .primitives .byte_order import (
17+ DEFAULT_BYTE_ORDER ,
18+ ByteOrder ,
19+ enum_registry ,
2020)
21- from runtimepy .primitives .byte_order import DEFAULT_BYTE_ORDER , ByteOrder
2221from runtimepy .primitives .types import AnyPrimitiveType , PrimitiveTypes
2322from runtimepy .registry .name import RegistryKey
2423from runtimepy .util import Identifier
@@ -54,7 +53,7 @@ def __init__(self, *namespace: str) -> None:
5453 self .custom : dict [str , Protocol ] = {}
5554 self .custom_ids = Identifier (scale = 1 )
5655
57- self ._enums = EnumRegistry ( )
56+ self ._enums = enum_registry ( register_byte_order = False )
5857
5958 global_namespace = Namespace (delim = CPP_DELIM )
6059
@@ -65,9 +64,8 @@ def __init__(self, *namespace: str) -> None:
6564 self .root_namespace = global_namespace
6665
6766 # Register enums.
68- with self .root_namespace .pushed (PKG_NAME ):
69- for enum in [ByteOrder ]:
70- self .runtime_int_enum (enum )
67+ for enum in [ByteOrder ]:
68+ self .runtime_int_enum (enum )
7169
7270 self .root_namespace = global_namespace .child (* namespace )
7371
0 commit comments