Noah
3c241cd91e
Allow struct.pack to take a bytes spec
2020-07-14 21:24:41 -05:00
Aviv Palivoda
fb5862da91
Remove ThreadSafe trait
2020-05-16 13:58:10 +03:00
Aviv Palivoda
4ca4709d5a
Mark PyStruct as ThreadSafe
2020-05-15 09:25:47 +03:00
Noah
aafbdd06b2
Allow struct.unpack to take a bytes
2020-04-29 11:58:19 -05:00
Jeong YunWon
06f8d0bb98
pyclass member support for #[pymodule]
2020-04-27 00:11:51 +09:00
Jeong YunWon
7cea2c3953
use #[pymodule] for stdlib struct
2020-04-27 00:11:51 +09:00
Aviv Palivoda
efb6f6a64c
Implement pascal string packing
2020-03-14 17:07:38 +02:00
Aviv Palivoda
7925932459
bool packing check __bool__
2020-03-14 16:33:13 +02:00
Aviv Palivoda
bbb799f2c7
Resize pack_string with padding
2020-03-14 16:25:02 +02:00
Aviv Palivoda
395fd6bfbe
Integer packing check __index__
2020-03-14 12:30:41 +02:00
Jeong YunWon
1c6808748e
Fix struct pack and unpack
2020-03-04 11:42:17 +09:00
Jeong YunWon
197ef9cdec
Fix struct.calcsize to take bytes argument
2020-03-03 19:00:56 +09:00
Noah
7f6cdc68c4
Add struct.Struct.size property
2020-02-20 23:08:37 -06:00
Noah
0dcb4d4b2e
Reorganize struct module, add struct.Struct
2020-02-20 22:33:25 -06:00
Aviv Palivoda
2633f9f844
Add struct.calcsize
2020-02-06 21:21:44 +02:00
Jeong YunWon
1bac582921
&str::to_string -> &str::to_owned for literals
2020-02-05 22:55:33 +09:00
Jeong YunWon
36ebb048ef
cleanup bytes
2020-01-13 11:20:42 +09:00
Jeong YunWon
70b63eb758
new_rustfunc -> new_function & new_method to distinguish bindable functions
2020-01-12 18:39:16 +09:00
Jeong YunWon
13914e0739
objstr::get_value -> objstr::clone_value
...
because the previous naming gives unclear performance estimation to
users especially comparing to objstr::borrow_value
2020-01-02 20:51:10 +09:00
Aviv Palivoda
d0184a7ac2
struct.pack does not allow string as pack parameter
2019-10-20 10:13:40 +03:00
ChJR
b2126829e9
Add repeat count support to struct.pack() ( #1518 )
...
* Add struct.pack() repeat count test
* Add repeat count support to struct.pack()
* Refactor parse_format_codes()
* Refactor parse_format_codes() again
2019-10-15 19:25:51 +02:00
Daniel Alley
a964f216c4
Fix clippy warnings
2019-09-26 17:45:36 -04:00
Windel Bouwman
51c3f71eed
Merge pull request #1406 from lntuition/fix-1405
...
Fix int type casting error with negative base value
2019-09-25 17:15:48 +02:00
Sang-Heon Jeon
545e9d39df
Fix int type casting error with negative base value
...
Change base type from u32 to PyIntRef
Fixed : #1405
2019-09-25 01:01:21 +09:00
unknown
c76739fed7
Fix Typo in vm/src/stdlib/pystruct.rs
2019-09-22 20:27:39 +09:00
coolreader18
9204035d97
Cover up bare trait objects with a dyn
2019-07-10 09:41:58 -05:00
Windel Bouwman
9e194b3904
Add endianness support to struct module.
2019-06-26 16:38:11 +02:00
Darren Kaste
a8e064b1c0
Import TypeProtocol before use in type_check!
2019-04-14 17:19:44 -04:00
Adam Kelly
9ed051e3b7
Module Initialisation takes VirtualMachine rather than PyContext.
2019-04-05 09:50:31 +01:00
coolreader18
a9051ab462
Convert all &mut VirtualMachine to &VirtualMachine
2019-03-22 01:48:14 -05:00
Joey
7bfd2e6e84
Move function items out of pyobject module
2019-03-15 21:27:11 -07:00
Adam Kelly
0ff5155af9
Rename mk_module to make_module.
2019-03-10 17:10:51 +00:00
Joey Hain
4558dbf210
Fix build (rustfmt)
2019-03-02 13:25:42 -08:00
Windel Bouwman
30ddb48037
Use PyResult at more places.
2019-03-02 14:10:46 +01:00
Windel Bouwman
c33abe91e9
Use py_module macro at more places.
2019-02-26 19:53:58 +01:00
Joey
df76ffe116
Replace most relative imports with 2018-style crate
2019-02-20 08:50:53 -08:00
ZapAnton
1043543f16
Fixed cast_lossless clippy warnings
2019-02-11 15:02:00 +03:00
Adam Kelly
fd344ec1e0
Remove unnecessary to_bigint().unwrap() everywhere.
2019-02-06 17:38:01 +00:00
Windel Bouwman
baa59ec2fc
Merge branch 'master' into fix_useless_format
2019-02-06 10:50:07 +01:00
ZapAnton
6fb91ddfed
Fixed the 'len_zero' clippy warnings
...
This replaces all the occurrences of the <collection>.len() == 0
with the <collection>.is_empty() and the occurrences of the
<collection>.len() > 0 with the !<collection>.is_empty()
Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
2019-02-05 20:54:49 +03:00
ZapAnton
57e2beef3a
Fixed the 'useless_format' clippy warning
...
This replaces all the occurrences of the format!(<&str>) with the <&str>.to_string()
Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
2019-02-05 20:48:50 +03:00
coolreader18
e9bfea834a
Format module building in a more readable way
2019-01-28 23:02:43 -06:00
Windel Bouwman
0215830aaa
Move set_attr and set_item to context.
2018-12-12 19:41:09 +01:00
Windel Bouwman
810ef7df1c
Add bytearray object
2018-11-03 11:09:15 +01:00
Windel Bouwman
f6cced5d65
Change integer type into bigint
2018-10-30 21:01:31 +01:00
Windel Bouwman
1d854a8fbb
Modify isinstance call signature to take reference to a python reference.
2018-10-27 17:58:54 +02:00
Windel Bouwman
82af5b2981
Add struct unpack function
2018-10-14 09:43:09 +02:00
Windel Bouwman
5e27cc45b0
Initial struct module
2018-10-13 22:04:49 +02:00