]> granicus.if.org Git - icu/commitdiff
ICU-21065 Move U_DEFINE_LOCAL_OPEN_POINTER
authorFrank Tang <ftang@chromium.org>
Mon, 6 Apr 2020 21:13:02 +0000 (14:13 -0700)
committerFrank Yung-Fong Tang <41213225+FrankYFTang@users.noreply.github.com>
Wed, 8 Apr 2020 05:01:24 +0000 (22:01 -0700)
Move IU_DEFINE_LOCAL_OPEN_POINTER outside U_CDECL_BEGIN / _END
to fix conflicting declaration of C function

icu4c/source/common/unicode/umutablecptrie.h
icu4c/source/common/unicode/utext.h

index 13e71ef25e8c8713c13f0350c269ffd233652c55..f2af36477d53001ff963a1a6ce3ff7c824229cb2 100644 (file)
@@ -83,25 +83,6 @@ umutablecptrie_clone(const UMutableCPTrie *other, UErrorCode *pErrorCode);
 U_CAPI void U_EXPORT2
 umutablecptrie_close(UMutableCPTrie *trie);
 
-#if U_SHOW_CPLUSPLUS_API
-
-U_NAMESPACE_BEGIN
-
-/**
- * \class LocalUMutableCPTriePointer
- * "Smart pointer" class, closes a UMutableCPTrie via umutablecptrie_close().
- * For most methods see the LocalPointerBase base class.
- *
- * @see LocalPointerBase
- * @see LocalPointer
- * @stable ICU 63
- */
-U_DEFINE_LOCAL_OPEN_POINTER(LocalUMutableCPTriePointer, UMutableCPTrie, umutablecptrie_close);
-
-U_NAMESPACE_END
-
-#endif
-
 /**
  * Creates a mutable trie with the same contents as the UCPMap.
  * You must umutablecptrie_close() the mutable trie once you are done using it.
@@ -235,4 +216,23 @@ umutablecptrie_buildImmutable(UMutableCPTrie *trie, UCPTrieType type, UCPTrieVal
 
 U_CDECL_END
 
+#if U_SHOW_CPLUSPLUS_API
+
+U_NAMESPACE_BEGIN
+
+/**
+ * \class LocalUMutableCPTriePointer
+ * "Smart pointer" class, closes a UMutableCPTrie via umutablecptrie_close().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 63
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUMutableCPTriePointer, UMutableCPTrie, umutablecptrie_close);
+
+U_NAMESPACE_END
+
+#endif
+
 #endif
index 196056bfb890d4db30a7baf8e540c60e1883cf23..37d71a317286edb53e0e08f6645d17006b1477c3 100644 (file)
@@ -183,25 +183,6 @@ typedef struct UText UText; /**< C typedef for struct UText. @stable ICU 3.6 */
 U_STABLE UText * U_EXPORT2
 utext_close(UText *ut);
 
-#if U_SHOW_CPLUSPLUS_API
-
-U_NAMESPACE_BEGIN
-
-/**
- * \class LocalUTextPointer
- * "Smart pointer" class, closes a UText via utext_close().
- * For most methods see the LocalPointerBase base class.
- *
- * @see LocalPointerBase
- * @see LocalPointer
- * @stable ICU 4.4
- */
-U_DEFINE_LOCAL_OPEN_POINTER(LocalUTextPointer, UText, utext_close);
-
-U_NAMESPACE_END
-
-#endif
-
 /**
  * Open a read-only UText implementation for UTF-8 strings.
  * 
@@ -1599,5 +1580,24 @@ enum {
 U_CDECL_END
 
 
+#if U_SHOW_CPLUSPLUS_API
+
+U_NAMESPACE_BEGIN
+
+/**
+ * \class LocalUTextPointer
+ * "Smart pointer" class, closes a UText via utext_close().
+ * For most methods see the LocalPointerBase base class.
+ *
+ * @see LocalPointerBase
+ * @see LocalPointer
+ * @stable ICU 4.4
+ */
+U_DEFINE_LOCAL_OPEN_POINTER(LocalUTextPointer, UText, utext_close);
+
+U_NAMESPACE_END
+
+#endif
+
 
 #endif