From 6ce591d90c0d6e20289a5a5ced8f2daa8a379377 Mon Sep 17 00:00:00 2001 From: jfh Date: Tue, 19 Oct 2021 16:50:27 +0300 Subject: [PATCH] Use as_object in benchmark locals. --- benches/microbenchmarks.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/benches/microbenchmarks.rs b/benches/microbenchmarks.rs index 64ed16094c..d8d3086d04 100644 --- a/benches/microbenchmarks.rs +++ b/benches/microbenchmarks.rs @@ -4,7 +4,7 @@ use criterion::{ }; use rustpython_compiler::Mode; use rustpython_vm::{ - common::ascii, InitParameter, Interpreter, ItemProtocol, PyResult, PySettings, + common::ascii, InitParameter, Interpreter, ItemProtocol, PyObjectWrap, PyResult, PySettings, }; use std::path::{Path, PathBuf}; use std::{ffi, fs, io}; @@ -132,6 +132,7 @@ fn bench_rustpy_code(group: &mut BenchmarkGroup, bench: &MicroBenchmar if let Some(idx) = iterations { scope .locals + .as_object() .set_item(vm.new_pyobj(ascii!("ITERATIONS")), vm.new_pyobj(idx), vm) .expect("Error adding ITERATIONS local variable"); }