"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/intl/lc_icu.cpp" between
Firebird-3.0.2.32703-0.tar.bz2 and Firebird-3.0.4.33054-0.tar.bz2

About: Firebird is a relational database offering many ANSI SQL standard features.

lc_icu.cpp  (Firebird-3.0.2.32703-0.tar.bz2):lc_icu.cpp  (Firebird-3.0.4.33054-0.tar.bz2)
skipping to change at line 58 skipping to change at line 58
const UCHAR*, / / specificAttributes, const UCHAR*, / / specificAttributes,
ULONG specificA ttributesLength) ULONG specificA ttributesLength)
//const ASCII* configInfo) //const ASCII* configInfo)
{ {
charset cs; charset cs;
memset(&cs, 0, sizeof(cs)); memset(&cs, 0, sizeof(cs));
// test if that ICU charset exist // test if that ICU charset exist
if (CSICU_charset_init(&cs, charSetName)) if (CSICU_charset_init(&cs, charSetName))
{ {
if (cs.charset_fn_destroy) IntlUtil::finiCharset(&cs);
cs.charset_fn_destroy(&cs);
} }
else else
return false; return false;
if ((attributes & ~TEXTTYPE_ATTR_PAD_SPACE) || if ((attributes & ~TEXTTYPE_ATTR_PAD_SPACE) ||
// disabled TEXTTYPE_ATTR_PAD_SPACE isn't allowed // disabled TEXTTYPE_ATTR_PAD_SPACE isn't allowed
// for our ICU collations yet // for our ICU collations yet
!(attributes & TEXTTYPE_ATTR_PAD_SPACE) || !(attributes & TEXTTYPE_ATTR_PAD_SPACE) ||
specificAttributesLength) specificAttributesLength)
{ {
skipping to change at line 120 skipping to change at line 119
attributes, specificAttributesBuffer, configInfo); attributes, specificAttributesBuffer, configInfo);
} }
bool LCICU_setup_attributes(const ASCII* name, const ASCII* charSetName, const A SCII* configInfo, bool LCICU_setup_attributes(const ASCII* name, const ASCII* charSetName, const A SCII* configInfo,
const Firebird::string& specificAttributes, Firebird::string& newSpecific Attributes) const Firebird::string& specificAttributes, Firebird::string& newSpecific Attributes)
{ {
const size_t len = strlen(name); const size_t len = strlen(name);
if (len > 8 && strcmp(name + len - 8, "_UNICODE") == 0) if (len > 8 && strcmp(name + len - 8, "_UNICODE") == 0)
{ {
AutoPtr<charset, Jrd::CharSet::Delete> cs(FB_NEW_POOL(*getDefault MemoryPool()) charset); AutoPtr<charset> cs(FB_NEW_POOL(*getDefaultMemoryPool()) charset) ;
memset(cs, 0, sizeof(*cs)); memset(cs, 0, sizeof(*cs));
// test if that charset exist // test if that charset exist
if (!LD_lookup_charset(cs, charSetName, configInfo)) if (!LD_lookup_charset(cs, charSetName, configInfo))
return false; return false;
return IntlUtil::setupIcuAttributes(cs, specificAttributes, confi gInfo, newSpecificAttributes); return IntlUtil::setupIcuAttributes(cs, specificAttributes, confi gInfo, newSpecificAttributes);
} }
return true; return true;
 End of changes. 2 change blocks. 
3 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)