ICU-3946 Fix some tests to use U_EXPORT2 and U_CALLCONV more often

X-SVN-Rev: 16018
This commit is contained in:
George Rhoten 2004-07-16 06:52:44 +00:00
parent 94f8d3fa9c
commit e8f3a97f77
4 changed files with 15 additions and 15 deletions

View File

@ -681,7 +681,7 @@ static void TestMisc()
#define ISCN 0x800
/* C/POSIX-style functions, in the same order as the bit flags */
typedef UBool IsPOSIXClass(UChar32 c);
typedef UBool U_EXPORT2 IsPOSIXClass(UChar32 c);
static const struct {
IsPOSIXClass *fn;

View File

@ -84,7 +84,7 @@ static char *safeGetICUDataDirectory() {
int gBlockCount = 0;
const void *gContext;
static void *myMemAlloc(const void *context, size_t size) {
static void * U_CALLCONV myMemAlloc(const void *context, size_t size) {
char *retPtr = (char *)malloc(size+sizeof(ctest_AlignedMemory));
if (retPtr != NULL) {
retPtr += sizeof(ctest_AlignedMemory);
@ -93,7 +93,7 @@ static void *myMemAlloc(const void *context, size_t size) {
return retPtr;
}
static void myMemFree(const void *context, void *mem) {
static void U_CALLCONV myMemFree(const void *context, void *mem) {
char *freePtr = (char *)mem;
if (freePtr != NULL) {
freePtr -= sizeof(ctest_AlignedMemory);
@ -103,7 +103,7 @@ static void myMemFree(const void *context, void *mem) {
static void *myMemRealloc(const void *context, void *mem, size_t size) {
static void * U_CALLCONV myMemRealloc(const void *context, void *mem, size_t size) {
char *p = (char *)mem;
char *retPtr;
@ -218,7 +218,7 @@ typedef struct DummyMutex {
} DummyMutex;
static void myMutexInit(const void *context, UMTX *mutex, UErrorCode *status) {
static void U_CALLCONV myMutexInit(const void *context, UMTX *mutex, UErrorCode *status) {
DummyMutex *theMutex;
TEST_STATUS(*status, U_ZERO_ERROR);
@ -232,7 +232,7 @@ static void myMutexInit(const void *context, UMTX *mutex, UErrorCode *status) {
}
static void myMutexDestroy(const void *context, UMTX *mutex) {
static void U_CALLCONV myMutexDestroy(const void *context, UMTX *mutex) {
DummyMutex *This = *(DummyMutex **)mutex;
gTotalMutexesActive--;
@ -243,7 +243,7 @@ static void myMutexDestroy(const void *context, UMTX *mutex) {
free(This);
}
static void myMutexLock(const void *context, UMTX *mutex) {
static void U_CALLCONV myMutexLock(const void *context, UMTX *mutex) {
DummyMutex *This = *(DummyMutex **)mutex;
TEST_ASSERT(This->fMagic == 123456);
@ -251,7 +251,7 @@ static void myMutexLock(const void *context, UMTX *mutex) {
gAccumulatedLocks++;
}
static void myMutexUnlock(const void *context, UMTX *mutex) {
static void U_CALLCONV myMutexUnlock(const void *context, UMTX *mutex) {
DummyMutex *This = *(DummyMutex **)mutex;
TEST_ASSERT(This->fMagic == 123456);
@ -373,7 +373,7 @@ int gDecCount = 0;
const void *gIncDecContext;
static int32_t myIncFunc(const void *context, int32_t *p) {
static int32_t U_CALLCONV myIncFunc(const void *context, int32_t *p) {
int32_t retVal;
TEST_ASSERT(context == gIncDecContext);
gIncCount++;
@ -381,7 +381,7 @@ static int32_t myIncFunc(const void *context, int32_t *p) {
return retVal;
}
static int32_t myDecFunc(const void *context, int32_t *p) {
static int32_t U_CALLCONV myDecFunc(const void *context, int32_t *p) {
int32_t retVal;
TEST_ASSERT(context == gIncDecContext);
gDecCount++;

View File

@ -38,12 +38,12 @@ void addIDNATest(TestNode** root);
typedef int32_t
(*TestFunc) ( const UChar *src, int32_t srcLength,
(U_EXPORT2 *TestFunc) ( const UChar *src, int32_t srcLength,
UChar *dest, int32_t destCapacity,
int32_t options, UParseError *parseError,
UErrorCode *status);
typedef int32_t
(*CompareFunc) (const UChar *s1, int32_t s1Len,
(U_EXPORT2 *CompareFunc) (const UChar *s1, int32_t s1Len,
const UChar *s2, int32_t s2Len,
int32_t options,
UErrorCode *status);

View File

@ -102,7 +102,7 @@ static int gTraceDataCount;
static UBool gFnNameError = FALSE;
static UBool gFnFormatError = FALSE;
static void testTraceEntry(const void *context, int32_t fnNumber) {
static void U_CALLCONV testTraceEntry(const void *context, int32_t fnNumber) {
const char *fnName;
const char *bogusFnName;
@ -118,7 +118,7 @@ static void testTraceEntry(const void *context, int32_t fnNumber) {
}
static void testTraceExit(const void *context, int32_t fnNumber,
static void U_CALLCONV testTraceExit(const void *context, int32_t fnNumber,
const char *fmt, va_list args) {
char buf[1000];
const char *fnName;
@ -144,7 +144,7 @@ static void testTraceExit(const void *context, int32_t fnNumber,
}
static void testTraceData(const void *context, int32_t fnNumber, int32_t level,
static void U_CALLCONV testTraceData(const void *context, int32_t fnNumber, int32_t level,
const char *fmt, va_list args) {
char buf[1000];
const char *fnName;