2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

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

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 = ""