summaryrefslogtreecommitdiff
path: root/python/callingconvention.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/callingconvention.py')
-rw-r--r--python/callingconvention.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/callingconvention.py b/python/callingconvention.py
index e029a6aa..e9825642 100644
--- a/python/callingconvention.py
+++ b/python/callingconvention.py
@@ -40,8 +40,10 @@ class CallingConvention(object):
_registered_calling_conventions = []
- def __init__(self, arch, name, handle = None):
+ def __init__(self, arch=None, name=None, handle=None):
if handle is None:
+ if arch is None or name is None:
+ raise ValueError("Must specify either handle or architecture and name")
self.arch = arch
self._pending_reg_lists = {}
self._cb = core.BNCustomCallingConvention()