Rewrote the comments in the libraries under 'includes' in English (excluding those inside folders)
This commit is contained in:
@@ -5,15 +5,15 @@ from stdint import *
|
||||
|
||||
|
||||
class list[T]:
|
||||
"""堆上动态列表容器,基于 memhub.MemManager 多态分配器。
|
||||
"""Heap-allocated dynamic list container backed by memhub.MemManager polymorphic allocator.
|
||||
|
||||
用法:
|
||||
Usage:
|
||||
pool: memhub.MemManager = memhub.MemBuddy(arena, arena_size)
|
||||
nums: list[int] = list[int](pool)
|
||||
nums.append(42)
|
||||
x: int = nums.get(0)
|
||||
|
||||
对于指针类型(如 AST | t.CPtr),传 elem_size=8 避免对象切片:
|
||||
For pointer types (e.g. AST | t.CPtr), pass elem_size=8 to avoid object slicing:
|
||||
lst: list[AST | t.CPtr] = list[AST | t.CPtr](pool, 8)
|
||||
"""
|
||||
__data__: t.CVoid | t.CPtr
|
||||
|
||||
Reference in New Issue
Block a user