mlugg 89a9cabafd
std.builtin.Type: improve ergonomics of *const anyopaque fields
For representing struct field default values and array/pointer type
sentinel values, we use `*const anyopaque`, since there is no way for
`std.builtin.Type.StructField` etc to refer back to its `type` field.
However, when introspecting a type, this is quite awkward due to the
pointer casts necessary.

As such, this commit renames the `sentinel` fields to `sentinel_ptr`,
and the `default_value` field to `default_value_ptr`, and introduces
helper methods `sentinel()` and `defaultValue()` to load the values.
These methods are marked as `inline` because their return value, which
is always comptime-known, is very often required at comptime by use
sites, so this avoids having to annotate such calls with `comptime`.

This is a breaking change, although note that 0.14.0 is already a
breaking release for all users of `std.builtin.Type` due to the union
fields being renamed.
2025-01-16 12:49:58 +00:00
..
2024-12-19 17:10:03 -05:00
2024-02-23 02:37:11 -07:00
2024-07-23 11:43:12 -07:00
2024-07-09 14:25:42 -07:00
2024-03-10 18:13:30 -07:00
2024-08-22 08:44:08 +02:00
2024-08-29 20:39:11 +01:00
2024-03-21 14:11:46 -07:00
2024-11-01 02:04:27 +03:30
2024-08-07 00:48:32 -07:00
2024-07-31 16:57:42 -07:00
2024-07-19 00:30:32 -07:00
2024-07-19 00:30:32 -07:00
2024-08-29 23:43:52 +01:00
2024-07-09 14:25:42 -07:00
2024-06-17 16:12:19 -04:00