From c1d766171bae3cf460caaf4e59e04bac236739dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Thu, 24 Dec 2020 11:44:15 +0100 Subject: [PATCH] Add a few other RETURN_THROWS() --- ext/ffi/ffi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 620e4c6431..2ca1cad90d 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -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(); } } @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); -- 2.40.0