/* {{{ php_converter_default_callback */
static void php_converter_default_callback(zval *return_value, zval *zobj, zend_long reason, zval *error) {
- ZVAL_DEREF(error);
- zval_ptr_dtor(error);
- ZVAL_LONG(error, U_ZERO_ERROR);
/* Basic functionality so children can call parent::toUCallback() */
switch (reason) {
case UCNV_UNASSIGNED:
chars[0] = 0x1A;
chars[1] = 0;
chars_len = 1;
- ZVAL_LONG(error, U_INVALID_STATE_ERROR);
+ ZEND_TRY_ASSIGN_REF_LONG(error, U_INVALID_STATE_ERROR);
RETVAL_STRINGL(chars, chars_len);
return;
}
chars[0] = 0x1A;
chars[1] = 0;
chars_len = 1;
- ZVAL_LONG(error, uerror);
}
+ ZEND_TRY_ASSIGN_REF_LONG(error, uerror);
RETVAL_STRINGL(chars, chars_len);
}
}