diff options
Diffstat (limited to 'lib/std/multi_array_list.zig')
| -rw-r--r-- | lib/std/multi_array_list.zig | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/std/multi_array_list.zig b/lib/std/multi_array_list.zig index 53eb8fa352..2af723d3a5 100644 --- a/lib/std/multi_array_list.zig +++ b/lib/std/multi_array_list.zig @@ -1,4 +1,5 @@ const std = @import("std.zig"); +const builtin = @import("builtin"); const assert = std.debug.assert; const meta = std.meta; const mem = std.mem; @@ -433,6 +434,19 @@ pub fn MultiArrayList(comptime S: type) type { fn FieldType(field: Field) type { return meta.fieldInfo(S, field).field_type; } + + /// This function is used in tools/zig-gdb.py to fetch the child type to facilitate + /// fancy debug printing for this type. + fn gdbHelper(self: *Self, child: *S) void { + _ = self; + _ = child; + } + + comptime { + if (builtin.mode == .Debug) { + _ = gdbHelper; + } + } }; } |
