ICU-20439 Fix internal and draft headers.

This commit is contained in:
Shane Carr 2019-03-22 21:34:56 -07:00 committed by Shane F. Carr
parent e318c0c374
commit c86028c70c
5 changed files with 18 additions and 18 deletions

View file

@ -260,8 +260,8 @@ void NumberingSystem::setName(const char *n) {
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 {

View file

@ -112,7 +112,7 @@ class IntegerWidth;
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 @@ namespace impl {
*/
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 @@ struct U_I18N_API MacroProps : public UMemory {
const CurrencySymbols* currencySymbols = nullptr; // no ownership
/** @internal */
int32_t threshold = DEFAULT_THRESHOLD;
int32_t threshold = kInternalDefaultThreshold;
/** @internal */
Locale locale;

View file

@ -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 @@ private:
UnicodeString desc;
int32_t radix;
UBool algorithmic;
char name[NUMSYS_NAME_CAPACITY+1];
char name[kInternalNumSysNameCapacity+1];
void setRadix(int32_t radix);

View file

@ -708,11 +708,13 @@ private:
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,

View file

@ -53,11 +53,13 @@ fieldpos.h
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