From ac3ccc385f5b81568387e769fc1445ac03308d42 Mon Sep 17 00:00:00 2001 From: lucasduffey Date: Mon, 21 Nov 2016 18:44:52 -0800 Subject: documenting Type.int and Type.function --- python/__init__.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'python') diff --git a/python/__init__.py b/python/__init__.py index e908835a..c8985d55 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -4136,6 +4136,12 @@ class Type(object): @classmethod def int(self, width, sign = True): + """ + ``int`` class method for creating an int Type. + + :param int width: width of the integer in bytes + :param bool sign: optional variable representing signedness + """ return Type(core.BNCreateIntegerType(width, sign)) @classmethod @@ -4166,6 +4172,15 @@ class Type(object): @classmethod def function(self, ret, params, calling_convention = None, variable_arguments = False): + """ + ``function`` class method for creating an function Type. + + :param Type ret: width of the integer in bytes + :param list ret: list of parameter Types + :param CallingConvention calling_convention: optional argument for function calling convention + :param bool variable_arguments: optional argument for functions that have a variable number of arguments + + """ param_buf = (core.BNNameAndType * len(params))() for i in xrange(0, len(params)): if isinstance(params[i], Type): -- cgit v1.3.1 From bf3a89c16536bd2e72409d39d748a8a4ec129910 Mon Sep 17 00:00:00 2001 From: lucasduffey Date: Mon, 21 Nov 2016 19:23:00 -0800 Subject: Update __init__.py --- python/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') diff --git a/python/__init__.py b/python/__init__.py index c8985d55..22f63c71 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -4176,7 +4176,7 @@ class Type(object): ``function`` class method for creating an function Type. :param Type ret: width of the integer in bytes - :param list ret: list of parameter Types + :param list(Type) params: list of parameter Types :param CallingConvention calling_convention: optional argument for function calling convention :param bool variable_arguments: optional argument for functions that have a variable number of arguments -- cgit v1.3.1