Skip to content

Commit e736039

Browse files
committed
Rename PyTypeFlags::METHOD_{DESCR => DESCRIPTOR}
1 parent 98eef08 commit e736039

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

vm/src/builtins/descriptor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl PyMethodDescriptor {
104104

105105
#[pyclass(
106106
with(GetDescriptor, Callable, Constructor, Representable),
107-
flags(METHOD_DESCR)
107+
flags(METHOD_DESCRIPTOR)
108108
)]
109109
impl PyMethodDescriptor {
110110
#[pygetset(magic)]

vm/src/builtins/function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ impl PyPayload for PyFunction {
350350

351351
#[pyclass(
352352
with(GetDescriptor, Callable, Representable),
353-
flags(HAS_DICT, METHOD_DESCR)
353+
flags(HAS_DICT, METHOD_DESCRIPTOR)
354354
)]
355355
impl PyFunction {
356356
#[pygetset(magic)]

vm/src/types/slot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ bitflags! {
123123
const IMMUTABLETYPE = 1 << 8;
124124
const HEAPTYPE = 1 << 9;
125125
const BASETYPE = 1 << 10;
126-
const METHOD_DESCR = 1 << 17;
126+
const METHOD_DESCRIPTOR = 1 << 17;
127127
const HAS_DICT = 1 << 40;
128128

129129
#[cfg(debug_assertions)]

vm/src/vm/method.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ impl PyMethod {
3333
let cls_attr = match interned_name.and_then(|name| cls.get_attr(name)) {
3434
Some(descr) => {
3535
let descr_cls = descr.class();
36-
let descr_get = if descr_cls.slots.flags.has_feature(PyTypeFlags::METHOD_DESCR) {
36+
let descr_get = if descr_cls
37+
.slots
38+
.flags
39+
.has_feature(PyTypeFlags::METHOD_DESCRIPTOR)
40+
{
3741
is_method = true;
3842
None
3943
} else {
@@ -106,7 +110,7 @@ impl PyMethod {
106110
.class()
107111
.slots
108112
.flags
109-
.has_feature(PyTypeFlags::METHOD_DESCR)
113+
.has_feature(PyTypeFlags::METHOD_DESCRIPTOR)
110114
{
111115
Self::Function {
112116
target: obj.to_owned(),

0 commit comments

Comments
 (0)