mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
Fix build with new builtins path
This commit is contained in:
1 parent
13bde3d7b4
commit
9e6dfca9e9
111 files changed
+778
-783
No files matched your search
@@ -73,7 +73,7 @@ pub(crate) fn impl_pyimpl(
|
||||
|
||||
fn impl_extend_class(
|
||||
ctx: &::rustpython_vm::pyobject::PyContext,
|
||||
class: &::rustpython_vm::obj::objtype::PyTypeRef,
|
||||
class: &::rustpython_vm::builtins::pytype::PyTypeRef,
|
||||
) {
|
||||
#getset_impl
|
||||
#extend_impl
|
||||
@@ -100,7 +100,7 @@ pub(crate) fn impl_pyimpl(
|
||||
parse_quote! {
|
||||
fn __extend_py_class(
|
||||
ctx: &::rustpython_vm::pyobject::PyContext,
|
||||
class: &::rustpython_vm::obj::objtype::PyTypeRef,
|
||||
class: &::rustpython_vm::builtins::pytype::PyTypeRef,
|
||||
) {
|
||||
#getset_impl
|
||||
#extend_impl
|
||||
@@ -162,7 +162,7 @@ fn generate_class_def(
|
||||
|
||||
let base_class = if is_pystruct {
|
||||
quote! {
|
||||
fn base_class(ctx: &::rustpython_vm::pyobject::PyContext) -> ::rustpython_vm::obj::objtype::PyTypeRef {
|
||||
fn base_class(ctx: &::rustpython_vm::pyobject::PyContext) -> ::rustpython_vm::builtins::pytype::PyTypeRef {
|
||||
ctx.types.tuple_type.clone()
|
||||
}
|
||||
}
|
||||
@@ -502,7 +502,7 @@ impl ToTokens for GetSetNursery {
|
||||
class.set_str_attr(
|
||||
#name,
|
||||
::rustpython_vm::pyobject::PyObject::new(
|
||||
::rustpython_vm::obj::objgetset::PyGetSet::#constructor(#name.into(), &Self::#getter #setter),
|
||||
::rustpython_vm::builtins::getset::PyGetSet::#constructor(#name.into(), &Self::#getter #setter),
|
||||
ctx.types.getset_type.clone(), None)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -31,12 +31,12 @@ pub(crate) fn impl_pystruct_sequence(
|
||||
let ret = quote! {
|
||||
impl ::rustpython_vm::pyobject::PyStructSequence for #ty {
|
||||
const FIELD_NAMES: &'static [&'static str] = &[#(stringify!(#field_names)),*];
|
||||
fn into_tuple(self, vm: &::rustpython_vm::VirtualMachine) -> ::rustpython_vm::obj::objtuple::PyTuple {
|
||||
fn into_tuple(self, vm: &::rustpython_vm::VirtualMachine) -> ::rustpython_vm::builtins::tuple::PyTuple {
|
||||
let items = vec![#(::rustpython_vm::pyobject::IntoPyObject::into_pyobject(
|
||||
self.#field_names,
|
||||
vm,
|
||||
)),*];
|
||||
::rustpython_vm::obj::objtuple::PyTuple::_new(items.into_boxed_slice())
|
||||
::rustpython_vm::builtins::tuple::PyTuple::_new(items.into_boxed_slice())
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user