From 022772331c3480cba1373a2674066505c01d53ee Mon Sep 17 00:00:00 2001 From: Gnimuc Date: Sun, 18 Aug 2024 20:21:48 +0900 Subject: [PATCH] Adapt to Clang16's base class name printing policy --- deps/generate_wrapper.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deps/generate_wrapper.jl b/deps/generate_wrapper.jl index 7be0447..34502b0 100644 --- a/deps/generate_wrapper.jl +++ b/deps/generate_wrapper.jl @@ -123,10 +123,10 @@ function object_decl_handler(ctx::BindgenContext, classdecl::CLCursor)::Tuple{Un end # handle simple inheritance - if length(children(classdecl)) > 1 && kind(children(classdecl)[1]) == Clang.CXCursor_CXXBaseSpecifier - - if startswith(get_full_name(children(classdecl)[1]), "class ") - base_class = split(get_full_name(children(classdecl)[1]), "class ")[2] + subnodes = children(classdecl) + if length(subnodes) > 1 && kind(subnodes[1]) == Clang.CXCursor_CXXBaseSpecifier + base_class = get_full_name(subnodes[1]) + if !isempty(base_class) ctx.outputSupertypes *= "template<> struct SuperType<$full_name> { typedef $base_class type; };\n"