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"