Commit Graph

36 Commits

Author SHA1 Message Date
Jason Paryani
9f06f0f3e8 Fix bug in to_bytes_packed when packed size > unpacked size. 2014-02-24 14:06:28 -08:00
Jason Paryani
307fcbf4e7 Fix problem with uninitialized unions in _from_dict 2014-02-18 17:34:34 -08:00
Jason Paryani
110b454e2c Add accesible version numbers for C++ libcapnp 2014-02-18 17:33:38 -08:00
Jason Paryani
a0668c1c9c Revert memleak fix since it's causing failures on TravisCI 2014-02-13 22:25:25 -08:00
Jason Paryani
55dcff0dad Fix TwoPartyServer to handle more than one client at a time. Fixes #23
Also fix various memleaks in RpcServer/Client
2014-02-13 22:10:05 -08:00
Jason Paryani
3d8dc6daa9 Change which method to be a property and return an enum type.
Old code using which() will still work since the enum type has a
__call__ method.
2014-02-13 19:24:06 -08:00
Jason Paryani
6ccc208757 Remove unnecessary allocation when setting strings 2014-02-13 12:04:30 -08:00
Jason Paryani
e23e1cb4ed Remove redundant _setDynamicFieldPtr 2014-02-13 11:49:29 -08:00
Jason Paryani
7903225867 Remove onDrained since it was removed upstream 2014-02-10 23:27:42 -08:00
Jason Paryani
345b8a6911 Add EnumSchema and corresponding module to load 2014-02-05 15:32:14 -08:00
Jason Paryani
c9130ac44a Replace usage of strings as enum type with custom DynamicEnum class.
DynamicEnum has a comparison function that allows comparison to strings
and ints, and will effectively make it interchangable with the old
implementation in most scenarios.
2014-02-05 12:11:29 -08:00
Jason Paryani
d55ad02863 Fix bug in TwoPartyServer that fixes #22 2014-01-17 11:13:12 -08:00
Jason Paryani
aa317e7324 Change to_bytes_packed() to be more efficient 2014-01-15 22:43:19 -08:00
Jason Paryani
8c0e80529b Attempt to speed up converting from a dictionary 2014-01-15 22:08:27 -08:00
Jason Paryani
b0a7128230 Change exception wrapper to detect and raise AttributeError 2014-01-14 09:05:46 -08:00
Jason Paryani
e7e95abeed Allow setting of fields with python dicts.
This change was a bit complicated because of a bug in cython fused
types. I had to flatten DynamicStruct.Builder to DynamicStruct_Builder
in order to get fused template specialization working.
2014-01-13 16:28:05 -08:00
Jason Paryani
ba7c192572 Add references to global eventLoop in promises 2014-01-08 16:18:10 -08:00
Jason Paryani
540ed4cdba Don't force utf8 encoding for unicode strings 2013-12-18 21:57:57 -08:00
Jason Paryani
e9a8354676 Fix problems with null characters in Text/Data fields. Fixes #19 2013-12-18 12:39:56 -08:00
Jason Paryani
f9bb12bff9 Update RPC with simpler methods for connecting 2013-12-12 11:55:50 -08:00
Jason Paryani
174ecd5609 Add simpler methods for instantiating TwoPartyServer/Client 2013-12-12 11:33:52 -08:00
Jason Paryani
ceacf16be8 Hide members of Server/Client 2013-12-12 00:02:32 -08:00
Jason Paryani
a880994a6b Fix tons of memleaks and memory management problems 2013-12-11 22:25:57 -08:00
Jason Paryani
1620965aee Add get_root_as_any to _MessageReader 2013-12-11 13:51:13 -08:00
Jason Paryani
ebbd83a425 Fix as_pypromise not returning correctly 2013-12-11 13:50:50 -08:00
Jason Paryani
10dc1d3ab3 Remove unneeded rpc.capnp by fixing ez_restore 2013-12-11 11:59:43 -08:00
Jason Paryani
4d8a27844f Fix allowing RemotePromises to be returned directly 2013-12-11 11:24:27 -08:00
Jason Paryani
db2247e883 Add calculator to tests 2013-12-11 00:15:08 -08:00
Jason Paryani
0e178de136 Fix segfault by making TwoPartyClient's members immortal 2013-12-10 23:29:21 -08:00
Jason Paryani
e92f7b56c6 Various fixups to the RPC api.
* change how restorer works
* fix join_promises
* add incref's all around to make sure we aren't freeing objects early
* make it so we return PyPromises everywhere and make chains collapsible
2013-12-10 22:57:21 -08:00
Jason Paryani
bba1918566 Add ez_restore function to Client. Also add c++.capnp and rpc.capnp 2013-12-09 21:30:27 -08:00
Jason Paryani
618097dec1 Add ability for passing AnyPointer to restore in RPCClient 2013-12-09 19:18:54 -08:00
Jason Paryani
3f7c3ae023 Change server instantion to be inherited 2013-12-09 17:13:43 -08:00
Jason Paryani
e4a38a5efa Refactor to actually use new helpers 2013-12-08 18:03:31 -08:00
Jason Paryani
9c7d84a82b Add capnp.pxd for public declarations of cython classes 2013-12-08 17:52:17 -08:00
Jason Paryani
1e87bed8c7 Refactor capnp.pyx to be in lib subdirectory 2013-12-08 17:43:08 -08:00