glib2.pas line 221:
function g_array_append_val(a: PGArray; v : gpointer) :
PGArray;
begin
g_array_append_val := g_array_append_vals(a,@(v),1);
end;
function g_array_prepend_val(a: PGArray; v : gpointer)
: PGArray;
begin
g_array_prepend_val := g_array_prepend_vals(a,@(v),1);
end;
function g_array_insert_val(a: PGArray; i: guint; v :
gpointer) : PGArray;
begin
g_array_insert_val := g_array_insert_vals(a,i,@(v),1);
end;
i see g_array_append_vals is receiving "@(v)", that
means a pointer to the pointer, when it must receive
the pointer.
i noticed that when i was writting a small program and
having weird effects because the GArray seems not being
storing the data i gave it. so i change those lines to
these:
function g_array_append_val(a: PGArray; v : gpointer) :
PGArray;
begin
g_array_append_val := g_array_append_vals(a,
gconstpointer(v), 1);
end;
function g_array_prepend_val(a: PGArray; v : gpointer)
: PGArray;
begin
g_array_prepend_val := g_array_prepend_vals(a,
gconstpointer(v), 1);
end;
function g_array_insert_val(a: PGArray; i: guint; v :
gpointer) : PGArray;
begin
g_array_insert_val := g_array_insert_vals(a,i,
gconstpointer(v), 1);
end;