From 02007847f865c0d2f50979b5ceecbdeec5ef7b97 Mon Sep 17 00:00:00 2001 From: yangxx Date: Wed, 6 Aug 2003 12:49:26 +0000 Subject: [PATCH] git-svn-id: http://ltt.polymtl.ca/svn@168 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt/type.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ltt/branches/poly/ltt/type.c b/ltt/branches/poly/ltt/type.c index b34627c1..21636c24 100644 --- a/ltt/branches/poly/ltt/type.c +++ b/ltt/branches/poly/ltt/type.c @@ -239,10 +239,11 @@ unsigned ltt_type_member_number(LttType *t) * LttType * : the type of structure member ****************************************************************************/ -LttType *ltt_type_member_type(LttType *t, unsigned i) +LttType *ltt_type_member_type(LttType *t, unsigned i, char ** name) { - if(t->type_class != LTT_STRUCT) return NULL; - if(i >= t->element_number || i < 0 ) return NULL; + if(t->type_class != LTT_STRUCT){*name == NULL; return NULL;} + if(i >= t->element_number || i < 0 ){*name = NULL; return NULL;} + *name = t->element_name; return t->element_type[i]; } -- 2.34.1