[gnome-db] problem with g_value_get_int()



the code

GdaDataModel *dm;
gint i;
i = g_value_get_int (gda_data_model_get_value_at (dm, 0, 0));

output error

**CRITICAL : assertion G_VALUE_HOLDS_INT (value) failed

but if i do
i = (atoi) gda_value_stringfy (gda_data_model_get_value_at (dm, 0, 0));

i have i = 10,
which say gda_data_model_get_value_at return correct value.
now, why g_value_get_int doesn't work as it supposed to. how to use
g_value_get_int correctly?

thank you


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]