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()
70 php_converter_object *objval = (php_converter_object*)CONV_GET(zobj); in php_converter_default_callback() local
74 if(!objval->src) { in php_converter_default_callback()
75 …php_converter_throw_failure(objval, U_INVALID_STATE_ERROR, "Source Converter has not been initiali… in php_converter_default_callback()
91 ucnv_getSubstChars(objval->src, chars, &chars_len, &uerror); in php_converter_default_callback()
93 THROW_UFAILURE(objval, "ucnv_getSubstChars", uerror); in php_converter_default_callback()
140 static inline bool php_converter_check_limits(php_converter_object *objval, zend_long available, ze… in php_converter_check_limits() argument
142 …php_converter_throw_failure(objval, U_BUFFER_OVERFLOW_ERROR, "Buffer overrun " ZEND_LONG_FMT " byt… in php_converter_check_limits()
149 #define TARGET_CHECK(cnvargs, needed) php_converter_check_limits(objval, cnvargs->targetLimit - cnv…
152 …r_append_toUnicode_target(zval *val, UConverterToUnicodeArgs *args, php_converter_object *objval) { in php_converter_append_toUnicode_target() argument
161 … php_converter_throw_failure(objval, U_ILLEGAL_ARGUMENT_ERROR, "Invalid codepoint U+%04lx", lval); in php_converter_append_toUnicode_target()
197 php_converter_append_toUnicode_target(tmpzval, args, objval); in php_converter_append_toUnicode_target()
202 php_converter_throw_failure(objval, U_ILLEGAL_ARGUMENT_ERROR, in php_converter_append_toUnicode_target()
214 php_converter_object *objval = (php_converter_object*)context; in php_converter_to_u_callback() local
232 zend_call_known_fcc(&objval->to_cache, &retval, 4, zargs, NULL); in php_converter_to_u_callback()
235 php_converter_append_toUnicode_target(&retval, args, objval); in php_converter_to_u_callback()
253 …pend_fromUnicode_target(zval *val, UConverterFromUnicodeArgs *args, php_converter_object *objval) { in php_converter_append_fromUnicode_target() argument
276 php_converter_append_fromUnicode_target(tmpzval, args, objval); in php_converter_append_fromUnicode_target()
281 …php_converter_throw_failure(objval, U_ILLEGAL_ARGUMENT_ERROR, "fromUCallback() specified illegal t… in php_converter_append_fromUnicode_target()
292 php_converter_object *objval = (php_converter_object*)context; in php_converter_from_u_callback() local
308 zend_call_known_fcc(&objval->from_cache, &retval, 4, zargs, NULL); in php_converter_from_u_callback()
311 php_converter_append_fromUnicode_target(&retval, args, objval); in php_converter_from_u_callback()
329 static inline bool php_converter_set_callbacks(php_converter_object *objval, UConverter *cnv) { in php_converter_set_callbacks() argument
333 if (objval->obj.ce == php_converter_ce) { in php_converter_set_callbacks()
340 ucnv_setToUCallBack(cnv, (UConverterToUCallback)php_converter_to_u_callback, (const void*)objval, in php_converter_set_callbacks()
343 THROW_UFAILURE(objval, "ucnv_setToUCallBack", error); in php_converter_set_callbacks()
348 …_setFromUCallBack(cnv, (UConverterFromUCallback)php_converter_from_u_callback, (const void*)objval, in php_converter_set_callbacks()
351 THROW_UFAILURE(objval, "ucnv_setFromUCallBack", error); in php_converter_set_callbacks()
359 static bool php_converter_set_encoding(php_converter_object *objval, in php_converter_set_encoding() argument
374 if (objval) { in php_converter_set_encoding()
375 THROW_UFAILURE(objval, "ucnv_open", error); in php_converter_set_encoding()
382 if (objval && !php_converter_set_callbacks(objval, cnv)) { in php_converter_set_encoding()
396 php_converter_object *objval = CONV_GET(ZEND_THIS); in php_converter_do_set_encoding() local
404 intl_errors_reset(&objval->error); in php_converter_do_set_encoding()
406 RETURN_BOOL(php_converter_set_encoding(objval, pcnv, enc, enc_len)); in php_converter_do_set_encoding()
412 php_converter_object *objval = CONV_GET(ZEND_THIS); in PHP_METHOD() local
413 php_converter_do_set_encoding(&(objval->src), INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
419 php_converter_object *objval = CONV_GET(ZEND_THIS); in PHP_METHOD() local
420 php_converter_do_set_encoding(&(objval->dest), INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
425 static void php_converter_do_get_encoding(php_converter_object *objval, UConverter *cnv, INTERNAL_F… in php_converter_do_get_encoding() argument
430 intl_errors_reset(&objval->error); in php_converter_do_get_encoding()
436 name = ucnv_getName(cnv, &objval->error.code); in php_converter_do_get_encoding()
437 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_encoding()
438 THROW_UFAILURE(objval, "ucnv_getName()", objval->error.code); in php_converter_do_get_encoding()
448 php_converter_object *objval = CONV_GET(ZEND_THIS); in PHP_METHOD() local
449 php_converter_do_get_encoding(objval, objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
455 php_converter_object *objval = CONV_GET(ZEND_THIS); in PHP_METHOD() local
456 php_converter_do_get_encoding(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
461 static void php_converter_do_get_type(php_converter_object *objval, UConverter *cnv, INTERNAL_FUNCT… in php_converter_do_get_type() argument
465 intl_errors_reset(&objval->error); in php_converter_do_get_type()
472 if (U_FAILURE(objval->error.code)) { in php_converter_do_get_type()
473 THROW_UFAILURE(objval, "ucnv_getType", objval->error.code); in php_converter_do_get_type()
483 php_converter_object *objval = CONV_GET(ZEND_THIS); in PHP_METHOD() local
484 php_converter_do_get_type(objval, objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
490 php_converter_object *objval = CONV_GET(ZEND_THIS); in PHP_METHOD() local
491 php_converter_do_get_type(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU); in PHP_METHOD()
515 php_converter_object *objval = CONV_GET(ZEND_THIS); in PHP_METHOD() local
529 php_converter_set_encoding(objval, &(objval->src), src, src_len ); in PHP_METHOD()
530 php_converter_set_encoding(objval, &(objval->dest), dest, dest_len); in PHP_METHOD()
531 php_converter_resolve_callback(&objval->to_cache, Z_OBJ_P(ZEND_THIS), ZEND_STRL("toUCallback")); in PHP_METHOD()
532 …php_converter_resolve_callback(&objval->from_cache, Z_OBJ_P(ZEND_THIS), ZEND_STRL("fromUCallback")… in PHP_METHOD()
538 php_converter_object *objval = CONV_GET(ZEND_THIS); in PHP_METHOD() local
547 intl_errors_reset(&objval->error); in PHP_METHOD()
549 if (objval->src) { in PHP_METHOD()
551 ucnv_setSubstChars(objval->src, chars, chars_len, &error); in PHP_METHOD()
553 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
557 …php_converter_throw_failure(objval, U_INVALID_STATE_ERROR, "Source Converter has not been initiali… in PHP_METHOD()
561 if (objval->dest) { in PHP_METHOD()
563 ucnv_setSubstChars(objval->dest, chars, chars_len, &error); in PHP_METHOD()
565 THROW_UFAILURE(objval, "ucnv_setSubstChars", error); in PHP_METHOD()
569 …php_converter_throw_failure(objval, U_INVALID_STATE_ERROR, "Destination Converter has not been ini… in PHP_METHOD()
579 php_converter_object *objval = CONV_GET(ZEND_THIS); in PHP_METHOD() local
585 intl_errors_reset(&objval->error); in PHP_METHOD()
587 if (!objval->src) { in PHP_METHOD()
594 ucnv_getSubstChars(objval->src, chars, &chars_len, &error); in PHP_METHOD()
596 THROW_UFAILURE(objval, "ucnv_getSubstChars", error); in PHP_METHOD()
607 php_converter_object *objval in php_converter_do_convert() argument
615 php_converter_throw_failure(objval, U_INVALID_STATE_ERROR, in php_converter_do_convert()
623 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
632 THROW_UFAILURE(objval, "ucnv_toUChars", error); in php_converter_do_convert()
641 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
653 THROW_UFAILURE(objval, "ucnv_fromUChars", error); in php_converter_do_convert()
688 php_converter_object *objval = CONV_GET(ZEND_THIS); in PHP_METHOD() local
699 intl_errors_reset(&objval->error); in PHP_METHOD()
701 ret = php_converter_do_convert(reverse ? objval->src : objval->dest, in PHP_METHOD()
702 reverse ? objval->dest : objval->src, in PHP_METHOD()
704 objval); in PHP_METHOD()
775 php_converter_object *objval = CONV_GET(ZEND_THIS); in PHP_METHOD() local
779 RETURN_LONG(intl_error_get_code(&(objval->error))); in PHP_METHOD()
785 php_converter_object *objval = CONV_GET(ZEND_THIS); in PHP_METHOD() local
789 zend_string *message = intl_error_get_message(&(objval->error)); in PHP_METHOD()
873 php_converter_object *objval = php_converter_fetch_object(obj); in php_converter_free_object() local
875 if (objval->src) { in php_converter_free_object()
876 ucnv_close(objval->src); in php_converter_free_object()
879 if (objval->dest) { in php_converter_free_object()
880 ucnv_close(objval->dest); in php_converter_free_object()
883 intl_error_reset(&objval->error); in php_converter_free_object()
888 php_converter_object *objval; in php_converter_object_ctor() local
890 objval = zend_object_alloc(sizeof(php_converter_object), ce); in php_converter_object_ctor()
892 zend_object_std_init(&objval->obj, ce); in php_converter_object_ctor()
893 object_properties_init(&objval->obj, ce); in php_converter_object_ctor()
894 intl_error_init(&(objval->error)); in php_converter_object_ctor()
896 *pobjval = objval; in php_converter_object_ctor()
898 return &objval->obj; in php_converter_object_ctor()
902 php_converter_object *objval = NULL; in php_converter_create_object() local
903 zend_object *retval = php_converter_object_ctor(ce, &objval); in php_converter_create_object()
905 object_properties_init(&(objval->obj), ce); in php_converter_create_object()
911 php_converter_object *objval, *oldobj = php_converter_fetch_object(object); in php_converter_clone_object() local
912 zend_object *retval = php_converter_object_ctor(object->ce, &objval); in php_converter_clone_object()
916 objval->src = ucnv_clone(oldobj->src, &error); in php_converter_clone_object()
918 objval->src = ucnv_safeClone(oldobj->src, NULL, NULL, &error); in php_converter_clone_object()
923 objval->dest = ucnv_clone(oldobj->dest, &error); in php_converter_clone_object()
925 objval->dest = ucnv_safeClone(oldobj->dest, NULL, NULL, &error); in php_converter_clone_object()
935 php_converter_set_callbacks(objval, objval->src ); in php_converter_clone_object()
936 php_converter_set_callbacks(objval, objval->dest); in php_converter_clone_object()
938 zend_objects_clone_members(&(objval->obj), &(oldobj->obj)); in php_converter_clone_object()