projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-svn-id: http://ltt.polymtl.ca/svn@181 04897980-b3bd-0310-b5e0-8ef037075253
[lttv.git]
/
ltt
/
branches
/
poly
/
ltt
/
type.c
diff --git
a/ltt/branches/poly/ltt/type.c
b/ltt/branches/poly/ltt/type.c
index b34627c1c7c694bd960d631e26243892b36d90f4..710803de252b0a48aae2870e0477cb93d7168886 100644
(file)
--- a/
ltt/branches/poly/ltt/type.c
+++ b/
ltt/branches/poly/ltt/type.c
@@
-60,12
+60,12
@@
LttFacility *ltt_eventtype_facility(LttEventType *et)
*Input params
* et : an event type
*Return value
*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;
}
/*****************************************************************************
}
/*****************************************************************************
@@
-74,14
+74,12
@@
unsigned *ltt_eventtype_relative_id(LttEventType *et)
*Input params
* et : an event type
*Return value
*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;
}
/*****************************************************************************
}
/*****************************************************************************
@@
-239,10
+237,11
@@
unsigned ltt_type_member_number(LttType *t)
* LttType * : the type of structure member
****************************************************************************/
* 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];
}
return t->element_type[i];
}
This page took
0.02329 seconds
and
4
git commands to generate.