ICU-20439 Fix internal and draft headers.
diff --git a/icu4c/source/i18n/numsys.cpp b/icu4c/source/i18n/numsys.cpp
index 50be63e..d420151 100644
--- a/icu4c/source/i18n/numsys.cpp
+++ b/icu4c/source/i18n/numsys.cpp
@@ -260,8 +260,8 @@
if ( n == nullptr ) {
name[0] = (char) 0;
} else {
- uprv_strncpy(name,n,NUMSYS_NAME_CAPACITY);
- name[NUMSYS_NAME_CAPACITY] = '\0'; // Make sure it is null terminated.
+ uprv_strncpy(name,n,kInternalNumSysNameCapacity);
+ name[kInternalNumSysNameCapacity] = '\0'; // Make sure it is null terminated.
}
}
UBool NumberingSystem::isAlgorithmic() const {
diff --git a/icu4c/source/i18n/unicode/numberformatter.h b/icu4c/source/i18n/unicode/numberformatter.h
index 72f4748..e9fe39a 100644
--- a/icu4c/source/i18n/unicode/numberformatter.h
+++ b/icu4c/source/i18n/unicode/numberformatter.h
@@ -112,7 +112,7 @@
namespace impl {
-#ifndef U_HIDE_INTERNAL_API
+// can't be #ifndef U_HIDE_INTERNAL_API; referenced throughout this file in public classes
/**
* Datatype for minimum/maximum fraction digits. Must be able to hold kMaxIntFracSig.
*
@@ -120,14 +120,14 @@
*/
typedef int16_t digits_t;
+// can't be #ifndef U_HIDE_INTERNAL_API; needed for struct initialization
/**
* Use a default threshold of 3. This means that the third time .format() is called, the data structures get built
* using the "safe" code path. The first two calls to .format() will trigger the unsafe code path.
*
* @internal
*/
-static constexpr int32_t DEFAULT_THRESHOLD = 3;
-#endif /* U_HIDE_INTERNAL_API */
+static constexpr int32_t kInternalDefaultThreshold = 3;
// Forward declarations:
class Padder;
@@ -1411,7 +1411,7 @@
const CurrencySymbols* currencySymbols = nullptr; // no ownership
/** @internal */
- int32_t threshold = DEFAULT_THRESHOLD;
+ int32_t threshold = kInternalDefaultThreshold;
/** @internal */
Locale locale;
diff --git a/icu4c/source/i18n/unicode/numsys.h b/icu4c/source/i18n/unicode/numsys.h
index 5e14ea5..0ced6f4 100644
--- a/icu4c/source/i18n/unicode/numsys.h
+++ b/icu4c/source/i18n/unicode/numsys.h
@@ -20,16 +20,6 @@
#include "unicode/utypes.h"
-#ifndef U_HIDE_INTERNAL_API
-/**
- * \def NUMSYS_NAME_CAPACITY
- * Size of a numbering system name.
- * @internal
- */
-#define NUMSYS_NAME_CAPACITY 8
-#endif /* U_HIDE_INTERNAL_API */
-
-
/**
* \file
* \brief C++ API: NumberingSystem object
@@ -37,12 +27,18 @@
#if !UCONFIG_NO_FORMATTING
-
#include "unicode/format.h"
#include "unicode/uobject.h"
U_NAMESPACE_BEGIN
+// can't be #ifndef U_HIDE_INTERNAL_API; needed for char[] field size
+/**
+ * Size of a numbering system name.
+ * @internal
+ */
+constexpr const size_t kInternalNumSysNameCapacity = 8;
+
/**
* Defines numbering systems. A numbering system describes the scheme by which
* numbers are to be presented to the end user. In its simplest form, a numbering
@@ -195,7 +191,7 @@
UnicodeString desc;
int32_t radix;
UBool algorithmic;
- char name[NUMSYS_NAME_CAPACITY+1];
+ char name[kInternalNumSysNameCapacity+1];
void setRadix(int32_t radix);
diff --git a/icu4c/source/i18n/unicode/reldatefmt.h b/icu4c/source/i18n/unicode/reldatefmt.h
index 32344cd..16ae91a 100644
--- a/icu4c/source/i18n/unicode/reldatefmt.h
+++ b/icu4c/source/i18n/unicode/reldatefmt.h
@@ -708,11 +708,13 @@
UErrorCode& status,
Args... args) const;
+#ifndef U_HIDE_DRAFT_API // for FormattedRelativeDateTime
template<typename F, typename... Args>
FormattedRelativeDateTime doFormatToValue(
F callback,
UErrorCode& status,
Args... args) const;
+#endif // U_HIDE_DRAFT_API
void formatImpl(
double quantity,
diff --git a/icu4c/source/test/hdrtst/cxxfiles.txt b/icu4c/source/test/hdrtst/cxxfiles.txt
index 4c06bad..02151de 100644
--- a/icu4c/source/test/hdrtst/cxxfiles.txt
+++ b/icu4c/source/test/hdrtst/cxxfiles.txt
@@ -53,11 +53,13 @@
filteredbrk.h
fmtable.h
format.h
+formattedvalue.h
fpositer.h
gender.h
gregocal.h
idna.h
listformatter.h
+localebuilder.h
locdspnm.h
locid.h
measfmt.h