Skip to content

Commit 5f95cda

Browse files
committed
Try to fix com build
1 parent fbf46fa commit 5f95cda

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

ext/com_dotnet/com_com.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ int php_com_do_invoke_byref(php_com_dotnet_object *obj, zend_internal_function *
498498

499499
if (f->arg_info) {
500500
for (i = 0; i < nargs; i++) {
501-
if (f->arg_info[nargs - i - 1].pass_by_reference) {
501+
if (ZEND_ARG_SEND_MODE(&f->arg_info[nargs - i - 1])) {
502502
byref_count++;
503503
}
504504
}
@@ -507,7 +507,7 @@ int php_com_do_invoke_byref(php_com_dotnet_object *obj, zend_internal_function *
507507
if (byref_count) {
508508
byref_vals = (VARIANT*)safe_emalloc(sizeof(VARIANT), byref_count, 0);
509509
for (j = 0, i = 0; i < nargs; i++) {
510-
if (f->arg_info[nargs - i - 1].pass_by_reference) {
510+
if (ZEND_ARG_SEND_MODE(&f->arg_info[nargs - i - 1])) {
511511
/* put the value into byref_vals instead */
512512
php_com_variant_from_zval(&byref_vals[j], &args[nargs - i - 1], obj->code_page);
513513

@@ -554,7 +554,7 @@ int php_com_do_invoke_byref(php_com_dotnet_object *obj, zend_internal_function *
554554
if (f && f->arg_info) {
555555
for (i = 0, j = 0; i < nargs; i++) {
556556
/* if this was byref, update the zval */
557-
if (f->arg_info[nargs - i - 1].pass_by_reference) {
557+
if (ZEND_ARG_SEND_MODE(&f->arg_info[nargs - i - 1])) {
558558
zval *arg = &args[nargs - i - 1];
559559

560560
ZVAL_DEREF(arg);

ext/com_dotnet/com_handlers.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,8 @@ static zend_function *com_method_get(zend_object **object_ptr, zend_string *name
319319
f.arg_info = ecalloc(bindptr.lpfuncdesc->cParams, sizeof(zend_arg_info));
320320

321321
for (i = 0; i < bindptr.lpfuncdesc->cParams; i++) {
322-
f.arg_info[i].type = (zend_type) ZEND_TYPE_INIT_NONE();
323-
if (bindptr.lpfuncdesc->lprgelemdescParam[i].paramdesc.wParamFlags & PARAMFLAG_FOUT) {
324-
f.arg_info[i].pass_by_reference = ZEND_SEND_BY_REF;
325-
}
322+
zend_bool by_ref = (bindptr.lpfuncdesc->lprgelemdescParam[i].paramdesc.wParamFlags & PARAMFLAG_FOUT) != 0;
323+
f.arg_info[i].type = (zend_type) ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(by_ref, 0));
326324
}
327325

328326
f.num_args = bindptr.lpfuncdesc->cParams;

0 commit comments

Comments
 (0)