Fix Constants newtype usage in init_cleanup_code

This commit is contained in:
Jeong, YunWon
2026-03-09 12:41:30 +09:00
parent cb2db07463
commit 38de7462c0
2 changed files with 3 additions and 4 deletions

View File

@@ -61,7 +61,6 @@
"dedents",
"deduped",
"deoptimize",
"descrs",
"downcastable",
"downcasted",
"dumpable",

View File

@@ -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))
}