Skip to content

Commit a6d9044

Browse files
committed
std/os: debug print msghdr bytes
1 parent 0ff81a7 commit a6d9044

File tree

3 files changed

+58
-115
lines changed

3 files changed

+58
-115
lines changed

lib/std/json.zig

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2014,12 +2014,9 @@ test "parse into struct with duplicate field" {
20142014
const ballast = try testing.allocator.alloc(u64, 1);
20152015
defer testing.allocator.free(ballast);
20162016

2017-
const options_first = ParseOptions{
2018-
.allocator = testing.allocator,
2019-
.duplicate_field_behavior = .UseFirst
2020-
};
2017+
const options_first = ParseOptions{ .allocator = testing.allocator, .duplicate_field_behavior = .UseFirst };
20212018

2022-
const options_last = ParseOptions{
2019+
const options_last = ParseOptions{
20232020
.allocator = testing.allocator,
20242021
.duplicate_field_behavior = .UseLast,
20252022
};

lib/std/os.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5018,6 +5018,7 @@ pub fn sendmsg(
50185018
std.debug.print("sizeof(usize): {}, sizeof(msghdr): {}, endian: {}, message: {}, flags: {}\n", .{
50195019
@sizeOf(usize), @sizeOf(std.x.os.Socket.Message), builtin.endian, msg, flags,
50205020
});
5021+
std.debug.print("bytes of msghdr: {any}\n", .{std.mem.span(std.mem.asBytes(&msg))});
50215022
for (msg.getBuffers()) |buffer, i| {
50225023
std.debug.print("buffer {}: [ptr: {}, len: {}]\n", .{ i, buffer.ptr, buffer.len });
50235024
}

0 commit comments

Comments
 (0)