Skip to content

Commit

Permalink
prevent inbounds macro from interfering with line numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Jan 11, 2014
1 parent a007350 commit 72b5b70
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions base/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,10 @@ end
esc(e::ANY) = Expr(:escape, e)

macro boundscheck(yesno,blk)
quote
$(Expr(:boundscheck,yesno))
$(esc(blk))
$(Expr(:boundscheck,:pop))
end
# hack: use this syntax since it avoids introducing line numbers
:($(Expr(:boundscheck,yesno));
$(esc(blk));
$(Expr(:boundscheck,:pop)))
end

macro inbounds(blk)
Expand Down

0 comments on commit 72b5b70

Please sign in to comment.