ICU-1947 Better usage for U_EXPORT2 and U_CALLCONV
X-SVN-Rev: 9296
This commit is contained in:
parent
7e92471c93
commit
aa41d27d93
@ -171,7 +171,7 @@
|
||||
#if defined(OS390) && (__COMPILER_VER__ < 0x41020000) && defined(XP_CPLUSPLUS)
|
||||
# define U_CALLCONV __cdecl
|
||||
#else
|
||||
# define U_CALLCONV
|
||||
# define U_CALLCONV U_EXPORT2
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -88,7 +88,7 @@ UVector::~UVector() {
|
||||
* Assign this object to another (make this a copy of 'other').
|
||||
* Use the 'assign' function to assign each element.
|
||||
*/
|
||||
void UVector::assign(const UVector& other, UTokenAssigner assign, UErrorCode &ec) {
|
||||
void UVector::assign(const UVector& other, UTokenAssigner *assign, UErrorCode &ec) {
|
||||
if (ensureCapacity(other.count, ec)) {
|
||||
setSize(other.count);
|
||||
for (int32_t i=0; i<other.count; ++i) {
|
||||
@ -421,7 +421,7 @@ void* UVector::orphanElementAt(int32_t index) {
|
||||
* as defined by 'compare'. The current elements are assumed to
|
||||
* be sorted already.
|
||||
*/
|
||||
void UVector::sortedInsert(void* obj, USortComparator compare, UErrorCode& ec) {
|
||||
void UVector::sortedInsert(void* obj, USortComparator *compare, UErrorCode& ec) {
|
||||
UHashTok tok;
|
||||
tok.pointer = obj;
|
||||
sortedInsert(tok, compare, ec);
|
||||
@ -432,14 +432,14 @@ void UVector::sortedInsert(void* obj, USortComparator compare, UErrorCode& ec) {
|
||||
* as defined by 'compare'. The current elements are assumed to
|
||||
* be sorted already.
|
||||
*/
|
||||
void UVector::sortedInsert(int32_t obj, USortComparator compare, UErrorCode& ec) {
|
||||
void UVector::sortedInsert(int32_t obj, USortComparator *compare, UErrorCode& ec) {
|
||||
UHashTok tok;
|
||||
tok.integer = obj;
|
||||
sortedInsert(tok, compare, ec);
|
||||
}
|
||||
|
||||
// ASSUME elements[] IS CURRENTLY SORTED
|
||||
void UVector::sortedInsert(UHashTok tok, USortComparator compare, UErrorCode& ec) {
|
||||
void UVector::sortedInsert(UHashTok tok, USortComparator *compare, UErrorCode& ec) {
|
||||
// Perform a binary search for the location to insert tok at. Tok
|
||||
// will be inserted between two elements a and b such that a <=
|
||||
// tok && tok < b, where there is a 'virtual' elements[-1] always
|
||||
|
@ -25,7 +25,7 @@ U_NAMESPACE_BEGIN
|
||||
* @return 0 if the two tokens are equal, -1 if tok1 is < tok2, or
|
||||
* +1 if tok1 is > tok2.
|
||||
*/
|
||||
typedef int8_t (U_EXPORT2 * U_CALLCONV USortComparator)(UHashTok tok1,
|
||||
typedef int8_t U_CALLCONV USortComparator(UHashTok tok1,
|
||||
UHashTok tok2);
|
||||
|
||||
/**
|
||||
@ -34,7 +34,7 @@ typedef int8_t (U_EXPORT2 * U_CALLCONV USortComparator)(UHashTok tok1,
|
||||
* @param dst The token to be assigned to
|
||||
* @param src The token to assign from
|
||||
*/
|
||||
typedef void (U_EXPORT2 * U_CALLCONV UTokenAssigner)(UHashTok dst,
|
||||
typedef void U_CALLCONV UTokenAssigner(UHashTok dst,
|
||||
UHashTok src);
|
||||
|
||||
/**
|
||||
@ -121,7 +121,7 @@ public:
|
||||
* Assign this object to another (make this a copy of 'other').
|
||||
* Use the 'assign' function to assign each element.
|
||||
*/
|
||||
void assign(const UVector& other, UTokenAssigner assign, UErrorCode &ec);
|
||||
void assign(const UVector& other, UTokenAssigner *assign, UErrorCode &ec);
|
||||
|
||||
/**
|
||||
* Compare this vector with another. They will be considered
|
||||
@ -236,14 +236,14 @@ public:
|
||||
* as defined by 'compare'. The current elements are assumed to
|
||||
* be sorted already.
|
||||
*/
|
||||
void sortedInsert(void* obj, USortComparator compare, UErrorCode& ec);
|
||||
void sortedInsert(void* obj, USortComparator *compare, UErrorCode& ec);
|
||||
|
||||
/**
|
||||
* Insert the given integer into this vector at its sorted position
|
||||
* as defined by 'compare'. The current elements are assumed to
|
||||
* be sorted already.
|
||||
*/
|
||||
void sortedInsert(int32_t obj, USortComparator compare, UErrorCode& ec);
|
||||
void sortedInsert(int32_t obj, USortComparator *compare, UErrorCode& ec);
|
||||
|
||||
/**
|
||||
* ICU "poor man's RTTI", returns a UClassID for the actual class.
|
||||
@ -264,7 +264,7 @@ private:
|
||||
|
||||
int32_t indexOf(UHashTok key, int32_t startIndex = 0, int8_t hint = 0) const;
|
||||
|
||||
void sortedInsert(UHashTok tok, USortComparator compare, UErrorCode& ec);
|
||||
void sortedInsert(UHashTok tok, USortComparator *compare, UErrorCode& ec);
|
||||
|
||||
// Disallow
|
||||
UVector(const UVector&);
|
||||
|
Loading…
Reference in New Issue
Block a user