mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
fix compile
This commit is contained in:
1 parent
ca4e8f50e8
commit
9a2eef6fab
9 files changed
+7
-12
No files matched your search
@@ -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};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
@@ -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
@@ -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]
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
Reference in new issue
Block a user