Skip to content

Commit

Permalink
more ally -> arena
Browse files Browse the repository at this point in the history
  • Loading branch information
ibokuri committed Feb 17, 2024
1 parent 1ae7562 commit d73d3c2
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 77 deletions.
36 changes: 18 additions & 18 deletions src/de/interfaces/map_access.zig
Original file line number Diff line number Diff line change
Expand Up @@ -25,42 +25,42 @@ pub fn MapAccess(

pub const Err = E;

pub fn nextKeySeed(self: Self, ally: std.mem.Allocator, seed: anytype) E!?@TypeOf(seed).Value {
pub fn nextKeySeed(self: Self, arena: std.mem.Allocator, seed: anytype) E!?@TypeOf(seed).Value {
if (methods.nextKeySeed) |func| {
return try func(self.impl, ally, seed);
return try func(self.impl, arena, seed);
}

@compileError("nextKeySeed is not implemented by type: " ++ @typeName(Impl));
}

pub fn nextValueSeed(self: Self, ally: std.mem.Allocator, seed: anytype) E!@TypeOf(seed).Value {
pub fn nextValueSeed(self: Self, arena: std.mem.Allocator, seed: anytype) E!@TypeOf(seed).Value {
if (methods.nextValueSeed) |func| {
return try func(self.impl, ally, seed);
return try func(self.impl, arena, seed);
}

@compileError("nextValueSeed is not implemented by type: " ++ @typeName(Impl));
}

pub fn nextKey(self: Self, ally: std.mem.Allocator, comptime Key: type) E!?Key {
pub fn nextKey(self: Self, arena: std.mem.Allocator, comptime Key: type) E!?Key {
if (methods.nextKey) |func| {
return try func(self.impl, ally, Key);
return try func(self.impl, arena, Key);
}

var seed = DefaultSeed(Key){};
const ds = seed.seed();

return try self.nextKeySeed(ally, ds);
return try self.nextKeySeed(arena, ds);
}

pub fn nextValue(self: Self, ally: std.mem.Allocator, comptime Value: type) E!Value {
pub fn nextValue(self: Self, arena: std.mem.Allocator, comptime Value: type) E!Value {
if (methods.nextValue) |func| {
return try func(self.impl, ally, Value);
return try func(self.impl, arena, Value);
}

var seed = DefaultSeed(Value){};
const ds = seed.seed();

return try self.nextValueSeed(ally, ds);
return try self.nextValueSeed(arena, ds);
}
};

Expand All @@ -73,9 +73,9 @@ pub fn MapAccess(

fn NextKeySeedFn(comptime Impl: type, comptime E: type) type {
const Lambda = struct {
fn func(impl: Impl, ally: std.mem.Allocator, seed: anytype) E!?@TypeOf(seed).Value {
fn func(impl: Impl, arena: std.mem.Allocator, seed: anytype) E!?@TypeOf(seed).Value {
_ = impl;
_ = ally;
_ = arena;

unreachable;
}
Expand All @@ -86,9 +86,9 @@ fn NextKeySeedFn(comptime Impl: type, comptime E: type) type {

fn NextValueSeedFn(comptime Impl: type, comptime E: type) type {
const Lambda = struct {
fn func(impl: Impl, ally: std.mem.Allocator, seed: anytype) E!@TypeOf(seed).Value {
fn func(impl: Impl, arena: std.mem.Allocator, seed: anytype) E!@TypeOf(seed).Value {
_ = impl;
_ = ally;
_ = arena;

unreachable;
}
Expand All @@ -99,9 +99,9 @@ fn NextValueSeedFn(comptime Impl: type, comptime E: type) type {

fn NextKeyFn(comptime Impl: type, comptime E: type) type {
const Lambda = struct {
fn func(impl: Impl, ally: std.mem.Allocator, comptime Key: type) E!?Key {
fn func(impl: Impl, arena: std.mem.Allocator, comptime Key: type) E!?Key {
_ = impl;
_ = ally;
_ = arena;

unreachable;
}
Expand All @@ -112,9 +112,9 @@ fn NextKeyFn(comptime Impl: type, comptime E: type) type {

fn NextValueFn(comptime Impl: type, comptime E: type) type {
const Lambda = struct {
fn func(impl: Impl, ally: std.mem.Allocator, comptime Value: type) E!Value {
fn func(impl: Impl, arena: std.mem.Allocator, comptime Value: type) E!Value {
_ = impl;
_ = ally;
_ = arena;

unreachable;
}
Expand Down
18 changes: 9 additions & 9 deletions src/de/interfaces/seq_access.zig
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ pub fn SeqAccess(

pub const Err = E;

pub fn nextElementSeed(self: Self, ally: std.mem.Allocator, seed: anytype) E!?@TypeOf(seed).Value {
pub fn nextElementSeed(self: Self, arena: std.mem.Allocator, seed: anytype) E!?@TypeOf(seed).Value {
if (methods.nextElementSeed) |func| {
return try func(self.impl, ally, seed);
return try func(self.impl, arena, seed);
}

@compileError("nextElementSeed is not implemented by type: " ++ @typeName(Impl));
}

pub fn nextElement(self: Self, ally: std.mem.Allocator, comptime Elem: type) E!?Elem {
pub fn nextElement(self: Self, arena: std.mem.Allocator, comptime Elem: type) E!?Elem {
if (methods.nextElement) |func| {
return try func(self.impl, ally, Elem);
return try func(self.impl, arena, Elem);
}

var seed = DefaultSeed(Elem){};
const ds = seed.seed();

return try self.nextElementSeed(ally, ds);
return try self.nextElementSeed(arena, ds);
}
};

Expand All @@ -52,9 +52,9 @@ pub fn SeqAccess(

fn NextElementSeedFn(comptime Impl: type, comptime E: type) type {
const Lambda = struct {
fn func(impl: Impl, ally: std.mem.Allocator, seed: anytype) E!?@TypeOf(seed).Value {
fn func(impl: Impl, arena: std.mem.Allocator, seed: anytype) E!?@TypeOf(seed).Value {
_ = impl;
_ = ally;
_ = arena;

unreachable;
}
Expand All @@ -65,9 +65,9 @@ fn NextElementSeedFn(comptime Impl: type, comptime E: type) type {

fn NextElementFn(comptime Impl: type, comptime E: type) type {
const Lambda = struct {
fn func(impl: Impl, ally: std.mem.Allocator, comptime Elem: type) E!?Elem {
fn func(impl: Impl, arena: std.mem.Allocator, comptime Elem: type) E!?Elem {
_ = impl;
_ = ally;
_ = arena;

unreachable;
}
Expand Down
18 changes: 9 additions & 9 deletions src/de/interfaces/union_access.zig
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ pub fn UnionAccess(

pub const Err = E;

pub fn variantSeed(self: Self, ally: std.mem.Allocator, seed: anytype) E!@TypeOf(seed).Value {
pub fn variantSeed(self: Self, arena: std.mem.Allocator, seed: anytype) E!@TypeOf(seed).Value {
if (methods.variantSeed) |func| {
return try func(self.impl, ally, seed);
return try func(self.impl, arena, seed);
}

@compileError("variantSeed is not implemented by type: " ++ @typeName(Impl));
}

pub fn variant(self: Self, ally: std.mem.Allocator, comptime Variant: type) E!Variant {
pub fn variant(self: Self, arena: std.mem.Allocator, comptime Variant: type) E!Variant {
if (methods.variant) |func| {
return try func(self.impl, ally, Variant);
return try func(self.impl, arena, Variant);
}

var ds = DefaultSeed(Variant){};
const seed = ds.seed();

return try self.variantSeed(ally, seed);
return try self.variantSeed(arena, seed);
}
};

Expand All @@ -52,9 +52,9 @@ pub fn UnionAccess(

fn VariantSeedFn(comptime Impl: type, comptime E: type) type {
const Lambda = struct {
fn func(impl: Impl, ally: std.mem.Allocator, seed: anytype) E!@TypeOf(seed).Value {
fn func(impl: Impl, arena: std.mem.Allocator, seed: anytype) E!@TypeOf(seed).Value {
_ = impl;
_ = ally;
_ = arena;

unreachable;
}
Expand All @@ -65,9 +65,9 @@ fn VariantSeedFn(comptime Impl: type, comptime E: type) type {

fn VariantFn(comptime Impl: type, comptime E: type) type {
const Lambda = struct {
fn func(impl: Impl, ally: std.mem.Allocator, comptime T: type) E!T {
fn func(impl: Impl, arena: std.mem.Allocator, comptime T: type) E!T {
_ = impl;
_ = ally;
_ = arena;

unreachable;
}
Expand Down
18 changes: 9 additions & 9 deletions src/de/interfaces/variant_access.zig
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ pub fn VariantAccess(

pub const Err = E;

pub fn payloadSeed(self: Self, ally: std.mem.Allocator, seed: anytype) E!@TypeOf(seed).Value {
pub fn payloadSeed(self: Self, arena: std.mem.Allocator, seed: anytype) E!@TypeOf(seed).Value {
if (methods.payloadSeed) |func| {
return try func(self.impl, ally, seed);
return try func(self.impl, arena, seed);
}

@compileError("payloadSeed is not implemented by type: " ++ @typeName(Impl));
}

pub fn payload(self: Self, ally: std.mem.Allocator, comptime Payload: type) E!Payload {
pub fn payload(self: Self, arena: std.mem.Allocator, comptime Payload: type) E!Payload {
if (methods.payload) |func| {
return try func(self.impl, ally, Payload);
return try func(self.impl, arena, Payload);
}

var ds = DefaultSeed(Payload){};
const seed = ds.seed();

return try self.payloadSeed(ally, seed);
return try self.payloadSeed(arena, seed);
}
};

Expand All @@ -52,9 +52,9 @@ pub fn VariantAccess(

fn PayloadSeedFn(comptime Impl: type, comptime E: type) type {
const Lambda = struct {
fn func(impl: Impl, ally: std.mem.Allocator, seed: anytype) E!@TypeOf(seed).Value {
fn func(impl: Impl, arena: std.mem.Allocator, seed: anytype) E!@TypeOf(seed).Value {
_ = impl;
_ = ally;
_ = arena;

unreachable;
}
Expand All @@ -65,9 +65,9 @@ fn PayloadSeedFn(comptime Impl: type, comptime E: type) type {

fn PayloadFn(comptime Impl: type, comptime E: type) type {
const Lambda = struct {
fn func(impl: Impl, ally: std.mem.Allocator, comptime Payload: type) E!Payload {
fn func(impl: Impl, arena: std.mem.Allocator, comptime Payload: type) E!Payload {
_ = impl;
_ = ally;
_ = arena;

unreachable;
}
Expand Down
Loading

0 comments on commit d73d3c2

Please sign in to comment.