Skip to content

Commit

Permalink
kernel: tweak ErrorLVars use in ReadEvalCommand
Browse files Browse the repository at this point in the history
This is no functional change, but now we save and restore ErrorLVars
exactly like the other STATE() members we save and restore.
  • Loading branch information
fingolfin committed May 11, 2018
1 parent 484b32c commit ae9ae13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -2733,6 +2733,7 @@ ExecStatus ReadEvalCommand(Obj context, Obj *evalResult, UInt *dualSemicolon)
readTilde = STATE(ReadTilde);
tilde = STATE(Tilde);
currLHSGVar = STATE(CurrLHSGVar);
errorLVars = STATE(ErrorLVars);
memcpy( readJmpError, STATE(ReadJmpError), sizeof(syJmp_buf) );

// initialize everything and begin an interpreter
Expand All @@ -2741,9 +2742,8 @@ ExecStatus ReadEvalCommand(Obj context, Obj *evalResult, UInt *dualSemicolon)
STATE(ReadTilde) = 0;
STATE(Tilde) = 0;
STATE(CurrLHSGVar) = 0;
STATE(ErrorLVars) = context;
RecreateStackNams(context);
errorLVars = STATE(ErrorLVars);
STATE(ErrorLVars) = context;
#ifdef HPCGAP
lockSP = RegionLockSP();
#endif
Expand Down Expand Up @@ -2812,7 +2812,7 @@ ExecStatus ReadEvalCommand(Obj context, Obj *evalResult, UInt *dualSemicolon)
STATE(ReadTilde) = readTilde;
STATE(Tilde) = tilde;
STATE(CurrLHSGVar) = currLHSGVar;
STATE(ErrorLVars) = errorLVars;
STATE(ErrorLVars) = errorLVars;

/* copy the result (if any) */
*evalResult = STATE(IntrResult);
Expand Down

0 comments on commit ae9ae13

Please sign in to comment.