redefined Object_String for simpler string handling and made other related changes

This commit is contained in:
2014-01-10 14:54:46 +00:00
parent 36bb4d7b7d
commit 78136a66cf
7 changed files with 100 additions and 180 deletions

View File

@ -10,7 +10,7 @@ package body Token is
procedure Clear_Buffer (Buffer: in out Buffer_Record) is
pragma Inline (Clear_Buffer);
begin
Buffer.Last := 0;
Buffer.Last := 0;
end Clear_Buffer;
procedure Purge_Buffer (Interp: in out Interpreter_Record;
@ -31,14 +31,14 @@ package body Token is
Pool.Deallocate (Tmp);
end;
Buffer := (null, 0, 0);
Buffer := ( Ptr => null, Len => 0, Last => 0);
end if;
end Purge_Buffer;
procedure Append_Buffer (Interp: in out Interpreter_Record;
Buffer: in out Buffer_Record;
Source: in Object_String) is
Incr: Standard.Natural;
Incr: Object_String_Size;
begin
if Buffer.Last >= Buffer.Len then
if Buffer.Len <= 0 then