Skip to content

Commit

Permalink
Restrict copying to valid sequences
Browse files Browse the repository at this point in the history
Ref. #292
  • Loading branch information
treiher committed Mar 31, 2021
1 parent 723e5f6 commit 56f6d9a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions rflx/templates/rflx_message_sequence.ads
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ is
procedure Copy (Ctx : Context; Buffer : out Types.Bytes) with
Pre =>
(Has_Buffer (Ctx)
and Valid (Ctx)
and Byte_Size (Ctx) = Buffer'Length);

function Has_Element (Ctx : Context) return Boolean with
Expand Down
1 change: 1 addition & 0 deletions rflx/templates/rflx_scalar_sequence.ads
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ is
procedure Copy (Ctx : Context; Buffer : out Types.Bytes) with
Pre =>
(Has_Buffer (Ctx)
and Valid (Ctx)
and Byte_Size (Ctx) = Buffer'Length);

procedure Next (Ctx : in out Context) with
Expand Down
1 change: 1 addition & 0 deletions tests/spark/generated/rflx-rflx_message_sequence.ads
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ is
procedure Copy (Ctx : Context; Buffer : out Types.Bytes) with
Pre =>
(Has_Buffer (Ctx)
and Valid (Ctx)
and Byte_Size (Ctx) = Buffer'Length);

function Has_Element (Ctx : Context) return Boolean with
Expand Down
1 change: 1 addition & 0 deletions tests/spark/generated/rflx-rflx_scalar_sequence.ads
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ is
procedure Copy (Ctx : Context; Buffer : out Types.Bytes) with
Pre =>
(Has_Buffer (Ctx)
and Valid (Ctx)
and Byte_Size (Ctx) = Buffer'Length);

procedure Next (Ctx : in out Context) with
Expand Down

0 comments on commit 56f6d9a

Please sign in to comment.