Hi, is there a concurrent GList around? It should use of atomic
operations. My project probably has need for it.
Due to concurrency problems. I believe I get those errors cause of
unfinished operations. Since I'm working on performance.
Please visit my project:
http://sf.net/p/ags
regards
a newly created list for you, save the address to the return
pointer. If you pass non NULL pointer (already created list) to first
arg of g_list_append() it will ALWAYS return the HEAD of the list and
will not create a new list.
It's better for you to read GList implementation source code
On Thu, Aug 16, 2012 at 06:49:25PM +0400, Vlasov Vitaly wrote:
> I need to save newly created list poiner.
No.
Many operations change the list head (by adding, removing, reordering,
..., elements). In general, if an operation returns the new list head
you *must* save and use that in subsequent o
Thank you! I almost understand bahavior of GList.
I need to save newly created list poiner. So, i need to use g_list_last() to
save it? Is there another method to save created list pointer?
В сообщении от Четверг 16 августа 2012 15:51:22 вы написали:
> Hi.
>
> Not sure what is trou
Hi.
Not sure what is troubling you here. GList is represented by pointer
to first element or NULL if list is empty. And when you append items
to the list, the address of the list stays the same, since first
element of the list is unchanged (exception to this is when append
first element to an
Hello
Thanks for answer.
> Did you mean Last list element: 0x832c610 is differ from INIT list
> prt: 0x830f080?
No.
Lest's see...
i got function "do_work" with:
1. new Glist init with random data
2. callback definition of button click: button_click(.
t of the list (address).
> in test_glist()
First you call temp = g_list_insert(test, ...), test = NULL, save the
list to temp pointer to GList,
second, you call temp = g_list_append(test, ...), nothing wrong with
that code! BUT if you suppose to insert 2nd list here, then you are
wrong. Becau
Hi, list.
I can't understand, why g_list_append return different values in my
callback's(please read source). In first case i got same list, which was
obtained from arguments. In second case g_list_append returns newly created
list.
Why result's is are not the same?
In real program, i n
On 09/12/2011 11:33 PM, Craig wrote:
> On Mon, 2011-09-12 at 22:20 +0200, Florian Müllner wrote:
>> You are modifying the list in the loop until g_list_next() returns
>> NULL ...
>
> Right. I understand this now. However, I thought using g_list_first()
> would set G
On 2011-09-12 15:10, Craig wrote:
Hi All,
I am confused about GList. My application is parsing a file and creating
midi data with it. I am using GList to store the midi data. I have
created a GtkListStore to view the parsed data (to insure I am parsing
the data properly). So, below I iterate
Hello Craig,
I think this is because after first loop, variable "events" is NULL,
and you cant get first element of GList from it:
g_list_next() --- Returns : the next element, or NULL if there are no
more elements.
> Hi All,
>
> I am confused about GList. My application is
2011/9/12 Craig :
> On Mon, 2011-09-12 at 22:20 +0200, Florian Müllner wrote:
>> You are modifying the list in the loop until g_list_next() returns
>> NULL ...
>
> Right. I understand this now. However, I thought using g_list_first()
> would set GList *events back to th
On Mon, 2011-09-12 at 22:20 +0200, Florian Müllner wrote:
> You are modifying the list in the loop until g_list_next() returns
> NULL ...
Right. I understand this now. However, I thought using g_list_first()
would set GList *events back to the first object. But, as you state,
the darn
Le 12/09/2011 21:10, Craig a écrit :
> Hi All,
>
> I am confused about GList. My application is parsing a file and creating
> midi data with it. I am using GList to store the midi data. I have
> created a GtkListStore to view the parsed data (to insure I am parsing
> the d
2011/9/12 Craig :
> Hi All,
>
> I am confused about GList. My application is parsing a file and creating
> midi data with it. I am using GList to store the midi data. I have
> created a GtkListStore to view the parsed data (to insure I am parsing
> the data properly). So, below
On lun, 2011-09-12 at 15:10 -0400, Craig wrote:
> I am shocked to see that after I iterate through the GList, I cannot
> iterate through the list again.
That's an easy one :-)
> while(events)
> {
> /* [...] */
> even
Am 12.09.2011 21:10, schrieb Craig:
Hi All,
I am confused about GList. My application is parsing a file and creating
midi data with it. I am using GList to store the midi data. I have
created a GtkListStore to view the parsed data (to insure I am parsing
the data properly). So, below I
Hi All,
I am confused about GList. My application is parsing a file and creating
midi data with it. I am using GList to store the midi data. I have
created a GtkListStore to view the parsed data (to insure I am parsing
the data properly). So, below I iterate through the GList and "copy
Then how global variable `Data' was declared in your code?
--- kuleshovm...@gmail.com wrote:
From: Alexander Kuleshov
To: gtk-app-devel-list@gnome.org
Subject: Global GList in gtk+ application
Date: Sat, 12 Jun 2010 12:03:40 +0600
Hello,
I need in global list in my gtk+ application,
Le 12/06/2010 08:03, Alexander Kuleshov a écrit :
> [snip]
>
> I have a function bulid my list:
> gboolean build_list()
> {
>Data->list = g_list_append(Data->list, "First ");
>Data->list = g_list_append(Data->list, "Second ");
>Data->list = g_list_append(Data->list, "Third ");
>
>g_
If you want to show code, at least show something that compiles and
exhibits your problem (if any), i.e. a minimal but complete sample.
Anyway, I don't see what your problem has to do with GTK+.
--tml
___
gtk-app-devel-list mailing list
gtk-app-devel-lis
Hello,
I need in global list in my gtk+ application, i use for it GList:
For example:
I have structure:
typedef struct _data
{
Glist list;
}Data;
I want to use one copy of the list in the whole program:
I have a function bulid my list:
gboolean build_list()
{
Data->list = g_list_app
g_list_append you're passing a pointer to a pointer to an integer, and I
don't think that's what you want. Do something like:
#include
#include
#include
int main (int argc, char **argv) {
GList *tmp, *list = NULL;
gint i, *element;
/* App
On Dec 25, 2007 9:50 PM, sumit kumar <[EMAIL PROTECTED]> wrote:
> Hi All,
> I am trying to use GLib double link list in my application.But I have a
> problem. I run the GList sample program from Gtk+-2.0 FAQ:-
>
*snip*
>
> *gint pos;
> g_print("Enter Number1
Hi All,
I am trying to use GLib double link list in my application.But I have a
problem. I run the GList sample program from Gtk+-2.0 FAQ:-
*GList *list = NULL;
GList *listrunner;
gint array[] = { 1, 2, 3, 4, 5, 6 };
gint pos;
gint *value;
/* add data to the list */
for (pos=0;pos < 6;
> Exactly, except for the `dummy area' which reveals some
> misunderstanding. The pointer passed to g_list_append() is
> just a value.
I think I may picked that up from the book. Its example it gives
allocates a pointer to an int, puts a value in that space, and then adds
the pointer to the l
can be dependent upon another test. Several tests can depend on a given
> test. I figured that a GList (into glib for a penny, in for a pound I
> figure) of g_object_add_weak_pointer() references would then allow the
> test on which the other N tests are dependent to send each of them a
&
gured that a GList (into glib for a penny, in for a pound I
figure) of g_object_add_weak_pointer() references would then allow the
test on which the other N tests are dependent to send each of them a
signal via a "foreach" when it was setup and they could proceede.
The problem i
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Fri, Nov 17, 2006 at 09:44:01AM -0600, Steven Boyls wrote:
> I have created a GList with the following code :
> GList *my_list;
>GtkTreeSelection *selection;
>GtkTreeModel *model;
>
Ouch!
change this
next = g_slist_next (node);
to
node = g_slist_next (node);
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
ome.org/doc/API/2.0/gtk/GtkTreeModel.html#gtk-tree-row-reference-new>
Single Linked
List<http://developer.gnome.org/doc/API/2.0/glib/glib-Singly-Linked-Lists.html>(g_slist_nth_data
, g_slist_foreach)
2006/11/17, Steven Boyls <[EMAIL PROTECTED]>:
>
> I have created
I have created a GList with the following code :
GList *my_list;
GtkTreeSelection *selection;
GtkTreeModel *model;
selection = gtk_tree_view_get_selection(list_file_treeview);
model = gtk_tree_view_get_model(list_file_treeview);
my_list
> Hi all,
>
> Pls see the below code structure. how to free the glist at the indicated
> place?
>
> GList * glist=NULL;
>
> for(i=0;i
>
> // some processing
>
>
> //here want to free the glist
>
>
>
> Thks in advance..
> Shibu
> __
On Tuesday 12 September 2006 09:11, shibu Alampatta wrote:
> Hi all,
>
> Pls see the below code structure. how to free the glist at the indicated
> place?
>
> GList * glist=NULL;
>
> for(i=0;i
Furthermore, the above code is wrong: g_list_append returns the new list head.
On 9/12/06, shibu Alampatta <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Pls see the below code structure. how to free the glist at the indicated
> place?
>
> GList * glist=NULL;
>
> for(i=0;i
>
> // some processing
>
>
> //here want to free the
Hi all,
Pls see the below code structure. how to free the glist at the indicated
place?
GList * glist=NULL;
for(i=0;ihttp://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Hi,
Thank you all for your kind answers.
--
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
>
> 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-&
sts instead of one? Same number of mallocs, just
one pointer more to pass around.
GList *nbr;
GList *str;
nbr = str = NULL;
for (i = 0; mydatasource[i] != NULL; i++) {
nbr = g_list_prepend (nbr, GUINT_TO_POINTER (mydatasource[i].myint));
str = g_list_prepend (str, g_strdup (mydatasource[i].mystr)
igned 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_st
On Fri, 21 Apr 2006 12:44:48 +0200, Colossus <[EMAIL PROTECTED]> wrote:
> Enrico Tröger wrote:
>
> > give it some value
> > *iptr = 100l;
>
> thanks for replying. Which value is the above ? Hexadecimal one ?? Or
> what else ?
No, it is a simple decimal value. I appended the l to emphasise that
Enrico Tröger wrote:
give it some value
*iptr = 100l;
Hi Enrico,
thanks for replying. Which value is the above ? Hexadecimal one ?? Or
what else ?
--
Colossus
Xarchiver, a Linux GTK+2 only archive manager - http://xarchiver.xfce.org
Cpsed, a Linux OpenGL 3D scene editor - http://cpsed.source
On Fri, 21 Apr 2006 12:11:48 +0200, Colossus <[EMAIL PROTECTED]> wrote:
Hi Colossus,
> I have to fill a GList with strings and unsigned long int.
> The content of the GList is not always the same so I don't
> know wich element is a string to free or a GUINT_TO_POINTER
don
Hi,
I have to fill a GList with strings and unsigned long int.
The content of the GList is not always the same so I don't
know wich element is a string to free or a GUINT_TO_POINTER
that I don't have to free. Is there a trick to do so ?
Thanks,
--
Colossus
Xarchiver, a Linux GTK+2 on
On Thu, 18 Aug 2005 20:17:34 +0100
Chris Vine <[EMAIL PROTECTED]> wrote:
> On Thursday 18 August 2005 08:51, HuamiSoft Hubert Sokolowski wrote:
>
> > always when you allocate a memory, you need to free it by your self.
> > to free a list completely you need to free /data/ by your self if it
> > p
On Thursday 18 August 2005 08:51, HuamiSoft Hubert Sokolowski wrote:
> always when you allocate a memory, you need to free it by your self.
> to free a list completely you need to free /data/ by your self if it
> points to some memory that you allocated. g_list_remove removes an
> element from a l
t; >
> > There are three possible functions for removing an element from the list:
> >
> > g_list_remove (GList *list, gconstpointer data);
> > g_list_remove_link (GList *list, GList *llink);
> > g_list_delete_link (GList *list, GList *link_);
>
> And whi
On Thu, Aug 18, 2005 at 12:52:45AM -0500, Tristan Sloughter wrote:
> I am using GLists and want to make sure I am freeing all the memory, and
> not twice or course.
>
> There are three possible functions for removing an element from the list:
>
> g_list_remove (GList *list,
Hi!
On Thu, 18 Aug 2005 00:52:45 -0500
Tristan Sloughter <[EMAIL PROTECTED]> wrote:
> I am using GLists and want to make sure I am freeing all the memory, and
> not twice or course.
>
> There are three possible functions for removing an element from the list:
>
> g_
I am using GLists and want to make sure I am freeing all the memory, and
not twice or course.
There are three possible functions for removing an element from the list:
g_list_remove (GList *list, gconstpointer data);
g_list_remove_link (GList *list, GList *llink);
g_list_delete_link (GList
ÐÐÑÑÐÐÑ wrote:
> i think that the result of next code must be 3.
> but i have 0
> if uncomment "l=..." it's work correctly
>
> #include
>
> int main()
> {
> GList* l=NULL;
> //l=g_list_alloc();
>
> g_list_append(l,GINT_TO_P
On Monday 02 May 2005 18:13, ÐÐÑÑÐÐ Ñ wrote:
> I think that the result of next code must be 3, but
> I have 0. If uncomment "l=..." it's work correctly
>
> GList* l=NULL;
> //l=g_list_alloc();
>
> g_list_append(l,GINT_TO_POINTER(1));
>
On 5/2/05, Городничев Денис <[EMAIL PROTECTED]> wrote:
> i think that the result of next code must be 3.
> but i have 0
> if uncomment "l=..." it's work correctly
>
> #include
>
> int main()
> {
> GList* l=NULL;
> //l=g_list_
uot;l=..." it's work correctly
#include
int main()
{
GList* l=NULL;
//l=g_list_alloc();
l = g_list_append(l,GINT_TO_POINTER(1));
l = g_list_append(l,GINT_TO_POINTER(1));
l = g_list_append(l,GINT_TO_POINTER(1));
printf("
i think that the result of next code must be 3.
but i have 0
if uncomment "l=..." it's work correctly
#include
int main()
{
GList* l=NULL;
//l=g_list_alloc();
g_list_append(l,GINT_TO_POINTER(1));
g_list_append(l,GINT_TO_POINTER(1));
g_list_append(l,GI
On Fri, 2005-04-22 at 08:37 +0200, Stefan Kost wrote:
> hi,
>
> Several of my GObjects provide thgs like GList or GHashmap as readable
> properties. Unfortunately these properties are just gpointers.
> For the file-serialisation it would be nice to know whats behind the pointer.
hi,
Several of my GObjects provide thgs like GList or GHashmap as readable
properties. Unfortunately these properties are just gpointers.
For the file-serialisation it would be nice to know whats behind the pointer. Is
GBoxed the way to go? This modules has only vague docs, especially what it is
57 matches
Mail list logo