trnext: do not goto into a branch
I'm not necessarily against every goto in general, but jumping into a branch is definitely a bad idea. Better refactor.
This commit is contained in:
parent
c7a4073154
commit
a5ae9aebbc
Notes:
git
2020-06-29 11:06:45 +09:00
2
string.c
2
string.c
@ -7119,8 +7119,8 @@ trnext(struct tr *t, rb_encoding *enc)
|
|||||||
int n;
|
int n;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
nextpart:
|
||||||
if (!t->gen) {
|
if (!t->gen) {
|
||||||
nextpart:
|
|
||||||
if (t->p == t->pend) return -1;
|
if (t->p == t->pend) return -1;
|
||||||
if (rb_enc_ascget(t->p, t->pend, &n, enc) == '\\' && t->p + n < t->pend) {
|
if (rb_enc_ascget(t->p, t->pend, &n, enc) == '\\' && t->p + n < t->pend) {
|
||||||
t->p += n;
|
t->p += n;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user