Skip to content

Commit

Permalink
Fixed build failure when building without thread support
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Nov 30, 2017
1 parent ee7985a commit d3324a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/b6b_exc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ static enum b6b_res b6b_exc_proc_try(struct b6b_interp *interp,
{
struct b6b_obj *t, *e, *f, *o;
unsigned int argc;
#ifdef B6B_HAVE_THREADS
int exit;
#endif
enum b6b_res res, eres = B6B_ERR, fres;

argc = b6b_proc_get_args(interp, args, "oo|oo", NULL, &t, &e, &f);
Expand Down Expand Up @@ -55,12 +57,16 @@ static enum b6b_res b6b_exc_proc_try(struct b6b_interp *interp,
exit = interp->exit;
/* if the try block triggered exit, postpone it and let the finally
* block run */
#ifdef B6B_HAVE_THREADS
interp->exit = 0;
#endif
o = b6b_ref(interp->fg->_);
fres = b6b_call(interp, f);
b6b_unref(interp->fg->_);
interp->fg->_ = o;
#ifdef B6B_HAVE_THREADS
interp->exit = exit;
#endif

if ((res == B6B_RET) || (res == B6B_EXIT))
return res;
Expand Down

0 comments on commit d3324a8

Please sign in to comment.