From 3ec771a20f2ff6718b515043cea6c79a70f9caa5 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Fri, 31 Mar 2006 12:44:16 +0100 Subject: [PATCH] widl: Support references in type_memsize. --- tools/widl/typegen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 1d681d9d42..3b587416ef 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -525,6 +525,9 @@ static size_t type_memsize(const type_t *t, int ptr_level, const expr_t *array) if (ptr_level) return sizeof(void *); + if (type_has_ref(t)) + return type_memsize(t->ref, 0 /* FIXME */, NULL); + switch (t->type) { case RPC_FC_BYTE: @@ -561,7 +564,7 @@ static size_t type_memsize(const type_t *t, int ptr_level, const expr_t *array) size = fields_memsize(t->fields); break; default: - error("type_memsize: Unknown type %d", t->type); + error("type_memsize: Unknown type %d\n", t->type); size = 0; }