Commit Graph

16 Commits

Author SHA1 Message Date
Daniel Watkins
8c167ac4f5 Clean up unwrapping of string objects in json.loads 2018-09-02 16:49:50 -04:00
Daniel Watkins
0e33aa397a Create objects with correct types in json.rs
Fixes #120.
2018-09-02 14:13:02 -04:00
Daniel Watkins
a4a91f14d4 Convert PyObjectSerializer to store a PyContext
We don't actually need anything from the VirtualMachine other than the
context, so just use that directly.
2018-09-02 14:13:02 -04:00
Windel Bouwman
1a2a4adcef Lets delete some clones 2018-09-02 19:41:37 +02:00
Adam Kelly
04b73d4628 Bool is a subclass of int, so doesn't need a special kind. 2018-09-02 14:10:36 +01:00
Adam Kelly
8d8816ce04 Merge branch 'master' into equality 2018-09-01 20:46:22 +01:00
Windel Bouwman
f563856dc4 Add some tuple class methods 2018-09-01 10:19:51 +02:00
Windel Bouwman
40cf7f4579 Move more objects to obj folder 2018-09-01 10:00:55 +02:00
Windel Bouwman
b2ab49376a Change get_value to take a reference to a reference 2018-08-31 20:49:52 +02:00
Windel Bouwman
f453c749ec Move builtin types to own directory 2018-08-31 20:31:25 +02:00
Daniel Watkins
406b9a1c57 Add PyObjectSerializer method to reduce clutter 2018-08-30 19:02:25 -04:00
Daniel Watkins
3dca52cc4a Rework json.dumps to support subclasses
We can currently only construct instances of string subclasses, so
that's the only code path that is actually tested.

Fixes #91.
2018-08-30 19:02:25 -04:00
Daniel Watkins
1c0e1ed6b5 Implement getters for PyContext types
Currently, all users of the *_type attributes on PyContext have to
immediately clone the pointer before they can use it; this pushes that
cloning in to getters to reduce the clone-clutter across the codebase.
2018-08-27 17:31:05 -04:00
Daniel Watkins
8f74759129 Modify arg_check! syntax to allow expansion of option types 2018-08-27 09:55:21 -04:00
Daniel Watkins
55402e27ad Use arg_check! in json module 2018-08-26 21:55:35 -04:00
Daniel Watkins
7a80c04725 Basic json module implementation in rust 2018-08-26 15:10:39 -04:00