Teach Python bindings to process (char *)0

This commit is contained in:
Alexander Krotov
2020-09-12 19:31:49 +03:00
committed by link2xt
parent ecbc83390e
commit d6a0763b1d

View File

@@ -17,7 +17,8 @@ def iter_array(dc_array_t, constructor):
def from_dc_charpointer(obj):
return ffi.string(ffi.gc(obj, lib.dc_str_unref)).decode("utf8")
if obj != ffi.NULL:
return ffi.string(ffi.gc(obj, lib.dc_str_unref)).decode("utf8")
class DCLot: