Skip to content

Commit

Permalink
Skip typedefs for reference when printing a dynType.
Browse files Browse the repository at this point in the history
  • Loading branch information
PengZheng committed Jan 10, 2024
1 parent a6e22f7 commit 1ff4bc1
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions libs/dfi/src/dyn_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,8 @@ static void dynType_printComplex(const char* name, const dyn_type* type, int dep

static void dynType_printSequence(const char* name, const dyn_type* type, int depth, FILE* stream) {
dynType_printDepth(depth, stream);
fprintf(stream, "sequence, size is %zu, alignment is %i, descriptor is '%c'. fields:\n",
type->ffiType->size, type->ffiType->alignment, type->descriptor);
fprintf(stream, "%s: sequence, size is %zu, alignment is %i, descriptor is '%c'. fields:\n",
name, type->ffiType->size, type->ffiType->alignment, type->descriptor);

dynType_printDepth(depth + 1, stream);
fprintf(stream, "cap: simple type, size is %zu, alignment is %i.\n",
Expand Down Expand Up @@ -998,16 +998,8 @@ static void dynType_printText(const char* name, const dyn_type* type, int depth,
}

static void dynType_printTypes(const dyn_type* type, FILE* stream) {

dyn_type* parent = type->parent;
struct type_entry* pentry = NULL;
while (parent != NULL) {
TAILQ_FOREACH(pentry, &parent->nestedTypesHead, entries) {
if (pentry->type == type) {
return;
}
}
parent = parent->parent;
if (type->type == DYN_TYPE_REF) {
return;
}

struct type_entry* entry = NULL;
Expand Down

0 comments on commit 1ff4bc1

Please sign in to comment.