bindings: Expose ConfigKey::identifier as an attribute.

This commit is contained in:
Martin Ling 2014-11-11 01:24:19 +00:00 committed by Uwe Hermann
parent 189461b251
commit e480df0c45
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1 @@
%attributestring(sigrok::ConfigKey, std::string, identifier, identifier);

View File

@ -154,3 +154,7 @@ for enum, (classname, classbrief) in classes.items():
print >> swig, '%%template(EnumValue%s) sigrok::EnumValue<sigrok::%s, enum %s>;' % (
classname, classname, enum_name)
# Declare additional attributes if present
filename = os.path.join(dirname, "%s_methods.i" % classname)
if os.path.exists(filename):
print >> swig, str.join('', open(filename).readlines())