Commit 546edccb authored by John Parent's avatar John Parent
Browse files

Pygccxml api useage update

parent e68fb237
Pipeline #232649 failed with stages
in 26 minutes and 31 seconds
......@@ -1307,10 +1307,10 @@ class BindingsGenerator:
caller =
binding_method = self.opts.private_member_var_fmt
static = "_static"
const = "_readonly" if decl.type_qualifiers.has_const else ""
const = "_readonly" if dec.type_traits.is_const(decl.decl_type) else ""
function_body = self.opts.generic_lambda_fmt
signature = "py::object"
return_stmt = "return {caller}::{attr}".format(
return_stmt = "return {caller}::{attr};".format(
return binding_method.format(
......@@ -1430,12 +1430,10 @@ class BindingsGenerator:
return True
def const_filter(self, x):
if "has_static" in dir(x):
if "has_const" in dir(x):
return x.has_const
elif "type_qualifiers" in dir(x):
return x.type_qualifiers.has_const
raise AttributeError("Decl has no const type information")
return dec.type_traits.is_const(x.decl_type)
def static_filter(self, x):
if "has_static" in dir(x):
......@@ -1446,7 +1444,7 @@ class BindingsGenerator:
raise AttributeError("Decl has no static type information")
def static_const_filter(self, x):
return not self.static_filter(x) and not self.const_filter(x)
return self.static_filter(x) and self.const_filter(x)
def bindable_filter(self, x):
for filter in self.validation_filters:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment