00001 #include <eh_utils.h>
00002
00003 typedef struct
00004 {
00005 gint size;
00006 gint nnodes;
00007 gpointer **nodes;
00008 GHashFunc hash_func;
00009 GEqualFunc key_equal_func;
00010 GDestroyNotify key_destroy_func;
00011 GDestroyNotify value_destroy_func;
00012 } _GHashTable;
00013
00014 typedef struct
00015 {
00016 guint scope_id;
00017 gchar *symbol;
00018 gpointer value;
00019 } GScannerKey;
00020
00021 static void
00022 g_scanner_destroy_symbol_table_entry (gpointer _key,
00023 gpointer _value,
00024 gpointer _data)
00025 {
00026 GScannerKey *key = _key;
00027
00028 g_free (key->symbol);
00029 g_free (key);
00030 }
00031
00032 static inline void
00033 g_scanner_free_value (GTokenType *token_p,
00034 GTokenValue *value_p)
00035 {
00036 switch (*token_p)
00037 {
00038 case G_TOKEN_STRING:
00039 case G_TOKEN_IDENTIFIER:
00040 case G_TOKEN_IDENTIFIER_NULL:
00041 case G_TOKEN_COMMENT_SINGLE:
00042 case G_TOKEN_COMMENT_MULTI:
00043 g_free (value_p->v_string);
00044 break;
00045
00046 default:
00047 break;
00048 }
00049
00050 *token_p = G_TOKEN_NONE;
00051 }
00052
00053 int main()
00054 {
00055 GScanner* s;
00056
00057 eh_init_glib();
00058
00059
00060
00061
00062 s = g_scanner_new( NULL );
00063 eh_watch_ptr( s );
00064 eh_watch_ptr( s->config );
00065 eh_watch_ptr( s->symbol_table );
00066 eh_watch_ptr( ((_GHashTable*)(s->symbol_table))->nodes );
00067 g_scanner_destroy( s );
00068 eh_debug( "here" );
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 eh_heap_dump( "heap_dump.txt" );
00088
00089 return 0;
00090 }
00091