Skip to content

Commit 3f8327b

Browse files
committed
[checkout] make payload as ref
1 parent 05e05c3 commit 3f8327b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

helper.c

+2
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ void php_git2_git_checkout_progress_cb(const char *path,
351351
php_git2_cb_t *p = (php_git2_cb_t*)payload;
352352
GIT2_TSRMLS_SET(p->tsrm_ls);
353353

354+
Z_ADDREF_P(p->payload);
354355
MAKE_STD_ZVAL(param_path);
355356
MAKE_STD_ZVAL(param_completed_steps);
356357
MAKE_STD_ZVAL(param_total_steps);
@@ -361,6 +362,7 @@ void php_git2_git_checkout_progress_cb(const char *path,
361362
ZVAL_LONG(param_completed_steps, completed_steps);
362363
ZVAL_LONG(param_total_steps, total_steps);
363364

365+
SEPARATE_ZVAL_TO_MAKE_IS_REF(&p->payload);
364366
if (php_git2_call_function_v(p->fci, p->fcc TSRMLS_CC, &retval_ptr, 4, &param_path, &param_completed_steps, &param_total_steps, &p->payload)) {
365367
return;
366368
}

0 commit comments

Comments
 (0)