From e1419db8d5d809404cc55fd39ef989a4840be9b6 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Tue, 25 Dec 2007 14:13:47 +0000 Subject: [PATCH] Check if instance/class attributes are const. --- pybindgen/gccxmlparser.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pybindgen/gccxmlparser.py b/pybindgen/gccxmlparser.py index 53a7de5..96521a2 100644 --- a/pybindgen/gccxmlparser.py +++ b/pybindgen/gccxmlparser.py @@ -612,9 +612,11 @@ class ModuleParser(object): Warning, member.location.file_name, member.location.line) continue if member.type_qualifiers.has_static: - class_wrapper.add_static_attribute(return_type, member.name) + class_wrapper.add_static_attribute(return_type, member.name, + is_const=type_traits.is_const(member.type)) else: - class_wrapper.add_instance_attribute(return_type, member.name) + class_wrapper.add_instance_attribute(return_type, member.name, + is_const=type_traits.is_const(member.type)) elif isinstance(member, calldef.destructor_t): pass