Skip to content

Commit 90c466a

Browse files
committed
Remove inappropriate @boundscheck
When running julia with `--check-bounds=no`, the package fails to precompile. The reason is that compiler elides `@boundscheck`s, which in this case removes buffer reallocation. I believe that's unwanted. Issue was [reported on Discourse](https://discourse.julialang.org/t/json3-fails-to-precompile-due-to-embedded-nuls-in-c-strings/128482) by 0samuraiE.
1 parent a1e654e commit 90c466a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/write.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ end
6565

6666
macro writechar(chars...)
6767
block = quote
68-
@boundscheck @check($(length(chars)))
68+
@check($(length(chars)))
6969
end
7070
for c in chars
7171
push!(block.args, quote

0 commit comments

Comments
 (0)