forked from M-Labs/nac3
remove flags from python decorator definition
This commit is contained in:
parent
94f0c467fa
commit
4659b16d5f
@ -112,14 +112,15 @@ def extern(function):
|
|||||||
register_function(function)
|
register_function(function)
|
||||||
return function
|
return function
|
||||||
|
|
||||||
def rpc(function, flags={}):
|
|
||||||
"""Decorates a function declaration defined by the core device runtime."""
|
def rpc(arg=None, flags={}):
|
||||||
register_function(function)
|
"""Decorates a function or method to be executed on the host interpreter."""
|
||||||
@wraps(function)
|
if arg is None:
|
||||||
def wrapped(function)
|
def inner_decorator(function):
|
||||||
return function
|
return rpc(function, flags)
|
||||||
wrapped.__artiq_rpc_flags__ = flags
|
return inner_decorator
|
||||||
return wrapped
|
register_function(arg)
|
||||||
|
return arg
|
||||||
|
|
||||||
def kernel(function_or_method):
|
def kernel(function_or_method):
|
||||||
"""Decorates a function or method to be executed on the core device."""
|
"""Decorates a function or method to be executed on the core device."""
|
||||||
|
Loading…
Reference in New Issue
Block a user