Commit Graph

31 Commits

Author SHA1 Message Date
Jeong YunWon
7fd92fcc71 Py_TPFLAGS_BASETYPE 2020-01-30 16:32:09 +09:00
Jeong YunWon
70b63eb758 new_rustfunc -> new_function & new_method to distinguish bindable functions 2020-01-12 18:39:16 +09:00
coolreader18
edb84896bf Make PyObject.dict an Option<RefCell<PyDictRef>> 2019-11-16 22:50:58 -06:00
Jeong YunWon
12b3c855f9 Fix module attr error to use python __name__ instead of rust struct field name 2019-10-14 11:13:40 +09: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
Aviv Palivoda
3d61129cfd Delay from_list tuple create in import 2019-08-31 11:31:59 +03:00
coolreader18
d33d5ce5f6 Initialize attributes on new modules 2019-08-15 23:06:30 -05:00
coolreader18
5499d81d7a Address feedback, simplify compilation code 2019-08-15 15:52:30 -05:00
coolreader18
2a795e0d8e Add module __repr__ 2019-08-15 15:52:26 -05:00
coolreader18
b6e061b652 Add nice message for no attribute on module 2019-08-15 15:30:02 -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
Aviv Palivoda
ea8e28026b Simplify objmodule 2019-06-11 13:13:32 +03:00
Aviv Palivoda
c8248c3211 Expose __name__ in __dict__ 2019-06-10 19:18:32 +03:00
Aviv Palivoda
375790e142 objmodule should have a dict 2019-06-10 19:18:32 +03:00
Aviv Palivoda
fe0284aa05 Add new to objmodule and change __name__ to property 2019-06-10 19:18:32 +03:00
Aviv Palivoda
698044b128 Add Module.__name__ 2019-06-10 19:18:32 +03:00
Adam Kelly
ec5fd550de Implement IntoIterator for PyDictRef. 2019-04-09 11:30:52 +01:00
Adam Kelly
ec94168a15 Remove objdict::get_key_value_pairs. 2019-04-05 16:16:55 +01:00
Adam Kelly
bbb7162472 Various dictionary changes.
* vm.ctx.new_dict returns a PyDictRef
* Special case for module goes away.
* Instances get a real dictionary.
2019-03-25 16:37:20 +00:00
Adrian Wielgosik
9a6f7aa8a1 Make PyRef::clone not require T implementing Clone
It seems to be a weird consequence of using PhantomData,
so I just rolled a custom Clone.
2019-03-24 11:56:15 +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
coolreader18
a9051ab462 Convert all &mut VirtualMachine to &VirtualMachine 2019-03-22 01:48:14 -05:00
ben
6c3a402eca Fix setting attributes on modules 2019-03-20 19:58:48 +13: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
Joey Hain
45bc8c8f7a Move PyRef to pyobject module 2019-03-10 13:01:46 -07:00
Adam Kelly
0e23e706c9 Restructure scope to distinguish between locals and globals. 2019-03-10 12:38:43 +00:00
Adam Kelly
3f665ce673 Replace PyObjectPayload::Module with PyModule. 2019-03-08 08:43:07 +00:00
Adam Kelly
2a593aa100 Add objmodule. 2019-03-06 18:11:52 +00:00