Skip to content

Commit aab4d7a

Browse files
committed
COMMON: update eval for performance
1 parent 65ba6bf commit aab4d7a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/common/blib_func.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,6 +2575,7 @@ void cmd_genfunc(long funcCode, var_t *r) {
25752575
// no 'break' here
25762576
default:
25772577
// default --- expression
2578+
v_init(&arg);
25782579
eval(&arg);
25792580
if (!prog_error) {
25802581
if (first) {
@@ -2594,9 +2595,9 @@ void cmd_genfunc(long funcCode, var_t *r) {
25942595
} while (!ready);
25952596

25962597
// final
2597-
if (!prog_error)
2598+
if (!prog_error) {
25982599
dar_final(funcCode, r, tcount);
2599-
2600+
}
26002601
break;
26012602
//
26022603
//
@@ -2647,6 +2648,7 @@ void cmd_genfunc(long funcCode, var_t *r) {
26472648
// no 'break' here
26482649
default:
26492650
// default --- expression
2651+
v_init(&arg);
26502652
eval(&arg);
26512653
if (!prog_error) {
26522654
if (tcount >= len) {

0 commit comments

Comments
 (0)