Lines Matching refs:objval
49 static inline void php_converter_throw_failure(php_converter_object *objval, UErrorCode error, cons… in php_converter_throw_failure() argument
50 intl_error *err = objval ? &(objval->error) : NULL; in php_converter_throw_failure()
73 php_converter_object *objval = (php_converter_object*)CONV_GET(zobj); in php_converter_default_callback() local
77 if(!objval->src) { in php_converter_default_callback()
78 …php_converter_throw_failure(objval, U_INVALID_STATE_ERROR, "Source Converter has not been initiali… in php_converter_default_callback()
94 ucnv_getSubstChars(objval->src, chars, &chars_len, &uerror); in php_converter_default_callback()
96 THROW_UFAILURE(objval, "ucnv_getSubstChars", uerror); in php_converter_default_callback()
153 static inline zend_bool php_converter_check_limits(php_converter_object *objval, zend_long availabl… in php_converter_check_limits() argument
155 …php_converter_throw_failure(objval, U_BUFFER_OVERFLOW_ERROR, "Buffer overrun %pd bytes needed, %pd… in php_converter_check_limits()
162 #define TARGET_CHECK(cnvargs, needed) php_converter_check_limits(objval, cnvargs->targetLimit - cnv…
165 …r_append_toUnicode_target(zval *val, UConverterToUnicodeArgs *args, php_converter_object *objval) { in php_converter_append_toUnicode_target() argument
174 … php_converter_throw_failure(objval, U_ILLEGAL_ARGUMENT_ERROR, "Invalid codepoint U+%04lx", lval); in php_converter_append_toUnicode_target()
210 php_converter_append_toUnicode_target(tmpzval, args, objval); in php_converter_append_toUnicode_target()
215 php_converter_throw_failure(objval, U_ILLEGAL_ARGUMENT_ERROR, in php_converter_append_toUnicode_target()
227 php_converter_object *objval = (php_converter_object*)context; in php_converter_to_u_callback() local
236 objval->to_cb.param_count = 4; in php_converter_to_u_callback()
237 objval->to_cb.params = zargs; in php_converter_to_u_callback()
238 objval->to_cb.retval = &retval; in php_converter_to_u_callback()
239 objval->to_cb.no_separation = 0; in php_converter_to_u_callback()
240 if (zend_call_function(&(objval->to_cb), &(objval->to_cache)) == FAILURE) { in php_converter_to_u_callback()
242 …php_converter_throw_failure(objval, U_INTERNAL_PROGRAM_ERROR, "Unexpected failure calling toUCallb… in php_converter_to_u_callback()
244 php_converter_append_toUnicode_target(&retval, args, objval); in php_converter_to_u_callback()
262 …pend_fromUnicode_target(zval *val, UConverterFromUnicodeArgs *args, php_converter_object *objval) { in php_converter_append_fromUnicode_target() argument
286 php_converter_append_fromUnicode_target(tmpzval, args, objval); in php_converter_append_fromUnicode_target()
291 …php_converter_throw_failure(objval, U_ILLEGAL_ARGUMENT_ERROR, "fromUCallback() specified illegal t… in php_converter_append_fromUnicode_target()
302 php_converter_object *objval = (php_converter_object*)context; in php_converter_from_u_callback() local
318 objval->from_cb.param_count = 4; in php_converter_from_u_callback()
319 objval->from_cb.params = zargs; in php_converter_from_u_callback()
320 objval->from_cb.retval = &retval; in php_converter_from_u_callback()
321 objval->from_cb.no_separation = 0; in php_converter_from_u_callback()
322 if (zend_call_function(&(objval->from_cb), &(objval->from_cache)) == FAILURE) { in php_converter_from_u_callback()
324 …php_converter_throw_failure(objval, U_INTERNAL_PROGRAM_ERROR, "Unexpected failure calling fromUCal… in php_converter_from_u_callback()
326 php_converter_append_fromUnicode_target(&retval, args, objval); in php_converter_from_u_callback()
344 static inline zend_bool php_converter_set_callbacks(php_converter_object *objval, UConverter *cnv) { in php_converter_set_callbacks() argument
348 if (objval->obj.ce == php_converter_ce) { in php_converter_set_callbacks()
355 ucnv_setToUCallBack(cnv, (UConverterToUCallback)php_converter_to_u_callback, (const void*)objval, in php_converter_set_callbacks()
358 THROW_UFAILURE(objval, "ucnv_setToUCallBack", error); in php_converter_set_callbacks()
363 …_setFromUCallBack(cnv, (UConverterFromUCallback)php_converter_from_u_callback, (const void*)objval, in php_converter_set_callbacks()
366 THROW_UFAILURE(objval, "ucnv_setFromUCallBack", error); in php_converter_set_callbacks()
374 static zend_bool php_converter_set_encoding(php_converter_object *objval, in php_converter_set_encoding() argument
390 if (objval) { in php_converter_set_encoding()
391 THROW_UFAILURE(objval, "ucnv_open", error); in php_converter_set_encoding()
398 if (objval && !php_converter_set_callbacks(objval, cnv)) { in php_converter_set_encoding()
415 php_converter_object *objval = CONV_GET(getThis()); in php_converter_do_set_encoding() local
424 intl_errors_reset(&objval->error); in php_converter_do_set_encoding()
426 RETURN_BOOL(php_converter_set_encoding(objval, pcnv, enc, enc_len)); in php_converter_do_set_encoding()
432 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
433 php_converter_do_set_encoding(&(objval->src), INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
439 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
440 php_converter_do_set_encoding(&(objval->dest), INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
447 static void php_converter_do_get_encoding(php_converter_object *objval, UConverter *cnv, INTERNAL_F… in php_converter_do_get_encoding() argument
455 intl_errors_reset(&objval->error); in php_converter_do_get_encoding()
461 name = ucnv_getName(cnv, &objval->error.code); in php_converter_do_get_encoding()
462 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_encoding()
463 THROW_UFAILURE(objval, "ucnv_getName()", objval->error.code); in php_converter_do_get_encoding()
473 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
474 php_converter_do_get_encoding(objval, objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
480 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
481 php_converter_do_get_encoding(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
488 static void php_converter_do_get_type(php_converter_object *objval, UConverter *cnv, INTERNAL_FUNCT… in php_converter_do_get_type() argument
495 intl_errors_reset(&objval->error); in php_converter_do_get_type()
502 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_type()
503 THROW_UFAILURE(objval, "ucnv_getType", objval->error.code); in php_converter_do_get_type()
513 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
514 php_converter_do_get_type(objval, objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
520 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
521 php_converter_do_get_type(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
527 php_converter_object *objval, in php_converter_resolve_callback() argument
539 …php_converter_throw_failure(objval, U_INTERNAL_PROGRAM_ERROR, "Error setting converter callback: %… in php_converter_resolve_callback()
555 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
567 php_converter_set_encoding(objval, &(objval->src), src, src_len ); in PHP_METHOD()
568 php_converter_set_encoding(objval, &(objval->dest), dest, dest_len); in PHP_METHOD()
569 …php_converter_resolve_callback(getThis(), objval, "toUCallback", &(objval->to_cb), &(objval->t… in PHP_METHOD()
570 …php_converter_resolve_callback(getThis(), objval, "fromUCallback", &(objval->from_cb), &(objval->f… in PHP_METHOD()
580 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
590 intl_errors_reset(&objval->error); in PHP_METHOD()
592 if (objval->src) { in PHP_METHOD()
594 ucnv_setSubstChars(objval->src, chars, chars_len, &error); in PHP_METHOD()
596 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
600 …php_converter_throw_failure(objval, U_INVALID_STATE_ERROR, "Source Converter has not been initiali… in PHP_METHOD()
604 if (objval->dest) { in PHP_METHOD()
606 ucnv_setSubstChars(objval->dest, chars, chars_len, &error); in PHP_METHOD()
608 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
612 …php_converter_throw_failure(objval, U_INVALID_STATE_ERROR, "Destination Converter has not been ini… in PHP_METHOD()
625 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
635 intl_errors_reset(&objval->error); in PHP_METHOD()
637 if (!objval->src) { in PHP_METHOD()
644 ucnv_getSubstChars(objval->src, chars, &chars_len, &error); in PHP_METHOD()
646 THROW_UFAILURE(objval, "ucnv_getSubstChars", error); in PHP_METHOD()
657 php_converter_object *objval in php_converter_do_convert() argument
665 php_converter_throw_failure(objval, U_INVALID_STATE_ERROR, in php_converter_do_convert()
673 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
682 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
691 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
703 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
748 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
760 intl_errors_reset(&objval->error); in PHP_METHOD()
762 ret = php_converter_do_convert(reverse ? objval->src : objval->dest, in PHP_METHOD()
763 reverse ? objval->dest : objval->src, in PHP_METHOD()
765 objval); in PHP_METHOD()
844 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
852 RETURN_LONG(intl_error_get_code(&(objval->error))); in PHP_METHOD()
860 php_converter_object *objval = CONV_GET(getThis()); in PHP_METHOD() local
861 zend_string *message = intl_error_get_message(&(objval->error)); in PHP_METHOD()
1005 php_converter_object *objval = php_converter_fetch_object(obj); in php_converter_dtor_object() local
1007 if (objval->src) { in php_converter_dtor_object()
1008 ucnv_close(objval->src); in php_converter_dtor_object()
1011 if (objval->dest) { in php_converter_dtor_object()
1012 ucnv_close(objval->dest); in php_converter_dtor_object()
1015 intl_error_reset(&(objval->error)); in php_converter_dtor_object()
1019 php_converter_object *objval; in php_converter_object_ctor() local
1021 objval = ecalloc(1, sizeof(php_converter_object) + zend_object_properties_size(ce)); in php_converter_object_ctor()
1023 zend_object_std_init(&objval->obj, ce ); in php_converter_object_ctor()
1024 intl_error_init(&(objval->error)); in php_converter_object_ctor()
1026 objval->obj.handlers = &php_converter_object_handlers; in php_converter_object_ctor()
1027 *pobjval = objval; in php_converter_object_ctor()
1029 return &objval->obj; in php_converter_object_ctor()
1033 php_converter_object *objval = NULL; in php_converter_create_object() local
1034 zend_object *retval = php_converter_object_ctor(ce, &objval); in php_converter_create_object()
1036 object_properties_init(&(objval->obj), ce); in php_converter_create_object()
1042 php_converter_object *objval, *oldobj = Z_INTL_CONVERTER_P(object); in php_converter_clone_object() local
1043 zend_object *retval = php_converter_object_ctor(Z_OBJCE_P(object), &objval); in php_converter_clone_object()
1048 objval->src = ucnv_safeClone(oldobj->src, NULL, NULL, &error); in php_converter_clone_object()
1051 objval->dest = ucnv_safeClone(oldobj->dest, NULL, NULL, &error); in php_converter_clone_object()
1065 php_converter_set_callbacks(objval, objval->src ); in php_converter_clone_object()
1066 php_converter_set_callbacks(objval, objval->dest); in php_converter_clone_object()
1068 zend_objects_clone_members(&(objval->obj), &(oldobj->obj)); in php_converter_clone_object()