Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
ohler55 committed Aug 7, 2024
1 parent eee4e4e commit 1c8ba7e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions ext/oj/usual.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ static void close_object(ojParser p) {
d->vtail = head;
head--;
*head = obj;
if (1 == d->vtail - d->vhead && rb_block_given_p()) {
d->vtail = d->vhead;
rb_yield(obj);
}
if (1 == d->vtail - d->vhead && rb_block_given_p()) {
d->vtail = d->vhead;
rb_yield(obj);
}
}

static void close_object_class(ojParser p) {
Expand Down Expand Up @@ -577,17 +577,17 @@ static VALUE result(ojParser p) {
Usual d = (Usual)p->ctx;

if (d->vhead < d->vtail) {
long cnt = d->vtail - d->vhead;
volatile VALUE ary;
volatile VALUE *vp;

if (1 == cnt) {
return *d->vhead;
}
ary = rb_ary_new();
for (vp = d->vhead; vp < d->vtail; vp++) {
rb_ary_push(ary, *vp);
}
long cnt = d->vtail - d->vhead;
volatile VALUE ary;
volatile VALUE *vp;

if (1 == cnt) {
return *d->vhead;
}
ary = rb_ary_new();
for (vp = d->vhead; vp < d->vtail; vp++) {
rb_ary_push(ary, *vp);
}
return ary;
}
if (d->raise_on_empty) {
Expand Down

0 comments on commit 1c8ba7e

Please sign in to comment.