From bbf2feaa1b3328af178c4b9b6992beeb58ee1204 Mon Sep 17 00:00:00 2001 From: Richard Brooksby Date: Sun, 27 Mar 2016 12:13:21 +0100 Subject: [PATCH] Documenting ``rangesetbase`` and ``rangesetlimit``. Copied from Perforce Change: 190463 ServerID: perforce.ravenbrook.com --- mps/design/range.txt | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/mps/design/range.txt b/mps/design/range.txt index ee1e734ea40..f65bb10e744 100644 --- a/mps/design/range.txt +++ b/mps/design/range.txt @@ -40,9 +40,10 @@ Interface ``typedef RangeStruct *Range`` -``Range`` is the type of a range. It is an alias for ``RangeStruct *``. ``RangeStruct`` is defined in the header so that it can be -inlined in client structures or allocated on the stack. Clients must -not depend on its implementation details. +``Range`` is the type of a range. It is an alias for +``RangeStruct *``. ``RangeStruct`` is defined in the header so that it +can be inlined in client structures or allocated on the stack. Clients +must not depend on its implementation details. ``void RangeInit(Range range, Addr base, Addr limit)`` @@ -78,6 +79,18 @@ there is a function too.) Return the limit of the range. (This is implemented as a macro, but there is a function too.) +``void RangeSetBase(Range range, Addr addr)`` + +Set the base of the range. ``addr`` must not be greater than the +range limit. To set them both at once, use ``RangeInit``. (This is +implemented as a macro, but there is a function too.) + +``void RangeSetLimit(Range range, Addr addr)`` + +Set the limit of the range. ``addr`` must not be less than the range +base. To set the both at once, use ``RangeInit``. (This is +implemented as a macro, but there's a function too.) + ``Size RangeSize(Range range)`` Return the size of the range. (This is implemented as a macro, but @@ -117,14 +130,16 @@ Document history - 2013-05-21 GDR_ Created. - 2014-01-15 GDR_ Added ``RangeContains``. +- 2016-03-27 RB_ Addded ``RangeSetBase`` and ``RangeSetLimit``. .. _GDR: http://www.ravenbrook.com/consultants/gdr/ +.. _RB: http://www.ravenbrook.com/consultants/rb/ Copyright and License --------------------- -Copyright © 2013-2014 Ravenbrook Limited . +Copyright © 2013-2016 Ravenbrook Limited . All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.