Skip to content

Commit 6ce591d

Browse files
committed
Use as_object in benchmark locals.
1 parent de41d4c commit 6ce591d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

benches/microbenchmarks.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use criterion::{
44
};
55
use rustpython_compiler::Mode;
66
use rustpython_vm::{
7-
common::ascii, InitParameter, Interpreter, ItemProtocol, PyResult, PySettings,
7+
common::ascii, InitParameter, Interpreter, ItemProtocol, PyObjectWrap, PyResult, PySettings,
88
};
99
use std::path::{Path, PathBuf};
1010
use std::{ffi, fs, io};
@@ -132,6 +132,7 @@ fn bench_rustpy_code(group: &mut BenchmarkGroup<WallTime>, bench: &MicroBenchmar
132132
if let Some(idx) = iterations {
133133
scope
134134
.locals
135+
.as_object()
135136
.set_item(vm.new_pyobj(ascii!("ITERATIONS")), vm.new_pyobj(idx), vm)
136137
.expect("Error adding ITERATIONS local variable");
137138
}

0 commit comments

Comments
 (0)