From d4307e4494e2f6141f1a05db2e1d440331659f6f Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Thu, 9 Feb 2006 23:23:02 +0000 Subject: [PATCH] We already have default collator available. --- Zend/zend_operators.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index ba5dab6922..884d0da224 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1462,8 +1462,6 @@ ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2 T UErrorCode status = U_ZERO_ERROR; UCollator *col; - col = ucol_open(UG(default_locale), &status); - zend_make_unicode_zval(op1, &op1_copy, &use_copy1); zend_make_unicode_zval(op2, &op2_copy, &use_copy2); @@ -1474,7 +1472,7 @@ ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2 T op2 = &op2_copy; } - result->value.lval = ucol_strcoll(col, op1->value.ustr.val, op1->value.ustr.len, op2->value.ustr.val, op2->value.ustr.len); + result->value.lval = ucol_strcoll(UG(default_collator), op1->value.ustr.val, op1->value.ustr.len, op2->value.ustr.val, op2->value.ustr.len); result->type = IS_LONG; if (use_copy1) { @@ -1484,8 +1482,6 @@ ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2 T zval_dtor(op2); } - ucol_close(col); - return SUCCESS; } -- 2.40.0