conversation variable replacement

GMail mike.ellerhorst at
Tue Nov 27 17:20:34 EST 2007


I had sent an email about a month ago regarding a school project of  
mine where I am trying to change the data structure holding the  
conversations from a GList to a GHashTable in the conversations.c  
file.  However, I am running into some difficulties.  I apologize if  
this is a very simple mistake, but I declare the new hash table right  
after the GList as follows:

static GList *conversations = NULL;

// My code //
static GHashTable *HTconversations = g_hash_table_new_full 
(g_str_hash, g_str_equal, g_free, NULL);

static GList *ims = NULL;

I get the error that "initializer element is not constant" at the  
line where HTconversations is declared.  I'm guessing that you cannot  
call this function to initialize the variable there.  Could you give  
me some advice as to where to initialize the hash table so that I  
don't run into this problem or how to modify my statement to allow  
the initialization there.



More information about the Devel mailing list