enable compiling under zig 0.8.0
This commit is contained in:
parent
4a10450e0e
commit
d7efe72f1b
|
@ -214,13 +214,13 @@ fn shapes(allocator: *std.mem.Allocator, map: anytype) ![]ShapeInfo {
|
||||||
var list = try std.ArrayList(ShapeInfo).initCapacity(allocator, map.count());
|
var list = try std.ArrayList(ShapeInfo).initCapacity(allocator, map.count());
|
||||||
var iterator = map.iterator();
|
var iterator = map.iterator();
|
||||||
while (iterator.next()) |kv| {
|
while (iterator.next()) |kv| {
|
||||||
const id_info = try parseId(kv.key);
|
const id_info = try parseId(kv.key_ptr.*);
|
||||||
try list.append(.{
|
try list.append(.{
|
||||||
.id = id_info.id,
|
.id = id_info.id,
|
||||||
.namespace = id_info.namespace,
|
.namespace = id_info.namespace,
|
||||||
.name = id_info.name,
|
.name = id_info.name,
|
||||||
.member = id_info.member,
|
.member = id_info.member,
|
||||||
.shape = try getShape(allocator, kv.value),
|
.shape = try getShape(allocator, kv.value_ptr.*),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// This seems to be a synonym for the simple type "string"
|
// This seems to be a synonym for the simple type "string"
|
||||||
|
@ -395,9 +395,9 @@ fn parseMembers(allocator: *std.mem.Allocator, shape: ?std.json.Value) SmithyPar
|
||||||
var iterator = map.iterator();
|
var iterator = map.iterator();
|
||||||
while (iterator.next()) |kv| {
|
while (iterator.next()) |kv| {
|
||||||
try list.append(TypeMember{
|
try list.append(TypeMember{
|
||||||
.name = kv.key,
|
.name = kv.key_ptr.*,
|
||||||
.target = kv.value.Object.get("target").?.String,
|
.target = kv.value_ptr.*.Object.get("target").?.String,
|
||||||
.traits = try parseTraits(allocator, kv.value.Object.get("traits")),
|
.traits = try parseTraits(allocator, kv.value_ptr.*.Object.get("traits")),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return list.toOwnedSlice();
|
return list.toOwnedSlice();
|
||||||
|
@ -426,7 +426,7 @@ fn parseTraits(allocator: *std.mem.Allocator, shape: ?std.json.Value) SmithyPars
|
||||||
var list = std.ArrayList(Trait).initCapacity(allocator, map.count()) catch return SmithyParseError.OutOfMemory;
|
var list = std.ArrayList(Trait).initCapacity(allocator, map.count()) catch return SmithyParseError.OutOfMemory;
|
||||||
var iterator = map.iterator();
|
var iterator = map.iterator();
|
||||||
while (iterator.next()) |kv| {
|
while (iterator.next()) |kv| {
|
||||||
if (try getTrait(kv.key, kv.value)) |t|
|
if (try getTrait(kv.key_ptr.*, kv.value_ptr.*)) |t|
|
||||||
try list.append(t);
|
try list.append(t);
|
||||||
}
|
}
|
||||||
return list.toOwnedSlice();
|
return list.toOwnedSlice();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user