Skip to content

Commit

Permalink
Unbust JVM build with a workaround at the crashsite
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Jan 21, 2017
1 parent 8b94fae commit be6dc61
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/Buf.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ my role Blob[::T = uint8] does Positional[T] does Stringy is repr('VMArray') is
).throw unless nqp::istype(T,Int);

# other then *8 not supported yet
my int $bpe = try { (T.^nativesize / 8).Int } // 1;
my int $bpe = try {
#?if jvm
# https://irclog.perlgeek.de/perl6-dev/2017-01-20#i_13961377
CATCH { default { Nil } }
#?endif
(T.^nativesize / 8).Int
} // 1;

multi method WHICH(Blob:D:) {
self.^name ~ '|' ~ nqp::sha1(self.decode("latin-1"))
Expand Down

0 comments on commit be6dc61

Please sign in to comment.