Skip to content

Commit

Permalink
load functions name update
Browse files Browse the repository at this point in the history
  • Loading branch information
nesaro committed Jun 24, 2012
1 parent 2772657 commit 2d17de9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def readT(self, newtype):

def __slice(self, inputdata):
totallen = len(inputdata)
from pydsl.Memory.Storage.Loader import load_type
currenttype = load_type(CURRENTGRAMMAR)
from pydsl.Memory.Storage.Loader import load_grammartools
currenttype = load_grammartools(CURRENTGRAMMAR)
try:
maxl = currenttype.maxsize
except NotImplementedError:
Expand Down
10 changes: 5 additions & 5 deletions pydsl/Function/Channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
import logging
LOG = logging.getLogger(__name__)

def _loadTypeInstances(originaldic):
def _loadCheckers(originaldic):
"""Converts {"channelname","type"} into {"channelname",instance}"""
from pydsl.Memory.Storage.Loader import load_type
from pydsl.Memory.Storage.Loader import load_checker
result = {}
for key in originaldic:
result[key] = load_type(str(originaldic[key]))
result[key] = load_checker(str(originaldic[key]))
return result

class HostChannel(FunctionInterface):
Expand All @@ -49,8 +49,8 @@ def __init__(self, inputtypedict:dict, outputtypedict:dict):
raise TypeError
self.inputdefinition = inputtypedict
self.outputdefinition = outputtypedict
self.__inputchanneldic = _loadTypeInstances(inputtypedict)
self.__outputchanneldic = _loadTypeInstances(outputtypedict)
self.__inputchanneldic = _loadCheckers(inputtypedict)
self.__outputchanneldic = _loadCheckers(outputtypedict)
self._connections = {}

def connect(self, intchannel, extGT, extChannel):
Expand Down

0 comments on commit 2d17de9

Please sign in to comment.