Commit Graph

43 Commits

Author SHA1 Message Date
coolreader18
bed54e035c Add some constants to native modules 2019-11-16 22:58:51 -06:00
coolreader18
c08f11ad1b Change FunctionOpArg to CodeFlags, stored in CodeObject 2019-10-14 20:20:52 +00:00
Jeong YunWon
6c0f852b62 Refactor pymethod return types to be smaller as possible 2019-10-11 03:27:23 +09:00
coolreader18
c46b5b50bd Fix weirdness with type.__new__()/type()/metaclass.__new__() 2019-09-29 23:14:31 -05:00
Windel Bouwman
d06dec77ea Attempt to reduce the size of the pyobject.rs files by splitting out builtin types. 2019-08-14 19:08:47 +02:00
coolreader18
aefbae40e4 Revert "Make CodeObject.source_path an Option<String>" 2019-06-20 12:01:20 -05:00
coolreader18
b74b65d37e Make CodeObject.source_path an Option<String> 2019-06-16 19:59:04 -05:00
Maxim Kurnikov
bc35a64e54 fix most of clippy warnings 2019-06-01 03:19:22 +03:00
Adam Kelly
c8eda3733d Eliminate ctx.set_attr. 2019-04-05 09:50:31 +01:00
ben
6eb93a7000 Move code methods into impl PyCodeRef 2019-03-24 13:50:50 +13:00
ben
db8e648646 Make PyFunction.code a PyCodeRef, PyGenerator.frame a FrameRef, and
other improvements to increase use of specific ref types.
2019-03-24 13:41:37 +13:00
ben
6fa059fd6c Make PyObject.typ a PyClassRef 2019-03-24 10:51:52 +13:00
Adam
26a238085f Merge pull request #724 from RustPython/cleaning-tweaks
Increase usage of extend_class macro.
2019-03-23 09:14:50 +00:00
Windel Bouwman
b93f96d491 Increase usage of extend_class macro. 2019-03-23 09:16:32 +01:00
ben
c1d5ce715f Change isinstance/issubclass to accept PyClassRef instead of PyCObject.
Also changed PyValue::class to return a PyClassRef.
2019-03-23 19:32:31 +13:00
ben
5c7812734d Use more specific ref type than PyObjectRef in PyContext 2019-03-23 13:00:12 +13: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
Joey
fa9e48a5b3 Take &mut VirtualMachine insteadof &PyContext 2019-03-14 21:43:19 -07:00
Joey
737ec12fa5 Rename PyValue::{required_type => class} 2019-03-14 20:08:41 -07:00
Joey Hain
5971fc3bd4 rename PyObjectPayload2 to PyValue 2019-03-10 13:48:51 -07:00
ben
0ec034df51 Change property.__new__ to use new style function and construct
PyProperty
2019-03-09 14:07:42 +13:00
ben
2edfe4c7be Migrate usage of member_descriptor and data_descriptor to
new_property/PropertyBuilder
2019-03-09 13:00:54 +13:00
coolreader18
231ab682b9 Convert CodeObject payload to AnyRustValue 2019-03-07 22:18:23 -06: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
Joey Hain
f10fa6db44 Remove outer RefCell from PyObjectRef 2019-02-25 21:01:37 -08:00
Joey
eec76ef8e8 Don't require objtype import to use arg_check! macro 2019-02-21 08:38:02 -08:00
Joey
df76ffe116 Replace most relative imports with 2018-style crate 2019-02-20 08:50:53 -08:00
Windel Bouwman
d048d0a0da Merge pull request #445 from RustPython/co_consts
Co consts
2019-02-13 22:59:53 +01:00
ZapAnton
9144109f7d Fixed the useless_vec clippy warning 2019-02-12 16:39:38 +03:00
Adam Kelly
8a89e13a7e Add .co_consts to code class. 2019-02-12 09:47:02 +00:00
Adam Kelly
5c5d27203a Support for all co_* that can implemented currently. 2019-02-09 12:22:51 +00:00
Adam Kelly
769b889097 Source path should always be set, make it non-optional for code object. 2019-02-09 12:22:51 +00:00
Adam Kelly
8116dae65f Add some co_* methods to code objects. 2019-02-09 12:15:16 +00:00
Adam Kelly
7b2508a730 Start adding methods to code object. 2019-02-09 12:15:16 +00:00
Windel Bouwman
baa59ec2fc Merge branch 'master' into fix_useless_format 2019-02-06 10:50:07 +01:00
ZapAnton
0d3b218237 Fixed the 'toplevel_ref_arg' clippy warning
This replaces all the occurrences of the
'let ref var = another_var' with the
'let var = &another_var'

Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
2019-02-05 21:45:56 +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
Windel Bouwman
892493e464 Rename PyObjectKind into PyObjectPayload 2019-01-30 18:06:27 +01:00
Windel Bouwman
4095e0cad7 Modify location of set_attr so that we are able to create str python objects for the dictionary. 2018-12-12 22:06:19 +01:00
Windel Bouwman
99af466a88 Move max function test cases to snippet dir. Implement key and default argument on max function. 2018-11-07 17:26:18 +01:00
Windel Bouwman
4acea45f78 Add code and frame python objects. 2018-11-07 15:24:18 +01:00