Skip to content

Commit ffeb638

Browse files
committed
Remove vec_buffer_type
1 parent 29c9d0e commit ffeb638

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

stdlib/src/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ mod array {
12191219
fn as_buffer(zelf: &PyObjectView<Self>, _vm: &VirtualMachine) -> PyResult<PyBuffer> {
12201220
let array = zelf.read();
12211221
let buf = PyBuffer::new(
1222-
zelf.to_owned().into_object(),
1222+
zelf.to_owned().into(),
12231223
BufferDescriptor::format(
12241224
array.len() * array.itemsize(),
12251225
false,

vm/src/stdlib/builtins.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Builtin function definitions.
22
//!
33
//! Implements the list of [builtin Python functions](https://docs.python.org/3/library/builtins.html).
4-
use crate::{PyObjectRef, VirtualMachine};
4+
use crate::{PyClassImpl, PyObjectRef, VirtualMachine};
55

66
/// Built-in functions, exceptions, and other objects.
77
///
@@ -917,7 +917,9 @@ pub use builtins::{ascii, print};
917917
pub fn make_module(vm: &VirtualMachine, module: PyObjectRef) {
918918
let ctx = &vm.ctx;
919919

920-
builtins::extend_module(vm, &module);
920+
crate::protocol::VecBuffer::make_class(&vm.ctx);
921+
922+
let _ = builtins::extend_module(vm, &module);
921923

922924
let debug_mode: bool = vm.state.settings.optimize == 0;
923925
extend_module!(vm, module, {

vm/src/types/zoo.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ pub struct TypeZoo {
8181
pub none_type: PyTypeRef,
8282
pub not_implemented_type: PyTypeRef,
8383
pub generic_alias_type: PyTypeRef,
84-
pub vec_buffer_type: PyTypeRef,
8584
}
8685

8786
impl TypeZoo {
@@ -168,7 +167,6 @@ impl TypeZoo {
168167
none_type: singletons::PyNone::init_bare_type().clone(),
169168
not_implemented_type: singletons::PyNotImplemented::init_bare_type().clone(),
170169
generic_alias_type: genericalias::PyGenericAlias::init_bare_type().clone(),
171-
vec_buffer_type: crate::protocol::VecBuffer::init_bare_type().clone(),
172170
}
173171
}
174172

0 commit comments

Comments
 (0)