ICU-2268 fixed UTokenAssigner bug in UVector

X-SVN-Rev: 9816
This commit is contained in:
Vladimir Weinstein 2002-08-29 22:12:49 +00:00
parent ae8bbc8773
commit f346c4d8f2
3 changed files with 5 additions and 5 deletions

View File

@ -151,8 +151,8 @@ static inline void _dbgdt(UnicodeSet* set) {
// UnicodeString in UVector support
//----------------------------------------------------------------
static void U_CALLCONV cloneUnicodeString(UHashTok dst, UHashTok src) {
dst.pointer = new UnicodeString(*(UnicodeString*)src.pointer);
static void U_CALLCONV cloneUnicodeString(UHashTok *dst, UHashTok *src) {
dst->pointer = new UnicodeString(*(UnicodeString*)src->pointer);
}
static int8_t U_CALLCONV compareUnicodeString(UHashTok t1, UHashTok t2) {

View File

@ -95,7 +95,7 @@ void UVector::assign(const UVector& other, UTokenAssigner *assign, UErrorCode &e
if (elements[i].pointer != 0 && deleter != 0) {
(*deleter)(elements[i].pointer);
}
(*assign)(elements[i], other.elements[i]);
(*assign)(&elements[i], &other.elements[i]);
}
}
}

View File

@ -34,8 +34,8 @@ typedef int8_t U_CALLCONV USortComparator(UHashTok tok1,
* @param dst The token to be assigned to
* @param src The token to assign from
*/
typedef void U_CALLCONV UTokenAssigner(UHashTok dst,
UHashTok src);
typedef void U_CALLCONV UTokenAssigner(UHashTok *dst,
UHashTok *src);
/**
* <p>Ultralightweight C++ implementation of a <tt>void*</tt> vector