Skip to content
Myr

Allow C-coded functions to `empty`

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Just return a jv_invalid() without a message.

authored by Nicolas Williams · committed by Nicolas Williams · parent bbb287f · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:execute.c+5 added-1 removed
701 unmodified lines
702 }703 704 if (jv_is_valid(top)) {705 stack_push(jq, top);706 } else {706 } else if (jv_invalid_has_msg(jv_copy(top))) {707 set_error(jq, top);708 goto do_backtrack;709 } else {710 // C-coded function returns invalid w/o msg? -> backtrack, as if711 // it had returned `empty`712 goto do_backtrack;713 }714 break;715 }716
323 unmodified lines