forked from M-Labs/artiq
1
0
Fork 0

coredevice: deserialize int64(width=64) as int(width=64), not host_int.

Fixes #402.
This commit is contained in:
whitequark 2016-04-21 18:59:54 +00:00
parent 9a01d38439
commit 5cccdcaad6
1 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ from enum import Enum
from fractions import Fraction from fractions import Fraction
from artiq.coredevice import exceptions from artiq.coredevice import exceptions
from artiq.language.core import int as wrapping_int
from artiq import __version__ as software_version from artiq import __version__ as software_version
@ -316,9 +317,9 @@ class CommGeneric:
elif tag == "b": elif tag == "b":
return bool(self._read_int8()) return bool(self._read_int8())
elif tag == "i": elif tag == "i":
return self._read_int32() return wrapping_int(self._read_int32(), 32)
elif tag == "I": elif tag == "I":
return self._read_int64() return wrapping_int(self._read_int64(), 64)
elif tag == "f": elif tag == "f":
return self._read_float64() return self._read_float64()
elif tag == "F": elif tag == "F":