zig icon indicating copy to clipboard operation
zig copied to clipboard

std.mem.readPackedIntLittle and std.mem.readPackedIntBig are not marked as pub

Open ABlobOfGarbage opened this issue 2 years ago • 2 comments

Zig Version

0.11.0-dev.1635+d09e39aef

Steps to Reproduce and Observed Behavior

Try to compile a program that uses those functions.

Expected Behavior

I don't see a reason for them to be private and i needed to use them for a project i'm working on. I modified the file on my system to make them public, i'm too lazy to do all the stuff needed to make a pull request so i just did it this way.

ABlobOfGarbage avatar Jun 15 '23 15:06 ABlobOfGarbage

Note that std.mem.readPackedIntLittle(T, bytes, bit_offset) is the same as std.mem.readPackedInt(T, bytes, bit_offset, .Little) and std.mem.readPackedIntBig(T, bytes, bit_offset) is the same as std.mem.readPackedInt(T, bytes, bit_offset, .Big).

jacobly0 avatar Jun 15 '23 22:06 jacobly0

Yes but std.mem.writePackedIntLittle and std.mem.writePackedIntBig are marked as pub so I don't see why the read functions should be private

ABlobOfGarbage avatar Jun 15 '23 22:06 ABlobOfGarbage