Skip to content

Commit

Permalink
base/function: modified one of the parameter names in the implementat…
Browse files Browse the repository at this point in the history
…ion of the `type.arg` function and its documentation.
  • Loading branch information
arizvisa committed May 25, 2022
1 parent d2147d4 commit 15e0f53
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions base/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -3213,13 +3213,13 @@ def __new__(cls, func, index, info):
if not set_tinfo(ea, newinfo):
raise E.DisassemblerError(u"{:s}({:#x}, {:d}, {!r}) : Unable to apply the new type information ({!r}) to the specified function ({:#x}).".format('.'.join([__name__, cls.__name__]), ea, index, "{!s}".format(info), "{!s}".format(newinfo), ea))
return result
@utils.multicase(index=six.integer_types, info_s=six.string_types)
@utils.string.decorate_arguments('info_s')
def __new__(cls, func, index, info_s):
'''Modify the type information for the parameter at the specified `index` of the function `func` to the string in `info_s`.'''
tinfo = internal.declaration.parse(info_s)
@utils.multicase(index=six.integer_types, info=six.string_types)
@utils.string.decorate_arguments('info')
def __new__(cls, func, index, info):
'''Modify the type information for the parameter at the specified `index` of the function `func` to the string in `info`.'''
tinfo = internal.declaration.parse(info)
if tinfo is None:
raise E.InvalidTypeOrValueError(u"{:s}({!r}, {:d}, {!r}) : Unable to parse the provided type information ({!r}).".format('.'.join([__name__, cls.__name__]), ea, index, info_s, info_s))
raise E.InvalidTypeOrValueError(u"{:s}({!r}, {:d}, {!r}) : Unable to parse the provided type information ({!r}).".format('.'.join([__name__, cls.__name__]), func, index, info, info))
return cls(func, index, tinfo)

@utils.multicase(index=six.integer_types)
Expand Down

0 comments on commit 15e0f53

Please sign in to comment.