Skip to content

Commit dbd8b1a

Browse files
committed
Fix Constants newtype usage in init_cleanup_code
1 parent a277b86 commit dbd8b1a

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

.cspell.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
"dedents",
6262
"deduped",
6363
"deoptimize",
64-
"descrs",
6564
"downcastable",
6665
"downcasted",
6766
"dumpable",

crates/vm/src/frame.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ long_float_action!(compactlong_float_subtract, -);
11761176
long_float_action!(compactlong_float_multiply, *);
11771177
long_float_action!(compactlong_float_true_div, /);
11781178

1179-
static BINARY_OP_EXTEND_DESCRS: &[BinaryOpExtendSpecializationDescr] = &[
1179+
static BINARY_OP_EXTEND_DESCRIPTORS: &[BinaryOpExtendSpecializationDescr] = &[
11801180
// long-long arithmetic
11811181
BinaryOpExtendSpecializationDescr {
11821182
oparg: bytecode::BinaryOperator::Or,
@@ -7270,7 +7270,7 @@ impl ExecutingFrame<'_> {
72707270
if ptr == 0 {
72717271
return None;
72727272
}
7273-
// SAFETY: We only store pointers to entries in `BINARY_OP_EXTEND_DESCRS`.
7273+
// SAFETY: We only store pointers to entries in `BINARY_OP_EXTEND_DESCRIPTORS`.
72747274
Some(unsafe { &*(ptr as *const BinaryOpExtendSpecializationDescr) })
72757275
}
72767276

@@ -7282,7 +7282,7 @@ impl ExecutingFrame<'_> {
72827282
rhs: &PyObject,
72837283
vm: &VirtualMachine,
72847284
) -> Option<&'static BinaryOpExtendSpecializationDescr> {
7285-
BINARY_OP_EXTEND_DESCRS
7285+
BINARY_OP_EXTEND_DESCRIPTORS
72867286
.iter()
72877287
.find(|d| d.oparg == op && (d.guard)(lhs, rhs, vm))
72887288
}

crates/vm/src/vm/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ impl Context {
427427
obj_name: names.__init__,
428428
qualname: names.__init__,
429429
cell2arg: None,
430-
constants: Vec::new().into_boxed_slice(),
430+
constants: core::iter::empty().collect(),
431431
names: Vec::new().into_boxed_slice(),
432432
varnames: Vec::new().into_boxed_slice(),
433433
cellvars: Vec::new().into_boxed_slice(),

0 commit comments

Comments
 (0)