Update LTTV to trace format 2.3
[lttv.git] / trunk / lttv / ltt / event.c
index 42a623181b1f7d8c47071274dc520fd95ef90600..46b68af7e692528935c352f5538e942f69bd5c0a 100644 (file)
@@ -322,13 +322,15 @@ double ltt_event_get_double(LttEvent *e, struct marker_field *f)
 
 /*****************************************************************************
  * The string obtained is only valid until the next read from
- * the same tracefile.
+ * the same tracefile. We reference directly the buffers.
  ****************************************************************************/
-char *ltt_event_get_string(LttEvent *e, struct marker_field *f)
+gchar *ltt_event_get_string(LttEvent *e, struct marker_field *f)
 {
   g_assert(f->type == LTT_TYPE_STRING);
 
-  return (gchar*)g_strdup((gchar*)(e->data + f->offset));
+  //caused memory leaks
+  //return (gchar*)g_strdup((gchar*)(e->data + f->offset));
+  return (gchar*)(e->data + f->offset);
 }
 
 
This page took 0.024019 seconds and 4 git commands to generate.