From 38de7462c0ca6392abb400a29f4af8abab232b5c Mon Sep 17 00:00:00 2001 From: "Jeong, YunWon" Date: Mon, 9 Mar 2026 12:41:30 +0900 Subject: [PATCH] Fix Constants newtype usage in init_cleanup_code --- .cspell.json | 1 - crates/vm/src/frame.rs | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.cspell.json b/.cspell.json index dd9ffb348..227ab6e4f 100644 --- a/.cspell.json +++ b/.cspell.json @@ -61,7 +61,6 @@ "dedents", "deduped", "deoptimize", - "descrs", "downcastable", "downcasted", "dumpable", diff --git a/crates/vm/src/frame.rs b/crates/vm/src/frame.rs index af224aa6e..59f496e24 100644 --- a/crates/vm/src/frame.rs +++ b/crates/vm/src/frame.rs @@ -1176,7 +1176,7 @@ long_float_action!(compactlong_float_subtract, -); long_float_action!(compactlong_float_multiply, *); long_float_action!(compactlong_float_true_div, /); -static BINARY_OP_EXTEND_DESCRS: &[BinaryOpExtendSpecializationDescr] = &[ +static BINARY_OP_EXTEND_DESCRIPTORS: &[BinaryOpExtendSpecializationDescr] = &[ // long-long arithmetic BinaryOpExtendSpecializationDescr { oparg: bytecode::BinaryOperator::Or, @@ -7264,7 +7264,7 @@ impl ExecutingFrame<'_> { if ptr == 0 { return None; } - // SAFETY: We only store pointers to entries in `BINARY_OP_EXTEND_DESCRS`. + // SAFETY: We only store pointers to entries in `BINARY_OP_EXTEND_DESCRIPTORS`. Some(unsafe { &*(ptr as *const BinaryOpExtendSpecializationDescr) }) } @@ -7276,7 +7276,7 @@ impl ExecutingFrame<'_> { rhs: &PyObject, vm: &VirtualMachine, ) -> Option<&'static BinaryOpExtendSpecializationDescr> { - BINARY_OP_EXTEND_DESCRS + BINARY_OP_EXTEND_DESCRIPTORS .iter() .find(|d| d.oparg == op && (d.guard)(lhs, rhs, vm)) }