From 4108964609171327618627477163339656037111 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Mon, 20 Feb 2023 21:58:55 -0500 Subject: Type Containers --- typeprinter.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'typeprinter.cpp') diff --git a/typeprinter.cpp b/typeprinter.cpp index 3242f323..036c7c18 100644 --- a/typeprinter.cpp +++ b/typeprinter.cpp @@ -101,13 +101,13 @@ bool TypePrinter::GetTypeStringAfterNameCallback(void* ctxt, BNType* type, } -bool TypePrinter::GetTypeLinesCallback(void* ctxt, BNType* type, BNBinaryView* data, +bool TypePrinter::GetTypeLinesCallback(void* ctxt, BNType* type, BNTypeContainer* types, BNQualifiedName* name, int lineWidth, bool collapsed, BNTokenEscapingType escaping, BNTypeDefinitionLine** result, size_t* resultCount) { TypePrinter* printer = (TypePrinter*)ctxt; vector lines = printer->GetTypeLines( - new Type(BNNewTypeReference(type)), new BinaryView(BNNewViewReference(data)), + new Type(BNNewTypeReference(type)), TypeContainer(types), QualifiedName::FromAPIObject(name), lineWidth, collapsed, escaping); *resultCount = lines.size(); @@ -433,7 +433,7 @@ std::string CoreTypePrinter::GetTypeStringAfterName(Ref type, Ref CoreTypePrinter::GetTypeLines(Ref type, - Ref data, const QualifiedName& name, int lineWidth, + const TypeContainer& types, const QualifiedName& name, int lineWidth, bool collapsed, BNTokenEscapingType escaping) { BNTypeDefinitionLine* lines; @@ -441,7 +441,8 @@ std::vector CoreTypePrinter::GetTypeLines(Ref type, BNQualifiedName qname = name.GetAPIObject(); - bool success = BNGetTypePrinterTypeLines(GetObject(), type->GetObject(), data->GetObject(), &qname, lineWidth, collapsed, escaping, &lines, &lineCount); + bool success = BNGetTypePrinterTypeLines(GetObject(), type->GetObject(), types.GetObject(), &qname, + lineWidth, collapsed, escaping, &lines, &lineCount); QualifiedName::FreeAPIObject(&qname); if (!success) -- cgit v1.3.1