(self, definition, calling_convention=None)
:param str definition:
        :param Optional[Union[SimCC, Type[SimCC]]] calling_convention:
        :return None:
def apply_definition(self, definition, calling_convention=None):
        """

        :param str definition:
        :param Optional[Union[SimCC, Type[SimCC]]] calling_convention:
        :return None:
        """
        if not definition.endswith(";"):
            definition += ";"
        func_def = parse_defns(definition, arch=self.project.arch)
        if len(func_def.keys()) > 1:
            raise Exception("Too many definitions: %s " % list(func_def.keys()))

        name, ty = func_def.popitem() # type: str, SimTypeFunction
        self.name = name
        self.prototype = ty
        # setup the calling convention
        # If a SimCC object is passed assume that this is sane and just use it
        if isinstance(calling_convention, SimCC):
            self.calling_convention = calling_convention

        # If it is a subclass of SimCC we can instantiate it
        elif isinstance(calling_convention, type) and issubclass(calling_convention, SimCC):
            self.calling_convention = calling_convention(self.project.arch)

        # If none is specified default to something
        elif calling_convention is None:
            self.calling_convention = self.project.factory.cc()

        else:
            raise TypeError("calling_convention has to be one of: [SimCC, type(SimCC), None]")
def apply_definition ( self , definition , calling_convention = None ) : if not definition . endswith ( ";" ) : definition += ";" func_def = parse_defns ( definition , arch = self . project . arch ) if len ( func_def . keys ( ) ) > 1 : raise Exception ( "Too many definitions: %s " % list ( func_def . keys ( ) ) ) name , ty = func_def . popitem ( ) # type: str, SimTypeFunction self . name = name self . prototype = ty # setup the calling convention # If a SimCC object is passed assume that this is sane and just use it if isinstance ( calling_convention , SimCC ) : self . calling_convention = calling_convention # If it is a subclass of SimCC we can instantiate it elif isinstance ( calling_convention , type ) and issubclass ( calling_convention , SimCC ) : self . calling_convention = calling_convention ( self . project . arch ) # If none is specified default to something elif calling_convention is None : self . calling_convention = self . project . factory . cc ( ) else : raise TypeError ( "calling_convention has to be one of: [SimCC, type(SimCC), None]" )