[gtkada] Illegal Ada code in src/gtk-marshallers.adb
Ludovic Brenta
ludovic.brenta at insalien.org
Tue Jun 8 19:53:36 CEST 2004
Arnaud Charlet writes:
>> immediately after the declaration of each "Call" function
>> in each private part, and then use that instead of "Call'Access"
>> in the corresponding package body.
>
> Thanks for your report.
>
> If it's something important for you, please submit a patch, as this is a large
> change that we're not likely to make in the short term.
>
> Arno
It is not important for me, but I thought I'd contribute somewhat
after all the bug reports I submitted. So, here goes.
--
Ludovic Brenta.
--- src/gtk-marshallers.adb~ 2004-06-08 18:10:21.000000000 +0200
+++ src/gtk-marshallers.adb 2004-06-08 18:15:25.000000000 +0200
@@ -76,7 +76,7 @@
-- arguments
-- pragma Assert (Count_Arguments (Get_Type (Obj), Name) >= 1);
- return (Func => To_General_Handler (Cb), Proxy => Call'Access);
+ return (Func => To_General_Handler (Cb), Proxy => Call_Access);
end To_Marshaller;
------------------
@@ -171,7 +171,7 @@
-- We must have at least one argument in the real callback.
-- pragma Assert (Count_Arguments (Get_Type (Obj), Name) >= 1);
- return (Func => To_General_Handler (Cb), Proxy => Call'Access);
+ return (Func => To_General_Handler (Cb), Proxy => Call_Access);
end To_Marshaller;
------------------
@@ -233,7 +233,7 @@
function To_Marshaller (Cb : Handler) return Marshaller is
begin
- return (Func => To_General_Handler (Cb), Proxy => Call'Access);
+ return (Func => To_General_Handler (Cb), Proxy => Call_Access);
end To_Marshaller;
------------------
@@ -302,7 +302,7 @@
-- We must have at least one argument the real callback.
-- pragma Assert (Count_Arguments (Get_Type (Obj), Name) >= 1);
- return (Func => To_General_Handler (Cb), Proxy => Call'Access);
+ return (Func => To_General_Handler (Cb), Proxy => Call_Access);
end To_Marshaller;
------------------
@@ -399,7 +399,7 @@
-- We must have at least one argument in the real callback.
-- pragma Assert (Count_Arguments (Get_Type (Obj), Name) >= 1);
- return (Func => To_General_Handler (Cb), Proxy => Call'Access);
+ return (Func => To_General_Handler (Cb), Proxy => Call_Access);
end To_Marshaller;
------------------
@@ -463,7 +463,7 @@
function To_Marshaller (Cb : Handler) return Marshaller is
begin
- return (Func => To_General_Handler (Cb), Proxy => Call'Access);
+ return (Func => To_General_Handler (Cb), Proxy => Call_Access);
end To_Marshaller;
------------------
@@ -531,7 +531,7 @@
-- We must have at least one argument in the real callback.
-- pragma Assert (Count_Arguments (Get_Type (Obj), Name) >= 1);
- return (Func => To_General_Handler (Cb), Proxy => Call'Access);
+ return (Func => To_General_Handler (Cb), Proxy => Call_Access);
end To_Marshaller;
------------------
@@ -620,7 +620,7 @@
-- We must have at least one argument in the real callback.
-- pragma Assert (Count_Arguments (Get_Type (Obj), Name) >= 1);
- return (Func => To_General_Handler (Cb), Proxy => Call'Access);
+ return (Func => To_General_Handler (Cb), Proxy => Call_Access);
end To_Marshaller;
------------------
@@ -678,7 +678,7 @@
function To_Marshaller (Cb : Handler) return Marshaller is
begin
- return (Func => To_General_Handler (Cb), Proxy => Call'Access);
+ return (Func => To_General_Handler (Cb), Proxy => Call_Access);
end To_Marshaller;
------------------
@@ -742,7 +742,7 @@
-- We must have at least one argument in the real callback.
-- pragma Assert (Count_Arguments (Get_Type (Obj), Name) >= 1);
- return (Func => To_General_Handler (Cb), Proxy => Call'Access);
+ return (Func => To_General_Handler (Cb), Proxy => Call_Access);
end To_Marshaller;
------------------
@@ -833,7 +833,7 @@
-- We must have at least one argument in the real callback.
-- pragma Assert (Count_Arguments (Get_Type (Obj), Name) >= 1);
- return (Func => To_General_Handler (Cb), Proxy => Call'Access);
+ return (Func => To_General_Handler (Cb), Proxy => Call_Access);
end To_Marshaller;
------------------
@@ -893,7 +893,7 @@
function To_Marshaller (Cb : Handler) return Marshaller is
begin
- return (Func => To_General_Handler (Cb), Proxy => Call'Access);
+ return (Func => To_General_Handler (Cb), Proxy => Call_Access);
end To_Marshaller;
------------------
--- src/gtk-marshallers.ads~ 2004-06-08 18:13:28.000000000 +0200
+++ src/gtk-marshallers.ads 2004-06-08 18:15:38.000000000 +0200
@@ -172,6 +172,8 @@
(Widget : access Widget_Type'Class;
Params : Glib.Values.GValues;
Cb : General_Handler) return Return_Type;
+
+ Call_Access : constant Handler_Proxy := Call'Access;
end Generic_Marshaller;
-- Widget Marshaller
@@ -195,6 +197,8 @@
(Widget : access Widget_Type'Class;
Params : Glib.Values.GValues;
Cb : General_Handler) return Return_Type;
+
+ Call_Access : constant Handler_Proxy := Call'Access;
end Generic_Widget_Marshaller;
-- Void Marshaller
@@ -213,6 +217,8 @@
(Widget : access Widget_Type'Class;
Params : Glib.Values.GValues;
Cb : General_Handler) return Return_Type;
+
+ Call_Access : constant Handler_Proxy := Call'Access;
end Void_Marshaller;
end Return_Marshallers;
@@ -270,6 +276,8 @@
Params : Glib.Values.GValues;
Cb : General_Handler;
User_Data : User_Type) return Return_Type;
+
+ Call_Access : constant Handler_Proxy := Call'Access;
end Generic_Marshaller;
-- Widget Marshaller
@@ -295,6 +303,8 @@
Params : Glib.Values.GValues;
Cb : General_Handler;
User_Data : User_Type) return Return_Type;
+
+ Call_Access : constant Handler_Proxy := Call'Access;
end Generic_Widget_Marshaller;
-- Void Marshaller
@@ -315,6 +325,8 @@
Params : Glib.Values.GValues;
Cb : General_Handler;
User_Data : User_Type) return Return_Type;
+
+ Call_Access : constant Handler_Proxy := Call'Access;
end Void_Marshaller;
end User_Return_Marshallers;
@@ -370,6 +382,8 @@
(Widget : access Widget_Type'Class;
Params : Glib.Values.GValues;
Cb : General_Handler);
+
+ Call_Access : constant Handler_Proxy := Call'Access;
end Generic_Marshaller;
-- Widget Marshaller
@@ -393,6 +407,8 @@
(Widget : access Widget_Type'Class;
Params : Glib.Values.GValues;
Cb : General_Handler);
+
+ Call_Access : constant Handler_Proxy := Call'Access;
end Generic_Widget_Marshaller;
-- Void Marshaller
@@ -410,6 +426,8 @@
(Widget : access Widget_Type'Class;
Params : Glib.Values.GValues;
Cb : General_Handler);
+
+ Call_Access : constant Handler_Proxy := Call'Access;
end Void_Marshaller;
end Void_Marshallers;
@@ -468,6 +486,8 @@
Params : Glib.Values.GValues;
Cb : General_Handler;
User_Data : User_Type);
+
+ Call_Access : constant Handler_Proxy := Call'Access;
end Generic_Marshaller;
-- Widget Marshaller
@@ -493,6 +513,8 @@
Params : Glib.Values.GValues;
Cb : General_Handler;
User_Data : User_Type);
+
+ Call_Access : constant Handler_Proxy := Call'Access;
end Generic_Widget_Marshaller;
-- Void Marshaller
@@ -513,6 +535,8 @@
Params : Glib.Values.GValues;
Cb : General_Handler;
User_Data : User_Type);
+
+ Call_Access : constant Handler_Proxy := Call'Access;
end Void_Marshaller;
end User_Void_Marshallers;
More information about the gtkada
mailing list