Skip to content

Commit

Permalink
M agpl-generic_handle.adb
Browse files Browse the repository at this point in the history
M    agpl-generic_handle.ads
M    agpl-calendar-serializable_time.adb
M    agpl-calendar-serializable_time.ads
  • Loading branch information
mosteo committed Jul 12, 2006
1 parent 95cdb09 commit 970417d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
9 changes: 9 additions & 0 deletions agpl-calendar-serializable_time.adb
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
package body Agpl.Calendar.Serializable_Time is

---------
-- "+" --
---------

function "+" (This : in Object) return Ada.Calendar.Time is
begin
return Ada.Calendar.Time (This);
end "+";

----------
-- Read --
----------
Expand Down
3 changes: 3 additions & 0 deletions agpl-calendar-serializable_time.ads
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ package Agpl.Calendar.Serializable_Time is

type Object is new Ada.Calendar.Time;

function "+" (This : in Object) return Ada.Calendar.Time;
pragma Inline ("+");

procedure Read (Stream : access Ada.Streams.Root_Stream_Type'Class;
This : out Object);
for Object'Read use Read;
Expand Down
7 changes: 5 additions & 2 deletions agpl-generic_handle.adb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ package body Agpl.Generic_Handle is

procedure Adjust (This : in out Object) is
begin
This.Data := new Item'(This.Data.all);
if This.Data /= null then
This.Data := new Item'(This.Data.all);
end if;
end Adjust;

-----------
Expand Down Expand Up @@ -63,7 +65,8 @@ package body Agpl.Generic_Handle is

function Set (This : in Item) return Object is
begin
return (Ada.Finalization.Controlled with Data => new Item'(This));
return (Ada.Finalization.Controlled with
Data => new Item'(This));
end Set;

---------
Expand Down
2 changes: 1 addition & 1 deletion agpl-generic_handle.ads
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ package Agpl.Generic_Handle is

pragma Preelaborate;

type Item_Access is access Item;
type Item_Access is access all Item;

No_Data : exception;

Expand Down

0 comments on commit 970417d

Please sign in to comment.