Commit 6c684cc6 authored by Nikias Bassen's avatar Nikias Bassen

cython: Fix compilation

parent 121c8345
......@@ -863,6 +863,8 @@ cpdef object load(fp, fmt=None, use_builtin_types=True, dict_type=dict):
is_binary = fp.read(6) == 'bplist'
fp.seek(0)
cdef object cb = None
if not fmt:
if is_binary:
if 'b' not in fp.mode:
......@@ -888,6 +890,8 @@ cpdef object load(fp, fmt=None, use_builtin_types=True, dict_type=dict):
cpdef object loads(data, fmt=None, use_builtin_types=True, dict_type=dict):
is_binary = data[0:6] == 'bplist'
cdef object cb = None
if fmt is not None:
if fmt not in (FMT_XML, FMT_BINARY):
raise ValueError('Format must be constant FMT_XML or FMT_BINARY')
......
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