projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Process_List.h attribute name change
[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 21636c24d5b0acb31730e280d1857d5eb17938fe..dc39d9d1d082b6dbf6b194fcba5064e5362e9e64 100644
(file)
--- a/
ltt/branches/poly/ltt/type.c
+++ b/
ltt/branches/poly/ltt/type.c
@@
-1,7
+1,8
@@
#include <stdio.h>
#include <stdio.h>
-#include <ltt/LTTTypes.h>
#include "parser.h"
#include "parser.h"
+#include <ltt/ltt.h>
+#include "ltt-private.h"
#include <ltt/type.h>
static unsigned intSizes[] = {
#include <ltt/type.h>
static unsigned intSizes[] = {
@@
-60,12
+61,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
+75,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;
}
/*****************************************************************************
}
/*****************************************************************************
@@
-95,6
+94,7
@@
unsigned *ltt_eventtype_id(LttEventType *et)
LttType *ltt_eventtype_type(LttEventType *et)
{
LttType *ltt_eventtype_type(LttEventType *et)
{
+ if(!et->root_field) return NULL;
return et->root_field->field_type;
}
return et->root_field->field_type;
}
@@
-243,7
+243,7
@@
LttType *ltt_type_member_type(LttType *t, unsigned i, char ** name)
{
if(t->type_class != LTT_STRUCT){*name == NULL; return NULL;}
if(i >= t->element_number || i < 0 ){*name = NULL; 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;
+ *name = t->element_
type[i]->element_
name;
return t->element_type[i];
}
return t->element_type[i];
}
@@
-313,6
+313,12
@@
LttField *ltt_field_member(LttField *f, unsigned i)
LttType *ltt_field_type(LttField *f)
{
LttType *ltt_field_type(LttField *f)
{
+ if(!f)return NULL;
return f->field_type;
}
return f->field_type;
}
+int ltt_field_size(LttField * f)
+{
+ if(!f)return 0;
+ return f->field_size;
+}
This page took
0.023433 seconds
and
4
git commands to generate.