From 5cccdcaad6cafac555075ddf21edd80730d44e8c Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 21 Apr 2016 18:59:54 +0000 Subject: [PATCH] coredevice: deserialize int64(width=64) as int(width=64), not host_int. Fixes #402. --- artiq/coredevice/comm_generic.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/artiq/coredevice/comm_generic.py b/artiq/coredevice/comm_generic.py index 4e6b70d61..0a21cd562 100644 --- a/artiq/coredevice/comm_generic.py +++ b/artiq/coredevice/comm_generic.py @@ -5,6 +5,7 @@ from enum import Enum from fractions import Fraction from artiq.coredevice import exceptions +from artiq.language.core import int as wrapping_int from artiq import __version__ as software_version @@ -316,9 +317,9 @@ class CommGeneric: elif tag == "b": return bool(self._read_int8()) elif tag == "i": - return self._read_int32() + return wrapping_int(self._read_int32(), 32) elif tag == "I": - return self._read_int64() + return wrapping_int(self._read_int64(), 64) elif tag == "f": return self._read_float64() elif tag == "F":