Skip to content

Change package_name allocation method to dupeSentinel#96

Closed
cers000 wants to merge 1 commit into
silbinarywolf:mainfrom
cers000:patch-2
Closed

Change package_name allocation method to dupeSentinel#96
cers000 wants to merge 1 commit into
silbinarywolf:mainfrom
cers000:patch-2

Conversation

@cers000
Copy link
Copy Markdown

@cers000 cers000 commented May 26, 2026

更新zig0.16新的api,dupeZ已弃用

更新zig0.16新的api,dupeZ已弃用
@silbinarywolf
Copy link
Copy Markdown
Owner

Please change to:

if (builtin.zig_version.major == 0 and builtin.zig_version.minor <= 15)
   // Deprecated: Older Zig version compatibility
   try b.allocator.dupeZ(...)
else
   try b.allocator.dupeSentinel(...)

@cers000
Copy link
Copy Markdown
Author

cers000 commented May 26, 2026

好吧是我搞错了,zig0.16只是弃用dupeZ,并没有从标准库中删除dupeZ,0.17版本才正式删除了dupeZ,改用dupeSentinel,我用的版本是0.17.0-dev.356,那这里没必要更改

@cers000 cers000 closed this May 26, 2026
@silbinarywolf
Copy link
Copy Markdown
Owner

@cers000 Im happy to support 0.17.x+, Use the change I suggested above so it’s also backwards compatible with Zig 0.15.0 and Zig 0.16.0

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.

2 participants