git-svn-id: http://ltt.polymtl.ca/svn@172 04897980-b3bd-0310-b5e0-8ef037075253
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 7 Aug 2003 14:39:03 +0000 (14:39 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 7 Aug 2003 14:39:03 +0000 (14:39 +0000)
ltt/branches/poly/include/ltt/type.h
ltt/branches/poly/ltt/type.c

index d62871bbe4d779329232fe6c1c6737fb56dd0144..3e5679755dc2a8d043b812e93db59dabffc2b1a6 100644 (file)
@@ -24,9 +24,9 @@ char *ltt_eventtype_description(LttEventType *et);
 
 LttFacility *ltt_eventtype_facility(LttEventType *et);
 
-unsigned *ltt_eventtype_relative_id(LttEventType *et);
+unsigned ltt_eventtype_relative_id(LttEventType *et);
 
-unsigned *ltt_eventtype_id(LttEventType *et);
+unsigned ltt_eventtype_id(LttEventType *et);
 
 LttType *ltt_eventtype_type(LttEventType *et);
 
index 21636c24d5b0acb31730e280d1857d5eb17938fe..1f21f2c91b3e0360e2c54afded6f90764ff6df03 100644 (file)
@@ -60,12 +60,12 @@ LttFacility *ltt_eventtype_facility(LttEventType *et)
  *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
- *    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;
 }
 
 /*****************************************************************************
This page took 0.025265 seconds and 4 git commands to generate.