fix compile

This commit is contained in:
Kangzhi Shi committed 2021-11-27 13:49:05 +02:00
1 parent ca4e8f50e8
commit 9a2eef6fab
9 files changed
+7 -12

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ use criterion::{
};
use rustpython_compiler::Mode;
use rustpython_vm::{
common::ascii, InitParameter, Interpreter, ItemProtocol, PyObjectWrap, PyResult, PySettings,
common::ascii, InitParameter, Interpreter, PyObjectWrap, PyResult, PySettings,
};
use std::path::{Path, PathBuf};
use std::{ffi, fs, io};
-2
View File
@@ -6,8 +6,6 @@
use rustpython_vm as vm;
// these are needed for special memory shenanigans to let us share a variable with Python and Rust
use std::sync::atomic::{AtomicBool, Ordering};
// this needs to be in scope in order to insert things into scope.globals
use vm::ItemProtocol;
// This has to be a macro because it uses the py_compile macro,
// which compiles python source to optimized bytecode at compile time, so that
+1 -1
View File
@@ -7,7 +7,7 @@ mod _scproxy {
use crate::vm::{
builtins::{PyDictRef, PyStr},
function::IntoPyObject,
ItemProtocol, PyResult, VirtualMachine,
PyResult, VirtualMachine,
};
use system_configuration::core_foundation::{
array::CFArray,
+1 -1
View File
@@ -39,7 +39,7 @@ mod _ssl {
stdlib::os::PyPathLike,
types::Constructor,
utils::{Either, ToCString},
ItemProtocol, PyObjectRef, PyObjectWeak, PyRef, PyResult, PyValue, VirtualMachine,
PyObjectRef, PyObjectWeak, PyRef, PyResult, PyValue, VirtualMachine,
},
};
use crossbeam_utils::atomic::AtomicCell;
+1 -2
View File
@@ -2,8 +2,7 @@ use crate::{
builtins::{float, int, pybool, PyBaseExceptionRef, PyDictRef, PyFunction, PyStrRef},
bytecode::CodeFlags,
function::{FuncArgs, IntoPyObject},
IdProtocol, ItemProtocol, PyObject, PyObjectRef, PyResult, TryFromObject, TypeProtocol,
VirtualMachine,
IdProtocol, PyObject, PyObjectRef, PyResult, TryFromObject, TypeProtocol, VirtualMachine,
};
use num_traits::ToPrimitive;
use rustpython_jit::{AbiValue, Args, CompiledCode, JitArgumentError, JitType};
+1 -1
View File
@@ -25,9 +25,9 @@ pub(crate) mod module {
use std::io;
use std::{env, fs};
use crate::builtins::PyDictRef;
#[cfg(target_env = "msvc")]
use crate::builtins::PyListRef;
use crate::{builtins::PyDictRef, ItemProtocol};
use winapi::{um, vc::vcruntime::intptr_t};
#[pyattr]
-1
View File
@@ -45,7 +45,6 @@ pub(crate) mod module {
#[cfg(target_os = "wasi")]
#[pyattr]
fn environ(vm: &VirtualMachine) -> crate::builtins::PyDictRef {
use crate::ItemProtocol;
use ffi_ext::OsStringExt;
let environ = vm.ctx.new_dict();
+1 -1
View File
@@ -8,7 +8,7 @@ mod _winapi {
function::{IntoPyException, OptionalArg},
protocol::PyMapping,
stdlib::os::errno_err,
ItemProtocol, PyObjectRef, PyResult, PySequence, TryFromObject, VirtualMachine,
PyObjectRef, PyResult, PySequence, TryFromObject, VirtualMachine,
};
use std::ptr::{null, null_mut};
use winapi::shared::winerror;
+1 -2
View File
@@ -7,8 +7,7 @@ use rustpython_vm::{
compile::{CompileError, CompileErrorType},
exceptions,
function::{ArgBytesLike, FuncArgs},
py_serde, ItemProtocol, PyObjectRef, PyResult, PyValue, TryFromBorrowedObject, TypeProtocol,
VirtualMachine,
py_serde, PyObjectRef, PyResult, PyValue, TryFromBorrowedObject, TypeProtocol, VirtualMachine,
};
use wasm_bindgen::{closure::Closure, prelude::*, JsCast};