Skip to content

Commit 737ec12

Browse files
Rename PyValue::{required_type => class}
1 parent a1e0c03 commit 737ec12

32 files changed

+49
-49
lines changed

vm/src/frame.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ pub struct Frame {
184184
}
185185

186186
impl PyValue for Frame {
187-
fn required_type(ctx: &PyContext) -> PyObjectRef {
187+
fn class(ctx: &PyContext) -> PyObjectRef {
188188
ctx.frame_type()
189189
}
190190
}

vm/src/obj/objbuiltinfunc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub struct PyBuiltinFunction {
88
}
99

1010
impl PyValue for PyBuiltinFunction {
11-
fn required_type(ctx: &PyContext) -> PyObjectRef {
11+
fn class(ctx: &PyContext) -> PyObjectRef {
1212
ctx.builtin_function_or_method_type()
1313
}
1414
}

vm/src/obj/objbytearray.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl PyByteArray {
2929
}
3030

3131
impl PyValue for PyByteArray {
32-
fn required_type(ctx: &PyContext) -> PyObjectRef {
32+
fn class(ctx: &PyContext) -> PyObjectRef {
3333
ctx.bytearray_type()
3434
}
3535
}

vm/src/obj/objbytes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl Deref for PyBytes {
3030
}
3131

3232
impl PyValue for PyBytes {
33-
fn required_type(ctx: &PyContext) -> PyObjectRef {
33+
fn class(ctx: &PyContext) -> PyObjectRef {
3434
ctx.bytes_type()
3535
}
3636
}

vm/src/obj/objcode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl fmt::Debug for PyCode {
2626
}
2727

2828
impl PyValue for PyCode {
29-
fn required_type(ctx: &PyContext) -> PyObjectRef {
29+
fn class(ctx: &PyContext) -> PyObjectRef {
3030
ctx.code_type()
3131
}
3232
}

vm/src/obj/objcomplex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub struct PyComplex {
1414
}
1515

1616
impl PyValue for PyComplex {
17-
fn required_type(ctx: &PyContext) -> PyObjectRef {
17+
fn class(ctx: &PyContext) -> PyObjectRef {
1818
ctx.complex_type()
1919
}
2020
}

vm/src/obj/objdict.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl fmt::Debug for PyDict {
3030
}
3131

3232
impl PyValue for PyDict {
33-
fn required_type(ctx: &PyContext) -> PyObjectRef {
33+
fn class(ctx: &PyContext) -> PyObjectRef {
3434
ctx.dict_type()
3535
}
3636
}

vm/src/obj/objenumerate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct PyEnumerate {
1717
}
1818

1919
impl PyValue for PyEnumerate {
20-
fn required_type(ctx: &PyContext) -> PyObjectRef {
20+
fn class(ctx: &PyContext) -> PyObjectRef {
2121
ctx.enumerate_type()
2222
}
2323
}

vm/src/obj/objfilter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub struct PyFilter {
1313
}
1414

1515
impl PyValue for PyFilter {
16-
fn required_type(ctx: &PyContext) -> PyObjectRef {
16+
fn class(ctx: &PyContext) -> PyObjectRef {
1717
ctx.filter_type()
1818
}
1919
}

vm/src/obj/objfloat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub struct PyFloat {
1616
}
1717

1818
impl PyValue for PyFloat {
19-
fn required_type(ctx: &PyContext) -> PyObjectRef {
19+
fn class(ctx: &PyContext) -> PyObjectRef {
2020
ctx.float_type()
2121
}
2222
}

0 commit comments

Comments
 (0)