Skip to content

Commit 3cb7c61

Browse files
committed
ArgIndex for builtin functions
1 parent 08c7344 commit 3cb7c61

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

vm/src/stdlib/builtins.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ mod builtins {
1818
common::{hash::PyHash, str::to_ascii},
1919
convert::ToPyException,
2020
function::{
21-
ArgBytesLike, ArgCallable, ArgIntoBool, ArgIterable, ArgMapping, ArgStrOrBytesLike,
22-
Either, FuncArgs, KwArgs, OptionalArg, OptionalOption, PosArgs, PyArithmeticValue,
21+
ArgBytesLike, ArgCallable, ArgIndex, ArgIntoBool, ArgIterable, ArgMapping,
22+
ArgStrOrBytesLike, Either, FuncArgs, KwArgs, OptionalArg, OptionalOption, PosArgs,
23+
PyArithmeticValue,
2324
},
2425
protocol::{PyIter, PyIterReturn, PyNumberBinaryOp},
2526
py_io,
@@ -360,7 +361,7 @@ mod builtins {
360361
}
361362

362363
#[pyfunction]
363-
fn hex(number: PyIntRef) -> String {
364+
fn hex(number: ArgIndex) -> String {
364365
let n = number.as_bigint();
365366
format!("{n:#x}")
366367
}
@@ -548,7 +549,7 @@ mod builtins {
548549
}
549550

550551
#[pyfunction]
551-
fn oct(number: PyIntRef, vm: &VirtualMachine) -> PyResult {
552+
fn oct(number: ArgIndex, vm: &VirtualMachine) -> PyResult {
552553
let n = number.as_bigint();
553554
let s = if n.is_negative() {
554555
format!("-0o{:o}", n.abs())

0 commit comments

Comments
 (0)