mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-21 12:40:02 +00:00
ICU-4163 Remove empty function body (ucol_openFromImage) that was in by mistake
X-SVN-Rev: 16802
This commit is contained in:
parent
6595b78c67
commit
e5f691ee8a
1 changed files with 0 additions and 57 deletions
|
@ -9386,62 +9386,5 @@ ucol_openBinary(const uint8_t *bin, int32_t length,
|
|||
return result;
|
||||
}
|
||||
|
||||
U_CAPI UCollator* U_EXPORT2
|
||||
ucol_openFromImage( const uint8_t *image,
|
||||
UCollator *coll,
|
||||
UErrorCode *status)
|
||||
{
|
||||
return NULL;
|
||||
#if 0
|
||||
if(status == NULL || U_FAILURE(*status)){
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(image == NULL) {
|
||||
*status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ucol_initUCA(status);
|
||||
|
||||
if(U_FAILURE(*status)){
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int32_t len = ((UCATableHeader *)image)->size;
|
||||
UCATableHeader *table = (UCATableHeader *) uprv_malloc(len);
|
||||
/* test for NULL */
|
||||
if (table == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
uprv_memcpy(table, image, len);
|
||||
|
||||
UCollator *result = ucol_initCollator(table,0,status);
|
||||
|
||||
if (result != NULL) {
|
||||
result->freeImageOnClose = TRUE;
|
||||
result->rules = NULL;
|
||||
result->rulesLength = 0;
|
||||
result->freeRulesOnClose = FALSE;
|
||||
result->rb = NULL;
|
||||
result->elements = NULL;
|
||||
result->validLocale = NULL;
|
||||
result->requestedLocale = NULL;
|
||||
if(U_SUCCESS(*status)) {
|
||||
result->dataInfo.dataVersion[0] = UCOL_BUILDER_VERSION;
|
||||
result->hasRealData = len > paddedsize(sizeof(UCATableHeader)) + paddedsize(sizeof(UColOptionSet));
|
||||
} else {
|
||||
ucol_close(result);
|
||||
result = NULL;
|
||||
}
|
||||
} else {
|
||||
uprv_free(table);
|
||||
}
|
||||
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* #if !UCONFIG_NO_COLLATION */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue