Skip to content

Fix Zig 0.16 compatibility by replacing deprecated#39

Open
kalelidev wants to merge 1 commit into
zig-gamedev:mainfrom
kalelidev:zflecs-0.16.0
Open

Fix Zig 0.16 compatibility by replacing deprecated#39
kalelidev wants to merge 1 commit into
zig-gamedev:mainfrom
kalelidev:zflecs-0.16.0

Conversation

@kalelidev
Copy link
Copy Markdown

Summary

Fix Zig 0.16 compatibility by replacing deprecated std.heap.GeneralPurposeAllocator with std.heap.DebugAllocator.
url: https://ziglang.org/documentation/0.16.0/#toc-Choosing-an-Allocator

Changes

Updated allocator declarations in zflecs.zig:

std.heap.GeneralPurposeAllocator(.{})

std.heap.DebugAllocator(.{})

Why

GeneralPurposeAllocator is no longer available in Zig 0.16 stdlib.

DebugAllocator is the supported replacement and provides equivalent allocator behavior for this use case.

No functional ECS behavior was changed.

Notes

deinit() logic was left unchanged since the current implementation compiles and behaves correctly with DebugAllocator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant