def add_attribute_flags(self, name, flags): if flags: tmp = C._StructDesignator(name, '|'.join(flags), None, fmt='(%s)') else: tmp = C._StructDesignator(name, 0, None) return C._StructAttributeSimple(tmp)
def add_attribute_simple(self, name, val, comment = None, fmt=None): tmp = C._StructDesignator(name, val, comment, fmt) return C._StructAttributeSimple(tmp)
def add_attribute_symbol(self, symbol): tmp = C._StructDesignator.from_symbol(symbol) return C._StructAttributeSimple(tmp)