Lines Matching refs:objval

45 static inline void php_converter_throw_failure(php_converter_object *objval, UErrorCode error TSRML…  in php_converter_throw_failure()  argument
46 intl_error *err = objval ? &(objval->error) : NULL; in php_converter_throw_failure()
68 php_converter_object *objval = (php_converter_object*)CONV_GET(zobj); in php_converter_default_callback() local
72 if(!objval->src) { in php_converter_default_callback()
73 …php_converter_throw_failure(objval, U_INVALID_STATE_ERROR TSRMLS_CC, "Source Converter has not bee… in php_converter_default_callback()
89 ucnv_getSubstChars(objval->src, chars, &chars_len, &uerror); in php_converter_default_callback()
91 THROW_UFAILURE(objval, "ucnv_getSubstChars", uerror); in php_converter_default_callback()
148 static inline zend_bool php_converter_check_limits(php_converter_object *objval, long available, lo… in php_converter_check_limits() argument
150 …php_converter_throw_failure(objval, U_BUFFER_OVERFLOW_ERROR TSRMLS_CC, "Buffer overrun %ld bytes n… in php_converter_check_limits()
157 #define TARGET_CHECK(cnvargs, needed) php_converter_check_limits(objval, cnvargs->targetLimit - cnv…
160 …oUnicode_target(zval *val, UConverterToUnicodeArgs *args, php_converter_object *objval TSRMLS_DC) { in php_converter_append_toUnicode_target()
169 …php_converter_throw_failure(objval, U_ILLEGAL_ARGUMENT_ERROR TSRMLS_CC, "Invalid codepoint U+%04lx… in php_converter_append_toUnicode_target()
208 php_converter_append_toUnicode_target(*tmpzval, args, objval TSRMLS_CC); in php_converter_append_toUnicode_target()
213 php_converter_throw_failure(objval, U_ILLEGAL_ARGUMENT_ERROR TSRMLS_CC, in php_converter_append_toUnicode_target()
225 php_converter_object *objval = (php_converter_object*)context; in php_converter_to_u_callback() local
229 TSRMLS_D = objval->tsrm_ls; in php_converter_to_u_callback()
248 objval->to_cb.param_count = 4; in php_converter_to_u_callback()
249 objval->to_cb.params = zargs; in php_converter_to_u_callback()
250 objval->to_cb.retval_ptr_ptr = &retval; in php_converter_to_u_callback()
251 objval->to_cb.no_separation = 0; in php_converter_to_u_callback()
252 if (zend_call_function(&(objval->to_cb), &(objval->to_cache) TSRMLS_CC) == FAILURE) { in php_converter_to_u_callback()
254 …php_converter_throw_failure(objval, U_INTERNAL_PROGRAM_ERROR TSRMLS_CC, "Unexpected failure callin… in php_converter_to_u_callback()
256 php_converter_append_toUnicode_target(retval, args, objval TSRMLS_CC); in php_converter_to_u_callback()
272 …nicode_target(zval *val, UConverterFromUnicodeArgs *args, php_converter_object *objval TSRMLS_DC) { in php_converter_append_fromUnicode_target()
299 php_converter_append_fromUnicode_target(*tmpzval, args, objval TSRMLS_CC); in php_converter_append_fromUnicode_target()
304 …php_converter_throw_failure(objval, U_ILLEGAL_ARGUMENT_ERROR TSRMLS_CC, "fromUCallback() specified… in php_converter_append_fromUnicode_target()
315 php_converter_object *objval = (php_converter_object*)context; in php_converter_from_u_callback() local
320 TSRMLS_D = objval->tsrm_ls; in php_converter_from_u_callback()
345 objval->from_cb.param_count = 4; in php_converter_from_u_callback()
346 objval->from_cb.params = zargs; in php_converter_from_u_callback()
347 objval->from_cb.retval_ptr_ptr = &retval; in php_converter_from_u_callback()
348 objval->from_cb.no_separation = 0; in php_converter_from_u_callback()
349 if (zend_call_function(&(objval->from_cb), &(objval->from_cache) TSRMLS_CC) == FAILURE) { in php_converter_from_u_callback()
351 …php_converter_throw_failure(objval, U_INTERNAL_PROGRAM_ERROR TSRMLS_CC, "Unexpected failure callin… in php_converter_from_u_callback()
353 php_converter_append_fromUnicode_target(retval, args, objval TSRMLS_CC); in php_converter_from_u_callback()
369 static inline zend_bool php_converter_set_callbacks(php_converter_object *objval, UConverter *cnv T… in php_converter_set_callbacks() argument
373 if (objval->obj.ce == php_converter_ce) { in php_converter_set_callbacks()
380 ucnv_setToUCallBack(cnv, (UConverterToUCallback)php_converter_to_u_callback, (const void*)objval, in php_converter_set_callbacks()
383 THROW_UFAILURE(objval, "ucnv_setToUCallBack", error); in php_converter_set_callbacks()
388 …_setFromUCallBack(cnv, (UConverterFromUCallback)php_converter_from_u_callback, (const void*)objval, in php_converter_set_callbacks()
391 THROW_UFAILURE(objval, "ucnv_setFromUCallBack", error); in php_converter_set_callbacks()
399 static zend_bool php_converter_set_encoding(php_converter_object *objval, in php_converter_set_encoding() argument
415 if (objval) { in php_converter_set_encoding()
416 THROW_UFAILURE(objval, "ucnv_open", error); in php_converter_set_encoding()
423 if (objval && !php_converter_set_callbacks(objval, cnv TSRMLS_CC)) { in php_converter_set_encoding()
440 php_converter_object *objval = CONV_GET(getThis()); in php_converter_do_set_encoding() local
449 intl_errors_reset(&objval->error TSRMLS_CC); in php_converter_do_set_encoding()
451 RETURN_BOOL(php_converter_set_encoding(objval, &(objval->src), enc, enc_len TSRMLS_CC)); in php_converter_do_set_encoding()
457 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
458 php_converter_do_set_encoding(objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
464 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
465 php_converter_do_set_encoding(objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
472 static void php_converter_do_get_encoding(php_converter_object *objval, UConverter *cnv, INTERNAL_F… in php_converter_do_get_encoding() argument
480 intl_errors_reset(&objval->error TSRMLS_CC); in php_converter_do_get_encoding()
486 name = ucnv_getName(cnv, &objval->error.code); in php_converter_do_get_encoding()
487 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_encoding()
488 THROW_UFAILURE(objval, "ucnv_getName()", objval->error.code); in php_converter_do_get_encoding()
498 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
499 php_converter_do_get_encoding(objval, objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
505 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
506 php_converter_do_get_encoding(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
513 static void php_converter_do_get_type(php_converter_object *objval, UConverter *cnv, INTERNAL_FUNCT… in php_converter_do_get_type() argument
520 intl_errors_reset(&objval->error TSRMLS_CC); in php_converter_do_get_type()
527 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_type()
528 THROW_UFAILURE(objval, "ucnv_getType", objval->error.code); in php_converter_do_get_type()
538 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
539 php_converter_do_get_type(objval, objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
545 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
546 php_converter_do_get_type(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
552 php_converter_object *objval, in php_converter_resolve_callback() argument
564 …php_converter_throw_failure(objval, U_INTERNAL_PROGRAM_ERROR TSRMLS_CC, "Error setting converter c… in php_converter_resolve_callback()
580 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
595 php_converter_set_encoding(objval, &(objval->src), src, src_len TSRMLS_CC); in PHP_METHOD()
596 php_converter_set_encoding(objval, &(objval->dest), dest, dest_len TSRMLS_CC); in PHP_METHOD()
597 …php_converter_resolve_callback(getThis(), objval, "toUCallback", &(objval->to_cb), &(objval->t… in PHP_METHOD()
598 …php_converter_resolve_callback(getThis(), objval, "fromUCallback", &(objval->from_cb), &(objval->f… in PHP_METHOD()
608 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
617 intl_errors_reset(&objval->error TSRMLS_CC); in PHP_METHOD()
619 if (objval->src) { in PHP_METHOD()
621 ucnv_setSubstChars(objval->src, chars, chars_len, &error); in PHP_METHOD()
623 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
627 …php_converter_throw_failure(objval, U_INVALID_STATE_ERROR TSRMLS_CC, "Source Converter has not bee… in PHP_METHOD()
631 if (objval->dest) { in PHP_METHOD()
633 ucnv_setSubstChars(objval->dest, chars, chars_len, &error); in PHP_METHOD()
635 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
639 …php_converter_throw_failure(objval, U_INVALID_STATE_ERROR TSRMLS_CC, "Destination Converter has no… in PHP_METHOD()
652 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
662 intl_errors_reset(&objval->error TSRMLS_CC); in PHP_METHOD()
664 if (!objval->src) { in PHP_METHOD()
671 ucnv_getSubstChars(objval->src, chars, &chars_len, &error); in PHP_METHOD()
673 THROW_UFAILURE(objval, "ucnv_getSubstChars", error); in PHP_METHOD()
684 php_converter_object *objval in php_converter_do_convert()
693 php_converter_throw_failure(objval, U_INVALID_STATE_ERROR TSRMLS_CC, in php_converter_do_convert()
701 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
710 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
719 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
730 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
780 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
791 intl_errors_reset(&objval->error TSRMLS_CC); in PHP_METHOD()
793 if (php_converter_do_convert(reverse ? objval->src : objval->dest, in PHP_METHOD()
795 reverse ? objval->dest : objval->src, in PHP_METHOD()
797 objval TSRMLS_CC)) { in PHP_METHOD()
876 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
884 RETURN_LONG(intl_error_get_code(&(objval->error) TSRMLS_CC)); in PHP_METHOD()
892 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
893 char *message = intl_error_get_message(&(objval->error) TSRMLS_CC); in PHP_METHOD()
1036 static void php_converter_free_object(php_converter_object *objval TSRMLS_DC) { in php_converter_free_object()
1037 if (objval->src) { in php_converter_free_object()
1038 ucnv_close(objval->src); in php_converter_free_object()
1041 if (objval->dest) { in php_converter_free_object()
1042 ucnv_close(objval->dest); in php_converter_free_object()
1045 intl_error_reset(&(objval->error) TSRMLS_CC); in php_converter_free_object()
1046 zend_object_std_dtor(&(objval->obj) TSRMLS_CC); in php_converter_free_object()
1048 efree(objval); in php_converter_free_object()
1052 php_converter_object *objval; in php_converter_object_ctor() local
1055 objval = ecalloc(1, sizeof(php_converter_object)); in php_converter_object_ctor()
1056 objval->obj.ce = ce; in php_converter_object_ctor()
1059 objval->tsrm_ls = TSRMLS_C; in php_converter_object_ctor()
1061 intl_error_init(&(objval->error) TSRMLS_CC); in php_converter_object_ctor()
1063 …retval.handle = zend_objects_store_put(objval, NULL, (zend_objects_free_object_storage_t)php_conve… in php_converter_object_ctor()
1065 *pobjval = objval; in php_converter_object_ctor()
1071 php_converter_object *objval = NULL; in php_converter_create_object() local
1072 zend_object_value retval = php_converter_object_ctor(ce, &objval TSRMLS_CC); in php_converter_create_object()
1074 object_properties_init(&(objval->obj), ce); in php_converter_create_object()
1080 …php_converter_object *objval, *oldobj = (php_converter_object*)zend_objects_get_address(object TSR… in php_converter_clone_object() local
1081 zend_object_value retval = php_converter_object_ctor(Z_OBJCE_P(object), &objval TSRMLS_CC); in php_converter_clone_object()
1086 objval->src = ucnv_safeClone(oldobj->src, NULL, NULL, &error); in php_converter_clone_object()
1089 objval->dest = ucnv_safeClone(oldobj->dest, NULL, NULL, &error); in php_converter_clone_object()
1103 php_converter_set_callbacks(objval, objval->src TSRMLS_CC); in php_converter_clone_object()
1104 php_converter_set_callbacks(objval, objval->dest TSRMLS_CC); in php_converter_clone_object()
1106 …zend_objects_clone_members(&(objval->obj), retval, &(oldobj->obj), Z_OBJ_HANDLE_P(object) TSRMLS_C… in php_converter_clone_object()