*Input params
* et : an event type
*Return value
- * unsigned * : the relative id
+ * unsigned : the relative id
****************************************************************************/
-unsigned *ltt_eventtype_relative_id(LttEventType *et)
+unsigned ltt_eventtype_relative_id(LttEventType *et)
{
- return (unsigned*)&et->index;
+ return et->index;
}
/*****************************************************************************
*Input params
* et : an event type
*Return value
- * unsigned * : the id
+ * unsigned : the id
****************************************************************************/
-unsigned *ltt_eventtype_id(LttEventType *et)
+unsigned ltt_eventtype_id(LttEventType *et)
{
- unsigned *id = g_new(unsigned,1);
- *id = et->facility->base_id + et->index;
- return (unsigned*)id;
+ return et->facility->base_id + et->index;
}
/*****************************************************************************
return intSizes[t->size];
else{
LttArchSize size = trace->system_description->size;
- if(size == LTT_LP32)
- return sizeof(int16_t);
- else if(size == LTT_ILP32 || size == LTT_LP64)
- return sizeof(int32_t);
- else if(size == LTT_ILP64)
- return sizeof(int64_t);
+ if(size == LTT_LP32){
+ if(t->size == 5)return sizeof(int16_t);
+ else return sizeof(int32_t);
+ }
+ else if(size == LTT_ILP32 || size == LTT_LP64){
+ if(t->size == 5)return sizeof(int32_t);
+ else{
+ if(size == LTT_ILP32) return sizeof(int32_t);
+ else return sizeof(int64_t);
+ }
+ }
+ else if(size == LTT_ILP64)return sizeof(int64_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_type[i]->element_name;
return t->element_type[i];
}