Skip to content

Commit

Permalink
teach string_char_at_in_string about in_situ
Browse files Browse the repository at this point in the history
  • Loading branch information
timo authored and bdw committed Jul 6, 2018
1 parent fce9f2f commit 58a07f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/strings/ops.c
Expand Up @@ -2127,6 +2127,14 @@ MVMint64 MVM_string_char_at_in_string(MVMThreadContext *tc, MVMString *a, MVMint
return i;
}
break;
case MVM_STRING_IN_SITU:
if (can_fit_into_8bit(search)) {
MVMStringIndex i;
for (i = 0; i < bgraphs; i++)
if (b->body.storage.in_situ[i] == search)
return i;
}
break;
case MVM_STRING_STRAND: {
MVMGraphemeIter gi;
MVMStringIndex i;
Expand Down

0 comments on commit 58a07f9

Please sign in to comment.