From cdb4d3a72091bebc4f0763980aabcea5dc0bc93d Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Tue, 15 Sep 2015 14:14:16 -0400 Subject: Add C_CreateObject(), which required refactoring some of the template-checking code. --- py11/attributes.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'py11') diff --git a/py11/attributes.py b/py11/attributes.py index 7c90768..32cf940 100644 --- a/py11/attributes.py +++ b/py11/attributes.py @@ -93,3 +93,9 @@ class AttributeDB(object): template[i].pValue = create_string_buffer(v) template[i].ulValueLen = len(v) return template + + def attribute_name(self, code): + return self.db[code].name + + def attribute_code(self, name): + return self.db[name].code -- cgit v1.2.3