Commit Graph

105 Commits

Author SHA1 Message Date
Jeong YunWon
e594090629 BufferProtocol -> AsBuffer 2021-08-14 13:39:06 +09:00
Jeong YunWon
888b3822b7 Give a sole module for buffer protocol 2021-08-14 13:39:06 +09:00
Jeong YunWon
4e60bcd741 clean up #[pymethod(magic)] 2021-08-12 06:44:52 +09:00
Jeong YunWon
03a9d6058b Refactor Buffer Protocol (mostly namings) (#2849)
* Refactor Buffer protocol into RustPython convention
2021-08-11 20:11:31 +03:00
Jeong YunWon
ff4efd0f60 Fix unnessessary borrow 2021-07-30 02:32:16 +09:00
Noah
fbbe4a68d2 Rename borrow_list to borrow_vec 2021-05-20 17:47:17 -05:00
Noah
3d9812e748 Remove remaining borrow_value() uses 2021-05-20 10:30:42 -05:00
Noah
1eae2c8a12 Replace bufferish-types.borrow_value() with direct getters 2021-05-20 10:29:48 -05:00
Noah
516eead348 Replace PyStr.borrow_value() with .as_str() 2021-05-20 10:29:48 -05:00
Noah
376ce87b76 Move Either to crate::utils 2021-05-20 10:29:48 -05:00
Noah
99104faaf7 Re-export pyobject::* from the root of the crate 2021-05-20 10:24:07 -05:00
Kangzhi Shi
8522d120e5 fix array from bytes 2021-04-16 09:17:13 +02:00
Noah
6d7eae98b8 Add iter, iternext slots & Allow deleting slot magic methods 2020-11-17 23:47:48 +09:00
Noah
a6805a5291 Make get_options() return &BufferOptions 2020-11-09 10:32:25 -06:00
Noah
a1ca535f78 Make bufferoptions.format a Cow<'static, str> 2020-11-06 11:11:06 -06:00
Kangzhi Shi
eaf4bad2d1 fix array with float 2020-10-27 19:18:18 +02:00
Noah
026f396e98 Use std::os::raw::c_* instead of libc::c_* for wasm compat 2020-10-26 12:14:00 -05:00
Noah
0f84bd4070 Update pystruct + array 2020-10-26 12:13:24 -05:00
Jeong YunWon
4add0220ae PyValue::class() returns ref 2020-10-20 02:29:20 +09:00
Jeong YunWon
34a2038e17 Use StaticType::static_class() rather than vm.class 2020-10-20 01:47:53 +09:00
Kangzhi Shi
c2d46b9df3 remove comment 2020-10-16 07:30:59 +02:00
Kangzhi Shi
c3484c612c fix buffer resizable non-thread safe 2020-10-15 17:47:32 +02:00
Jeong YunWon
e823d95ce5 split vm::builtins::iter utility functions to vm::iterator 2020-10-13 15:42:11 +09:00
Jeong YunWon
9e6dfca9e9 Fix build with new builtins path 2020-10-11 21:16:16 +09:00
Jeong YunWon
a089c9b6d3 TypeProcotol::lease_class() -> TypeProtocol::class() 2020-10-11 09:11:58 +09:00
Kangzhi Shi
cf3572385c Fix more to pass unittest 2020-10-10 17:00:57 +09:00
Kangzhi Shi
e1ddbda4fc fix unittest test_array.test_buffer 2020-10-10 16:59:44 +09:00
Kangzhi Shi
499d99794c Implement Buffer Protocol 2020-10-10 16:57:19 +09:00
Jeong YunWon
699c801354 Fix sequence index utilities not to use get_ prefix 2020-10-10 13:40:02 +09:00
Jeong YunWon
6d8c987c45 vm._len and objsequence.rs -> sliceable.rs 2020-10-10 13:39:12 +09:00
Jeong YunWon
75161a63de Merge pull request #2248 from youknowone/lease-class
lease_class as much as possible
2020-10-10 13:38:19 +09:00
Jeong YunWon
fe5767a975 lease_class as much as possible 2020-09-30 11:41:06 +09:00
Noah
dbbdd75b31 Rename rustpython_common::{cell -> lock} 2020-09-26 23:39:10 -05:00
Jeong YunWon
59db19d1ea PyClass -> PyType 2020-09-26 07:32:38 +09:00
Jeong YunWon
958fe7b194 remove cmp clone 2020-09-26 02:51:50 +09:00
Jeong YunWon
f81ad04ce3 PyString -> PyStr 2020-09-26 00:20:02 +09:00
Noah
2f03db9872 Fix some silly errors 2020-09-21 10:55:15 -05:00
Noah
fc456ac526 Finish rest of Comparable impls 2020-09-21 10:55:15 -05:00
Noah
0df1b353f5 Implement method.__eq__ 2020-09-18 23:57:37 -05:00
Kangzhi Shi
fa3fd724ac Fix array extend and improve 2020-09-15 09:10:38 +02:00
Kangzhi Shi
907dddad1e Code as suggestion 2020-09-14 16:23:14 +02:00
Noah
bd92c7eea0 Merge pull request #2196 from qingshi163/dev_array_byteswap
Implement array byteswap()
2020-09-10 17:52:20 -05:00
Kangzhi Shi
2e120238b1 Remove unnecessary into_object 2020-09-10 08:19:17 +02:00
Kangzhi Shi
1f756dbbf4 Implement array __copy__() and __deepcopy__() 2020-09-10 08:12:11 +02:00
Kangzhi Shi
4a1cda77f8 Implement array fromlist 2020-09-09 20:01:14 +02:00
Kangzhi Shi
78ab0a225a Implement array byteswap() 2020-09-09 12:03:53 +02:00
Kangzhi Shi
7b7684d83c Fix clippy 2020-09-06 19:52:01 +02:00
Kangzhi Shi
742b9d073a Impl fast path for same ArrayContentType type 2020-09-06 13:53:59 +02:00
Kangzhi Shi
48909327db Fix array compare oparation 2020-09-06 13:53:20 +02:00
Steve Shi
a5d0df25f7 Refactor with PySliceableSequenceMut trait to combine the slice operation 2020-09-06 17:08:42 +09:00