forked from M-Labs/artiq
1
0
Fork 0

language/core: update kernel ro types

This commit is contained in:
Sebastien Bourdeauducq 2014-08-16 23:19:25 +08:00
parent 71825f5ae0
commit 9189ad5fab
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
from collections import namedtuple from collections import namedtuple
from fractions import Fraction
from artiq.language import units from artiq.language import units
@ -34,7 +35,7 @@ def round64(x):
return int64(round(x)) return int64(round(x))
def _make_kernel_ro(value): def _make_kernel_ro(value):
return isinstance(value, (int, float, str, units.Quantity)) return isinstance(value, (bool, int, int64, float, Fraction, units.Quantity))
class AutoContext: class AutoContext:
parameters = "" parameters = ""