Fix pickling for pypy

This commit is contained in:
Jason Paryani
2014-04-19 17:00:19 -07:00
parent 485f24987d
commit 372fc496e8
2 changed files with 13 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
import capnp
def _struct_reducer(schema_id, data):
'Hack to deal with pypy not allowing reduce functions to be "built-in" methods (ie. compiled from a .pyx)'
return capnp._global_schema_parser.modules_by_id[schema_id].from_bytes(data)