Skip to content

Commit

Permalink
Add a few other RETURN_THROWS()
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Dec 24, 2020
1 parent ed19cb6 commit c1d7661
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ext/ffi/ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3865,7 +3865,7 @@ ZEND_METHOD(FFI, cast) /* {{{ */
RETURN_OBJ(&cdata->std);
} else {
zend_wrong_parameter_class_error(2, "FFI\\CData", zv);
return;
RETURN_THROWS();
}
}

Expand Down Expand Up @@ -4006,7 +4006,7 @@ ZEND_METHOD(FFI, typeof) /* {{{ */
}
} else {
zend_wrong_parameter_class_error(1, "FFI\\CData", zv);
return;
RETURN_THROWS();
}

ctype = (zend_ffi_ctype*)zend_ffi_ctype_new(zend_ffi_ctype_ce);
Expand Down Expand Up @@ -4110,7 +4110,7 @@ ZEND_METHOD(FFI, addr) /* {{{ */
ZVAL_DEREF(zv);
if (Z_TYPE_P(zv) != IS_OBJECT || Z_OBJCE_P(zv) != zend_ffi_cdata_ce) {
zend_wrong_parameter_class_error(1, "FFI\\CData", zv);
return;
RETURN_THROWS();
}

cdata = (zend_ffi_cdata*)Z_OBJ_P(zv);
Expand Down Expand Up @@ -4246,7 +4246,7 @@ ZEND_METHOD(FFI, memcpy) /* {{{ */
}
} else {
zend_wrong_parameter_class_error(2, "FFI\\CData or string", zv2);
return;
RETURN_THROWS();
}

memcpy(ptr1, ptr2, size);
Expand Down Expand Up @@ -4290,7 +4290,7 @@ ZEND_METHOD(FFI, memcmp) /* {{{ */
}
} else {
zend_wrong_parameter_class_error(1, "FFI\\CData or string", zv1);
return;
RETURN_THROWS();
}

ZVAL_DEREF(zv2);
Expand All @@ -4314,7 +4314,7 @@ ZEND_METHOD(FFI, memcmp) /* {{{ */
}
} else {
zend_wrong_parameter_class_error(2, "FFI\\CData or string", zv2);
return;
RETURN_THROWS();
}

ret = memcmp(ptr1, ptr2, size);
Expand Down Expand Up @@ -4416,7 +4416,7 @@ ZEND_METHOD(FFI, isNull) /* {{{ */
ZVAL_DEREF(zv);
if (Z_TYPE_P(zv) != IS_OBJECT || Z_OBJCE_P(zv) != zend_ffi_cdata_ce) {
zend_wrong_parameter_class_error(1, "FFI\\CData", zv);
return;
RETURN_THROWS();
}

cdata = (zend_ffi_cdata*)Z_OBJ_P(zv);
Expand Down

0 comments on commit c1d7661

Please sign in to comment.