mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Rename Frame::IncreaseOffset() to Frame::AdjustOffset()
For clarity, since it's used for both increasing and decreasing.
This commit is contained in:
parent
7393fc6d24
commit
2219a03344
2 changed files with 5 additions and 5 deletions
|
@ -99,13 +99,13 @@ public:
|
||||||
{ return GetElementByID(id).get(); }
|
{ return GetElementByID(id).get(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Increases the current offset being used for frame accesses.
|
* Adjusts the current offset being used for frame accesses.
|
||||||
* This is in support of inlined functions.
|
* This is in support of inlined functions.
|
||||||
*
|
*
|
||||||
* @param incr Amount by which to increase the frame offset.
|
* @param incr Amount by which to increase the frame offset.
|
||||||
* Use a negative value to shrink the offset.
|
* Use a negative value to shrink the offset.
|
||||||
*/
|
*/
|
||||||
void IncreaseOffset(int incr) { current_offset += incr; }
|
void AdjustOffset(int incr) { current_offset += incr; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets all of the indexes from [*startIdx, frame_size) in
|
* Resets all of the indexes from [*startIdx, frame_size) in
|
||||||
|
|
|
@ -479,7 +479,7 @@ ValPtr InlineExpr::Eval(Frame* f) const
|
||||||
int nargs = args->Exprs().length();
|
int nargs = args->Exprs().length();
|
||||||
|
|
||||||
f->Reset(frame_offset + nargs);
|
f->Reset(frame_offset + nargs);
|
||||||
f->IncreaseOffset(frame_offset);
|
f->AdjustOffset(frame_offset);
|
||||||
|
|
||||||
// Assign the arguments.
|
// Assign the arguments.
|
||||||
for ( auto i = 0; i < nargs; ++i )
|
for ( auto i = 0; i < nargs; ++i )
|
||||||
|
@ -494,11 +494,11 @@ ValPtr InlineExpr::Eval(Frame* f) const
|
||||||
|
|
||||||
catch ( InterpreterException& e )
|
catch ( InterpreterException& e )
|
||||||
{
|
{
|
||||||
f->IncreaseOffset(-frame_offset);
|
f->AdjustOffset(-frame_offset);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
f->IncreaseOffset(-frame_offset);
|
f->AdjustOffset(-frame_offset);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue