diff options
Diffstat (limited to 'python_modules/ptypes.py')
-rw-r--r-- | python_modules/ptypes.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py index da148e8..7dca78d 100644 --- a/python_modules/ptypes.py +++ b/python_modules/ptypes.py @@ -96,6 +96,12 @@ def fix_attributes(attribute_list): elif len(lst) > 1: raise Exception("Attribute %s has more than 1 argument" % name) attrs[name] = lst + + # these attributes specify output format, only one can be set + output_attrs = set(['end', 'to_ptr', 'as_ptr', 'ptr_array', 'zero']) + if len(output_attrs.intersection(attrs.keys())) > 1: + raise Exception("Multiple output type attributes specified %s" % output_attrs) + return attrs class Type: |