ICU-5571 fix compilation error on AIX and HP-UX

X-SVN-Rev: 20992
This commit is contained in:
Ram Viswanadha 2007-01-29 22:07:29 +00:00
parent 4989617625
commit 9d2ec81fee

View file

@ -274,6 +274,12 @@ idnaref_toASCII(const UChar* src, int32_t srcLength,
UBool srcIsLDH = TRUE;
int32_t j=0;
NamePrepTransform* prep = TestIDNA::getInstance(*status);
if(U_FAILURE(*status)){
goto CLEANUP;
}
if(srcLength == -1){
srcLength = u_strlen(src);
}
@ -292,13 +298,8 @@ idnaref_toASCII(const UChar* src, int32_t srcLength,
}
b1[b1Len++] = src[j];
}
// step 2
NamePrepTransform* prep = TestIDNA::getInstance(*status);
if(U_FAILURE(*status)){
goto CLEANUP;
}
b1Len = prep->process(src,srcLength,b1, b1Capacity,allowUnassigned,parseError,*status);
if(*status == U_BUFFER_OVERFLOW_ERROR){