@@ -878,7 +878,7 @@ fn renderParams(allocator: ?std.mem.Allocator, comptime arg_types: []const type,
878
878
fn deinitResult (allocator : std.mem.Allocator , comptime Return : type , result : ? Return ) void {
879
879
if (result ) | r | {
880
880
switch (@typeInfo (Return )) {
881
- .ErrorUnion = > | error_union | {
881
+ .error_union = > | error_union | {
882
882
if (r ) | payload | {
883
883
deinitResult (allocator , error_union .payload , payload );
884
884
} else | _ | {}
@@ -951,7 +951,7 @@ pub fn readOnlyHexdump(allocator: std.mem.Allocator, bytes: []const u8) !void {
951
951
}
952
952
fn renderResult (allocator : ? std.mem.Allocator , comptime Return : type , result : Return ) ! void {
953
953
switch (@typeInfo (Return )) {
954
- .Pointer = > | pointer | {
954
+ .pointer = > | pointer | {
955
955
if (pointer .size == .Slice and pointer .child != u8 ) {
956
956
if (result .len > 0 ) {
957
957
for (result , 0.. ) | v , i | {
@@ -969,7 +969,7 @@ fn renderResult(allocator: ?std.mem.Allocator, comptime Return: type, result: Re
969
969
return ;
970
970
}
971
971
},
972
- .Optional = > | optional | {
972
+ .optional = > | optional | {
973
973
if (result ) | v | {
974
974
try renderResult (allocator , optional .child , v );
975
975
} else {
@@ -979,7 +979,7 @@ fn renderResult(allocator: ?std.mem.Allocator, comptime Return: type, result: Re
979
979
}
980
980
return ;
981
981
},
982
- .ErrorUnion = > | error_union | {
982
+ .error_union = > | error_union | {
983
983
if (result ) | v | {
984
984
try renderResult (allocator , error_union .payload , v );
985
985
} else | err | {
@@ -1337,7 +1337,7 @@ pub fn getter(comptime T: type, comptime f_name: [:0]const u8, self: T, arg_ptrs
1337
1337
defer zgui .popId ();
1338
1338
1339
1339
const ArgPtrs = @TypeOf (arg_ptrs );
1340
- const arg_ptrs_info = @typeInfo (ArgPtrs ).Struct ;
1340
+ const arg_ptrs_info = @typeInfo (ArgPtrs ).@ "struct" ;
1341
1341
1342
1342
const f_type = fType (T , f_name );
1343
1343
const args = args : {
@@ -1360,10 +1360,10 @@ fn fillArgs(comptime arg_ptrs_info: std.builtin.Type.Struct, arg_ptrs: anytype,
1360
1360
inline for (arg_ptrs_info .fields , 0.. ) | field , i | {
1361
1361
const arg_ptr = @field (arg_ptrs , field .name );
1362
1362
args [i + offset ] = switch (@typeInfo (field .type )) {
1363
- .Pointer = > | pointer | switch (pointer .size ) {
1363
+ .pointer = > | pointer | switch (pointer .size ) {
1364
1364
.Slice = > arg_ptr ,
1365
1365
.One = > switch (@typeInfo (pointer .child )) {
1366
- .Array = > std .mem .sliceTo (arg_ptr , 0 ),
1366
+ .array = > std .mem .sliceTo (arg_ptr , 0 ),
1367
1367
else = > switch (field .type ) {
1368
1368
* std .ArrayList (OpenVR .AppOverrideKeys ),
1369
1369
* std .ArrayList (OpenVR .TrackedDeviceIndex ),
@@ -1387,7 +1387,7 @@ pub fn staticGetter(comptime T: type, comptime f_name: [:0]const u8, arg_ptrs: a
1387
1387
defer zgui .popId ();
1388
1388
1389
1389
const ArgPtrs = @TypeOf (arg_ptrs );
1390
- const arg_ptrs_info = @typeInfo (ArgPtrs ).Struct ;
1390
+ const arg_ptrs_info = @typeInfo (ArgPtrs ).@ "struct" ;
1391
1391
1392
1392
const f_type = fType (T , f_name );
1393
1393
const args = args : {
@@ -1410,7 +1410,7 @@ pub fn allocGetter(allocator: std.mem.Allocator, comptime T: type, comptime f_na
1410
1410
defer zgui .popId ();
1411
1411
1412
1412
const ArgPtrs = @TypeOf (arg_ptrs );
1413
- const arg_ptrs_info = @typeInfo (ArgPtrs ).Struct ;
1413
+ const arg_ptrs_info = @typeInfo (ArgPtrs ).@ "struct" ;
1414
1414
1415
1415
const f_type = fType (T , f_name );
1416
1416
const args = args : {
@@ -1444,7 +1444,7 @@ pub fn allocGetter(allocator: std.mem.Allocator, comptime T: type, comptime f_na
1444
1444
fn FType (comptime T : type , comptime f_name : []const u8 ) type {
1445
1445
const f = @field (T , f_name );
1446
1446
const F = @TypeOf (f );
1447
- const f_info = @typeInfo (F ).Fn ;
1447
+ const f_info = @typeInfo (F ).@ "fn" ;
1448
1448
comptime var arg_types : [f_info .params .len ]type = undefined ;
1449
1449
inline for (f_info .params , 0.. ) | param , i | {
1450
1450
arg_types [i ] = param .type .? ;
@@ -1453,11 +1453,11 @@ fn FType(comptime T: type, comptime f_name: []const u8) type {
1453
1453
const Return = f_info .return_type .? ;
1454
1454
const return_type_info = @typeInfo (Return );
1455
1455
const Payload = switch (return_type_info ) {
1456
- .ErrorUnion = > | error_union | error_union .payload ,
1456
+ .error_union = > | error_union | error_union .payload ,
1457
1457
else = > Return ,
1458
1458
};
1459
1459
const payload_prefix = switch (return_type_info ) {
1460
- .ErrorUnion = > "!" ,
1460
+ .error_union = > "!" ,
1461
1461
else = > "" ,
1462
1462
};
1463
1463
@@ -1482,7 +1482,7 @@ pub fn setter(comptime T: type, comptime f_name: [:0]const u8, self: T, arg_ptrs
1482
1482
defer zgui .popId ();
1483
1483
1484
1484
const ArgPtrs = @TypeOf (arg_ptrs );
1485
- const arg_ptrs_info = @typeInfo (ArgPtrs ).Struct ;
1485
+ const arg_ptrs_info = @typeInfo (ArgPtrs ).@ "struct" ;
1486
1486
1487
1487
const f_type = fType (T , f_name );
1488
1488
@@ -1509,7 +1509,7 @@ pub fn deinitSetter(comptime T: type, comptime f_name: [:0]const u8, self: T, ar
1509
1509
defer zgui .popId ();
1510
1510
1511
1511
const ArgPtrs = @TypeOf (arg_ptrs );
1512
- const arg_ptrs_info = @typeInfo (ArgPtrs ).Struct ;
1512
+ const arg_ptrs_info = @typeInfo (ArgPtrs ).@ "struct" ;
1513
1513
1514
1514
const f_type = fType (T , f_name );
1515
1515
@@ -1537,7 +1537,7 @@ pub fn persistedSetter(comptime T: type, comptime f_name: [:0]const u8, self: T,
1537
1537
defer zgui .popId ();
1538
1538
1539
1539
const ArgPtrs = @TypeOf (arg_ptrs );
1540
- const arg_ptrs_info = @typeInfo (ArgPtrs ).Struct ;
1540
+ const arg_ptrs_info = @typeInfo (ArgPtrs ).@ "struct" ;
1541
1541
1542
1542
const f_type = fType (T , f_name );
1543
1543
@@ -1566,7 +1566,7 @@ pub fn allocPersistedSetter(allocator: std.mem.Allocator, comptime T: type, comp
1566
1566
defer zgui .popId ();
1567
1567
1568
1568
const ArgPtrs = @TypeOf (arg_ptrs );
1569
- const arg_ptrs_info = @typeInfo (ArgPtrs ).Struct ;
1569
+ const arg_ptrs_info = @typeInfo (ArgPtrs ).@ "struct" ;
1570
1570
1571
1571
const f_type = fType (T , f_name );
1572
1572
0 commit comments