Skip to content

glib2 g_array macros

If you change the following macros, they are fully compatible with the C versions.

Old:

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;

New:

function g_array_append_val(a: PGArray; const v): PGArray;
begin
  Result := g_array_append_vals(a, @v, 1);
end;

function g_array_prepend_val(a: PGArray; const v): PGArray;
begin
  Result := g_array_prepend_vals(a, @v, 1);
end;

function g_array_insert_val(a: PGArray; i: Tguint; const v): PGArray;
begin
  Result := g_array_insert_vals(a, i, @v, 1);
end;
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information