diff --git a/src/sqlite3.zig b/src/sqlite3.zig index 4cfc94eecdf78c88705d2235e68aa6292c70ea9f..4fa30adee11df9289f6ad95ddc55713207482711 100644 --- a/src/sqlite3.zig +++ b/src/sqlite3.zig @@ -128,12 +128,13 @@ pub fn nameForType2(T: type) []const u8 { } if (tinfo == .@"struct") { const info = tinfo.@"struct"; - if (@hasDecl(T, "baseTypeName")) return T.baseTypeName; + if (@hasDecl(T, "BaseType") and T.BaseType != []const u8) return T.baseTypeName; if (@hasDecl(T, "BaseType")) return nameForType2(T.BaseType); if (info.layout == .@"packed") return nameForType2(info.backing_integer.?); + return nameForType2(T.BaseType); } if (tinfo == .@"enum") { - if (@hasDecl(T, "baseTypeName")) return T.baseTypeName; + if (@hasDecl(T, "BaseType") and T.BaseType != []const u8) return T.baseTypeName; return nameForType2(T.BaseType); } if (tinfo == .int or tinfo == .bool) {