From f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 23 Jul 2016 20:50:09 +0000 Subject: Vendor import of lldb release_39 branch r276489: https://llvm.org/svn/llvm-project/lldb/branches/release_39@276489 --- packages/Python/lldbsuite/support/funcutils.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packages/Python/lldbsuite/support/funcutils.py (limited to 'packages/Python/lldbsuite/support/funcutils.py') diff --git a/packages/Python/lldbsuite/support/funcutils.py b/packages/Python/lldbsuite/support/funcutils.py new file mode 100644 index 0000000000000..53dd1fb370bab --- /dev/null +++ b/packages/Python/lldbsuite/support/funcutils.py @@ -0,0 +1,16 @@ +from __future__ import print_function +from __future__ import absolute_import + +# System modules +import inspect + +# Third-party modules + +# LLDB modules + +def requires_self(func): + func_argc = len(inspect.getargspec(func).args) + if func_argc == 0 or (getattr(func,'im_self', None) is not None) or (hasattr(func, '__self__')): + return False + else: + return True -- cgit v1.2.3