Store a pointer to the root of the call tree

Sat Apr 23 19:12:52 2005  Søren Sandmann  <sandmann@redhat.com>

	* profile.c: Store a pointer to the root of the call tree

	* profile.c (profile_load): Call sfile_input_free()

	* sfile.c (sformat_free): Implement this function
This commit is contained in:
Søren Sandmann
2005-04-23 23:18:42 +00:00
committed by Søren Sandmann Pedersen
parent 8424be6024
commit 984c6e1710
4 changed files with 103 additions and 30 deletions

34
sfile.h
View File

@ -54,22 +54,29 @@ typedef guint SType;
*
* enums, optionals, selections, empties
*
*
*==============================================
* Also think about versioning - apps will want to be able to read and write
* different versions of the format, and they want to be able to sniff the
* format + version
*
*/
/* - Describing Types - */
SFormat *sformat_new (gpointer f);
gpointer sformat_new_record (const char *name,
SType *type,
gpointer content,
...);
gpointer sformat_new_list (const char *name,
SType *type,
gpointer content);
gpointer sformat_new_pointer (const char *name,
SType *target_type);
gpointer sformat_new_integer (const char *name);
gpointer sformat_new_string (const char *name);
void sformat_free (SFormat *format);
SFormat *sformat_new (gpointer f);
gpointer sformat_new_record (const char *name,
SType *type,
gpointer content,
...);
gpointer sformat_new_list (const char *name,
SType *type,
gpointer content);
gpointer sformat_new_pointer (const char *name,
SType *target_type);
gpointer sformat_new_integer (const char *name);
gpointer sformat_new_string (const char *name);
void sformat_free (SFormat *format);
/* - Reading - */
SFileInput * sfile_load (const char *filename,
@ -89,6 +96,7 @@ void sfile_get_string (SFileInput *file,
void sfile_end_get (SFileInput *file,
const char *name,
gpointer object);
void sfile_input_free (SFileInput *file);
#if 0
/* incremental loading (worth considering at least) */