Skip to content

Commit 341b284

Browse files
committed
Use GtkAda binding for GIO_Channel and Spawn
1 parent 366c428 commit 341b284

File tree

6 files changed

+82
-408
lines changed

6 files changed

+82
-408
lines changed

gnat/spawn.gpr

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ project Spawn is
2323
for Source_Dirs use ("../source/spawn");
2424
for Object_Dir use "../.obj/spawn";
2525

26-
Common_Excluded :=
27-
("glib-spawns.ads",
28-
"glib-io_channels.ads");
26+
Common_Excluded := ();
2927

3028
case OS_API is
3129
when "Posix" =>

source/spawn/glib-io_channels.ads

Lines changed: 0 additions & 189 deletions
This file was deleted.

source/spawn/glib-spawns.ads

Lines changed: 0 additions & 132 deletions
This file was deleted.

source/spawn/spawn-environments-internal__glib.adb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ with Interfaces.C;
2020

2121
with GNAT.Strings;
2222

23-
with Gtkada.Bindings;
24-
with Glib.Spawns;
23+
with Glib.Spawn;
2524

2625
package body Spawn.Environments.Internal is
2726

@@ -32,8 +31,7 @@ package body Spawn.Environments.Internal is
3231
procedure Initialize_Default
3332
(Default : out Spawn.Environments.Process_Environment)
3433
is
35-
List : GNAT.Strings.String_List :=
36-
Gtkada.Bindings.To_String_List_And_Free (Glib.Spawns.g_get_environ);
34+
List : GNAT.Strings.String_List := Glib.Spawn.Get_Environ;
3735
begin
3836
for Text of List loop
3937
declare

source/spawn/spawn-internal__glib.ads

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
------------------------------------------------------------------------------
1717

1818
with Ada.Finalization;
19-
with Interfaces.C;
2019

21-
with Glib.IO_Channels;
20+
with Glib.IOChannel;
2221
with Glib.Main;
23-
with Glib.Spawns;
22+
with Glib.Spawn;
2423

2524
private package Spawn.Internal is
2625

@@ -34,8 +33,8 @@ private package Spawn.Internal is
3433
type Pipe_Kinds is (Stdin, Stdout, Stderr);
3534

3635
type Pipe_Record is record
37-
FD : aliased Interfaces.C.int;
38-
Channel : Glib.IO_Channels.Channel;
36+
FD : aliased Glib.Gint;
37+
Channel : Glib.IOChannel.Giochannel;
3938
Event : Glib.Main.G_Source_Id;
4039
-- Pipe is watched if Event /= No_Source_Id
4140
Watch : Boolean;
@@ -57,7 +56,7 @@ private package Spawn.Internal is
5756
type Process is new Ada.Finalization.Limited_Controlled with record
5857
Reference : aliased Process_Reference;
5958
Event : Glib.Main.G_Source_Id := 0;
60-
pid : aliased Glib.Spawns.GPid := 0;
59+
pid : aliased Glib.Spawn.GPid := 0;
6160
pipe : Pipe_Array :=
6261
(others => (0, null, Glib.Main.No_Source_Id, False));
6362
end record;

0 commit comments

Comments
 (0)