X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fcall.c;h=a46fa4e325196c26edb2e06e9989facb81f5524d;hb=1124354f4666e9d10d9ad3acfa45fdba3b99cfc6;hp=22516c77cf7f2280d627fc6bffbd745f9b19868b;hpb=2559f07a178b681dc240e20153ff5abdff54cb34;p=m6w6%2Fext-psi diff --git a/src/call.c b/src/call.c index 22516c7..a46fa4e 100644 --- a/src/call.c +++ b/src/call.c @@ -23,14 +23,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ -#include "php_psi_stdinc.h" +#ifdef HAVE_CONFIG_H +# include "config.h" +#else +# include "php_config.h" +#endif #include "context.h" #include "data.h" #include "call.h" #include "php.h" #include "zend_exceptions.h" -#include "ext/spl/spl_exceptions.h" struct psi_call_frame_argument *psi_call_frame_argument_init(struct psi_impl_arg *spec, impl_val *ival, zval *zptr, int is_vararg) { @@ -199,7 +202,7 @@ zval *psi_call_frame_sub_argument(struct psi_call_frame *frame, if (!iarg) { struct psi_call_frame_argument *frame_arg; impl_val empty_val = {0}; - zend_string *type_str = zend_string_init_interned(ZEND_STRL("mixed"), 1); + zend_string *type_str = psi_string_init_interned(ZEND_STRL("mixed"), 1); struct psi_impl_arg *carg_spec = psi_impl_arg_init( psi_impl_type_init(PSI_T_MIXED, type_str), psi_impl_var_copy(inner_var), NULL); @@ -427,11 +430,7 @@ ZEND_RESULT_CODE psi_call_frame_do_assert(struct psi_call_frame *frame, enum psi while (psi_plist_get(frame->impl->stmts.ass, i++, &ass)) { if (ass->kind == kind) { if (!psi_assert_stmt_exec(ass, frame)) { - char *message = psi_assert_stmt_message(ass); - zend_throw_exception(kind == PSI_ASSERT_PRE - ? spl_ce_InvalidArgumentException - : spl_ce_UnexpectedValueException, message, 0); - free(message); + psi_assert_stmt_throw(ass); return FAILURE; } } @@ -477,6 +476,7 @@ void psi_call_frame_do_callback(struct psi_call_frame *frame, struct psi_call_fr rc = zend_fcall_info_call(&frame_arg->ival_ptr->zend.cb->fci, &frame_arg->ival_ptr->zend.cb->fcc, &return_value, NULL); assert(rc == SUCCESS); + (void) rc; /* marshal return value of the userland call */ frame_arg->zval_ptr = &return_value;