]> granicus.if.org Git - icu/commitdiff
ICU-13030 cleanup U_CALLCONV on windows. Also, initialize an uninitialized var
authorSteven R. Loomis <srl@icu-project.org>
Wed, 24 May 2017 23:25:33 +0000 (23:25 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Wed, 24 May 2017 23:25:33 +0000 (23:25 +0000)
X-SVN-Rev: 40137

icu4c/source/common/ucurr.cpp
icu4c/source/common/unicode/platform.h
icu4c/source/common/unicode/uclean.h

index f2cae13ce335c7f4d11e95339d1148017f665885..e2ccf50841a1ecd47ccf325d6afe276023e41888 100644 (file)
@@ -588,7 +588,7 @@ ucurr_forLocale(const char* locale,
         idDelim[0] = 0;
     }
 
-    const UChar* s;  // Currency code from data file.
+    const UChar* s = NULL;  // Currency code from data file.
     if (id[0] == 0) {
         // No point looking in the data for an empty string.
         // This is what we would get.
index 4bb4ecb412287a82a42ccab32fb05ddcbc228f54..d4f9a7462212551d0b8b3ca9231a7ed612d6bba6 100644 (file)
@@ -830,6 +830,16 @@ namespace std {
 #    define U_CALLCONV U_EXPORT2
 #endif
 
+ /**
+ * \def U_CALLCONV_FPTR
+ * Similar to U_CALLCONV, but only used on function pointers.
+ * @internal
+ */
+#if U_PLATFORM == U_PF_OS390 && defined(__cplusplus)
+#    define U_CALLCONV_FPTR U_CALLCONV
+#else
+#    define U_CALLCONV_FPTR
+#endif
 /* @} */
 
 #endif
index 5beb1f7c37af8ec30ae49b181aac9cb24c5aba9e..5b0486d3950177b1c80d713f92fc62fde2cb0b5b 100644 (file)
@@ -149,7 +149,7 @@ typedef void  U_CALLCONV UMemFreeFn (const void *context, void *mem);
  *  @system
  */  
 U_STABLE void U_EXPORT2 
-u_setMemoryFunctions(const void *context, UMemAllocFn * U_CALLCONV a, UMemReallocFn * U_CALLCONV r, UMemFreeFn * U_CALLCONV f, 
+u_setMemoryFunctions(const void *context, UMemAllocFn * U_CALLCONV_FPTR a, UMemReallocFn * U_CALLCONV_FPTR r, UMemFreeFn * U_CALLCONV_FPTR f, 
                     UErrorCode *status);
 
 U_CDECL_END