summaryrefslogtreecommitdiff
path: root/ext/intl/msgformat/msgformat_attr.c
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2012-06-06 11:36:00 +0200
committerGustavo André dos Santos Lopes <cataphract@php.net>2012-06-06 11:36:00 +0200
commit52d541a3149d4a21e9f45fa80b26c338636f92c4 (patch)
treef20229e3df4029130e5f497b204952b344696c82 /ext/intl/msgformat/msgformat_attr.c
parent45b3fa4deea739c8a3bf8778efac2f748a2685bc (diff)
downloadphp-git-52d541a3149d4a21e9f45fa80b26c338636f92c4.tar.gz
Optimization in ext/intl/msgformat
Don't transform the string to make it apostrophe friendly in ICU 4.8+ as that it is now the default.
Diffstat (limited to 'ext/intl/msgformat/msgformat_attr.c')
-rwxr-xr-xext/intl/msgformat/msgformat_attr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/intl/msgformat/msgformat_attr.c b/ext/intl/msgformat/msgformat_attr.c
index cf34665142..ed2dae27d1 100755
--- a/ext/intl/msgformat/msgformat_attr.c
+++ b/ext/intl/msgformat/msgformat_attr.c
@@ -82,11 +82,13 @@ PHP_FUNCTION( msgfmt_set_pattern )
intl_convert_utf8_to_utf16(&spattern, &spattern_len, value, value_len, &INTL_DATA_ERROR_CODE(mfo));
INTL_METHOD_CHECK_STATUS(mfo, "Error converting pattern to UTF-16" );
+#ifdef MSG_FORMAT_QUOTE_APOS
if(msgformat_fix_quotes(&spattern, &spattern_len, &INTL_DATA_ERROR_CODE(mfo)) != SUCCESS) {
intl_error_set( NULL, U_INVALID_FORMAT_ERROR,
"msgfmt_set_pattern: error converting pattern to quote-friendly format", 0 TSRMLS_CC );
RETURN_FALSE;
}
+#endif
/* TODO: add parse error information */
umsg_applyPattern(MSG_FORMAT_OBJECT(mfo), spattern, spattern_len, NULL, &INTL_DATA_ERROR_CODE(mfo));