Re: How to detect if a glist->data is a GUINT_TO_POINTER for not freeing it ?
- From: Colossus <colossus 3000 it>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How to detect if a glist->data is a GUINT_TO_POINTER for not freeing it ?
- Date: Fri, 21 Apr 2006 13:01:10 +0200
Enrico Tröger wrote:
No, it is a simple decimal value. I appended the l to emphasise that it
is a long int. I'm not completely sure, but I think you can safely omit
it.
This is my code:
original = g_strndup ( start , end - start);
unsigned long long int *_original = g_malloc(sizeof(unsigned long long
int));
*_original = atoll (original);
g_free (original);
later I fill the GList:
archive->row = g_list_prepend (archive->row , _original) ;
Then in another file.c I have to fill the liststore by retrieving the
values from the GList:
gtk_list_store_set(GTK_LIST_STORE(list_store), &iter, i, fields->data,
-1);
And in this line I get the segfault ! Obviously I declared that column
as G_TYPE_UINT64;
It's related to the allocated u long long int pointer because if I use
GUINT_TO_POINTER with G_TYPE_UINT it works. Do you have any idea about
the crash ?
--
Colossus
Xarchiver, a Linux GTK+2 only archive manager - http://xarchiver.xfce.org
Cpsed, a Linux OpenGL 3D scene editor - http://cpsed.sourceforge.net
Mizio, a QT proxy hunter scanner tool - http://mizio.sourceforge.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]