@zigc/lib 0.17.0-dev.305 → 0.17.0-dev.313

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zigc/lib",
3
- "version": "0.17.0-dev.305",
3
+ "version": "0.17.0-dev.313",
4
4
  "description": "Zig standard library and libc headers (shared across all platforms)",
5
5
  "repository": {
6
6
  "type": "git",
package/std/elf.zig CHANGED
@@ -1043,7 +1043,7 @@ pub const Elf32 = struct {
1043
1043
  pub const Addr = u32;
1044
1044
  pub const Off = u32;
1045
1045
  pub const Ehdr = extern struct {
1046
- ident: [EI.NIDENT]u8,
1046
+ ident: Ident,
1047
1047
  type: ET,
1048
1048
  machine: EM,
1049
1049
  version: Word,
@@ -1133,7 +1133,7 @@ pub const Elf64 = struct {
1133
1133
  pub const Addr = u64;
1134
1134
  pub const Off = u64;
1135
1135
  pub const Ehdr = extern struct {
1136
- ident: [EI.NIDENT]u8,
1136
+ ident: Ident,
1137
1137
  type: ET,
1138
1138
  machine: EM,
1139
1139
  version: Word,
@@ -1611,6 +1611,20 @@ pub const Sym = switch (@sizeOf(usize)) {
1611
1611
  /// Deprecated, use `std.elf.ElfN.Addr`
1612
1612
  pub const Addr = ElfN.Addr;
1613
1613
 
1614
+ pub const Ident = extern struct {
1615
+ magic: [MAGIC.len]u8 = MAGIC.*,
1616
+ class: CLASS,
1617
+ data: DATA,
1618
+ version: u8,
1619
+ osabi: OSABI,
1620
+ abiversion: u8,
1621
+ pad: [7]u8 = @splat(0),
1622
+
1623
+ comptime {
1624
+ assert(@sizeOf(Ident) == EI.NIDENT);
1625
+ }
1626
+ };
1627
+
1614
1628
  /// Deprecated, use `@intFromEnum(std.elf.CLASS.NONE)`
1615
1629
  pub const ELFCLASSNONE = @intFromEnum(CLASS.NONE);
1616
1630
  /// Deprecated, use `@intFromEnum(std.elf.CLASS.@"32")`
package/std/json.zig CHANGED
@@ -1,7 +1,7 @@
1
1
  //! JSON parsing and stringification conforming to RFC 8259. https://datatracker.ietf.org/doc/html/rfc8259
2
2
  //!
3
3
  //! The low-level `Scanner` API produces `Token`s from an input slice or successive slices of inputs,
4
- //! The `Reader` API connects a `std.Io.GenericReader` to a `Scanner`.
4
+ //! The `Reader` API connects a `std.Io.Reader` to a `Scanner`.
5
5
  //!
6
6
  //! The high-level `parseFromSlice` and `parseFromTokenSource` deserialize a JSON document into a Zig type.
7
7
  //! Parse into a dynamically-typed `Value` to load any JSON value for runtime inspection.
package/std/posix.zig CHANGED
@@ -834,7 +834,7 @@ pub fn dl_iterate_phdr(
834
834
  while (it.next()) |entry| {
835
835
  const phdrs: []elf.ElfN.Phdr = if (entry.addr != 0) phdrs: {
836
836
  const ehdr: *elf.ElfN.Ehdr = @ptrFromInt(entry.addr);
837
- assert(mem.eql(u8, ehdr.ident[0..4], elf.MAGIC));
837
+ assert(mem.eql(u8, &ehdr.ident.magic, elf.MAGIC));
838
838
  const phdrs: [*]elf.ElfN.Phdr = @ptrFromInt(entry.addr + ehdr.phoff);
839
839
  break :phdrs phdrs[0..ehdr.phnum];
840
840
  } else getSelfPhdrs();