authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-01 04:32:42+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-01 04:35:14+02:00
logb569ead29ea4459d0d363bf5a878ddb53f8f14f3
tree15b8b739aa0dd6aa3fcb0ed479aa929de5f70c71
parent9bbfc864af0311403aa19538999b170dbd35b7dc
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.elf: Make int() and int32() functions private.

These have no callers outside std.elf. Even if the standard library should provide functions like these, std.elf is probably not the place, given how general they are.

1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/elf.zig+2-2
...@@ -659,7 +659,7 @@ pub fn SectionHeaderIterator(comptime ParseSource: anytype) type {...@@ -659,7 +659,7 @@ pub fn SectionHeaderIterator(comptime ParseSource: anytype) type {
659 };659 };
660}660}
661661
662pub fn int(is_64: bool, need_bswap: bool, int_32: anytype, int_64: anytype) @TypeOf(int_64) {662fn int(is_64: bool, need_bswap: bool, int_32: anytype, int_64: anytype) @TypeOf(int_64) {
663 if (is_64) {663 if (is_64) {
664 if (need_bswap) {664 if (need_bswap) {
665 return @byteSwap(int_64);665 return @byteSwap(int_64);
...@@ -671,7 +671,7 @@ pub fn int(is_64: bool, need_bswap: bool, int_32: anytype, int_64: anytype) @Typ...@@ -671,7 +671,7 @@ pub fn int(is_64: bool, need_bswap: bool, int_32: anytype, int_64: anytype) @Typ
671 }671 }
672}672}
673673
674pub fn int32(need_bswap: bool, int_32: anytype, comptime Int64: anytype) Int64 {674fn int32(need_bswap: bool, int_32: anytype, comptime Int64: anytype) Int64 {
675 if (need_bswap) {675 if (need_bswap) {
676 return @byteSwap(int_32);676 return @byteSwap(int_32);
677 } else {677 } else {