-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Description
Zig Version
0.12.0-dev.1200+5f92b070b
Steps to Reproduce and Observed Behavior
std.mem.readIntNative only accepts integer bit widths divisible by 8, while std.mem.writeIntNative accepts all integer bit widths.
This means that some integer types are writeable but not readable using these functions.
I'm unsure whether arbitrary bit widths should be supported.
More context:
- The related functions
writeIntForeign,writeIntLittle,writeIntBigand their read counterparts can't reasonably support arbitrary bit widths because they use@byteSwap. read/write(Var)PackedIntprovide more general functionality.
Expected Behavior
The two functions to accept the same integer types.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.