Commit 40f2fdf6 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

gt_io: Add GT_PICKLE_PROTOCOL module variable

parent e06247f5
......@@ -61,9 +61,12 @@ libgraph_tool_core.IStream.readline = IStream_readline
libgraph_tool_core.OStream.write = OStream_write
# define and set the pickler/unpickler functions
def pickler(stream, obj):
sstream = BytesIO()
pickle.dump(obj, sstream, -1)
pickle.dump(obj, sstream, GT_PICKLE_PROTOCOL)
def unpickler(stream):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment