git-svn-id: http://ltt.polymtl.ca/svn@168 04897980-b3bd-0310-b5e0-8ef037075253
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 6 Aug 2003 12:49:26 +0000 (12:49 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 6 Aug 2003 12:49:26 +0000 (12:49 +0000)
ltt/branches/poly/ltt/type.c

index b34627c1c7c694bd960d631e26243892b36d90f4..21636c24d5b0acb31730e280d1857d5eb17938fe 100644 (file)
@@ -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];
 }
 
This page took 0.025035 seconds and 4 git commands to generate.