ICU-7285 Use U_SHOW_CPLUSPLUS_API (normally 1 iff XP_CPLUSPLUS is defined) to control C++ API exposure

X-SVN-Rev: 27092
This commit is contained in:
Peter Edberg 2009-12-17 07:13:28 +00:00
parent 93a4daa9b8
commit 8a58804ef1
27 changed files with 51 additions and 40 deletions

View file

@ -38,7 +38,7 @@
#include "unicode/utypes.h"
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
@ -296,5 +296,5 @@ public:
U_NAMESPACE_END
#endif /* XP_CPLUSPLUS */
#endif /* U_SHOW_CPLUSPLUS_API */
#endif /* __LOCALPOINTER_H__ */

View file

@ -520,7 +520,7 @@ ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode);
U_STABLE void U_EXPORT2
ubidi_close(UBiDi *pBiDi);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -278,7 +278,7 @@ ubrk_safeClone(
U_STABLE void U_EXPORT2
ubrk_close(UBreakIterator *bi);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -77,7 +77,7 @@ ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode);
U_STABLE void U_EXPORT2
ucasemap_close(UCaseMap *csm);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -524,7 +524,7 @@ ucnv_safeClone(const UConverter *cnv,
U_STABLE void U_EXPORT2
ucnv_close(UConverter * converter);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -88,7 +88,7 @@ ucnvsel_open(const char* const* converterList, int32_t converterListSize,
U_CAPI void U_EXPORT2
ucnvsel_close(UConverterSelector *sel);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -257,7 +257,7 @@ udata_openChoice(const char *path, const char *type, const char *name,
U_STABLE void U_EXPORT2
udata_close(UDataMemory *pData);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -20,7 +20,7 @@
#include "unicode/utypes.h"
#include "unicode/localpointer.h"
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
#include "unicode/strenum.h"
#endif
@ -48,7 +48,7 @@ typedef struct UEnumeration UEnumeration;
U_STABLE void U_EXPORT2
uenum_close(UEnumeration* en);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
@ -155,7 +155,7 @@ uenum_next(UEnumeration* en,
U_STABLE void U_EXPORT2
uenum_reset(UEnumeration* en, UErrorCode* status);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
/**
* Given a StringEnumeration, wrap it in a UEnumeration. The

View file

@ -1,7 +1,7 @@
/*
*******************************************************************************
*
* Copyright (C) 2002-2006, International Business Machines
* Copyright (C) 2002-2006,2009 International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -26,7 +26,7 @@
#include "unicode/utypes.h"
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
class CharacterIterator;
@ -650,7 +650,7 @@ uiter_setUTF16BE(UCharIterator *iter, const char *s, int32_t length);
U_STABLE void U_EXPORT2
uiter_setUTF8(UCharIterator *iter, const char *s, int32_t length);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
/**
* Set up a UCharIterator to wrap around a C++ CharacterIterator.

View file

@ -239,7 +239,7 @@ ures_countArrayItems(const UResourceBundle* resourceBundle,
U_STABLE void U_EXPORT2
ures_close(UResourceBundle* resourceBundle);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
@ -776,7 +776,7 @@ ures_getUTF8StringByKey(const UResourceBundle *resB,
UBool forceCopy,
UErrorCode *status);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
#include "unicode/unistr.h"
U_NAMESPACE_BEGIN

View file

@ -300,7 +300,7 @@ uset_openPatternOptions(const UChar* pattern, int32_t patternLength,
U_STABLE void U_EXPORT2
uset_close(USet* set);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -207,7 +207,7 @@ usprep_openByType(UStringPrepProfileType type,
U_STABLE void U_EXPORT2
usprep_close(UStringPrepProfile* profile);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -136,7 +136,7 @@
#include "unicode/utypes.h"
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
#include "unicode/localpointer.h"
#include "unicode/rep.h"
#include "unicode/unistr.h"
@ -180,7 +180,7 @@ typedef struct UText UText; /**< C typedef for struct UText. @stable ICU 3.6 */
U_STABLE UText * U_EXPORT2
utext_close(UText *ut);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
@ -242,7 +242,7 @@ U_STABLE UText * U_EXPORT2
utext_openUChars(UText *ut, const UChar *s, int64_t length, UErrorCode *status);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
/**
* Open a writable UText for a non-const UnicodeString.
*

View file

@ -38,6 +38,17 @@
#include "unicode/uversion.h"
#include "unicode/uconfig.h"
#ifdef XP_CPLUSPLUS
# ifndef U_SHOW_CPLUSPLUS_API
# define U_SHOW_CPLUSPLUS_API 1
# endif
#else
# undef U_SHOW_CPLUSPLUS_API
# define U_SHOW_CPLUSPLUS_API 0
#endif
/**
* \def U_HIDE_DRAFT_API
* Define this to 1 to request that draft API be "hidden"

View file

@ -645,7 +645,7 @@ ucal_open(const UChar* zoneID,
U_STABLE void U_EXPORT2
ucal_close(UCalendar *cal);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -376,7 +376,7 @@ ucol_getContractionsAndExpansions( const UCollator *coll,
U_STABLE void U_EXPORT2
ucol_close(UCollator *coll);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -84,7 +84,7 @@ ucsdet_open(UErrorCode *status);
U_STABLE void U_EXPORT2
ucsdet_close(UCharsetDetector *ucsd);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -536,7 +536,7 @@ udat_open(UDateFormatStyle timeStyle,
U_STABLE void U_EXPORT2
udat_close(UDateFormat* format);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -147,7 +147,7 @@ udatpg_openEmpty(UErrorCode *pErrorCode);
U_DRAFT void U_EXPORT2
udatpg_close(UDateTimePatternGenerator *dtpg);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -75,7 +75,7 @@ ulocdata_open(const char *localeID, UErrorCode *status);
U_STABLE void U_EXPORT2
ulocdata_close(ULocaleData *uld);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -454,7 +454,7 @@ umsg_open( const UChar *pattern,
U_STABLE void U_EXPORT2
umsg_close(UMessageFormat* format);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -255,7 +255,7 @@ unum_open( UNumberFormatStyle style,
U_STABLE void U_EXPORT2
unum_close(UNumberFormat* fmt);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -178,7 +178,7 @@ uregex_openC( const char *pattern,
U_STABLE void U_EXPORT2
uregex_close(URegularExpression *regexp);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -250,7 +250,7 @@ U_STABLE UStringSearch * U_EXPORT2 usearch_openFromCollator(
*/
U_STABLE void U_EXPORT2 usearch_close(UStringSearch *searchiter);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -30,7 +30,7 @@
#if !UCONFIG_NO_NORMALIZATION
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
#include "unicode/unistr.h"
#include "unicode/uniset.h"
@ -290,7 +290,7 @@ uspoof_openFromSource(const char *confusables, int32_t confusablesLen,
U_DRAFT void U_EXPORT2
uspoof_close(USpoofChecker *sc);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
@ -467,7 +467,7 @@ U_DRAFT const USet * U_EXPORT2
uspoof_getAllowedChars(const USpoofChecker *sc, UErrorCode *status);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
/**
* Limit the acceptable characters to those specified by a Unicode Set.
* Any previously specified character limit is
@ -585,7 +585,7 @@ uspoof_checkUTF8(const USpoofChecker *sc,
UErrorCode *status);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
/**
* Check the specified string for possible security issues.
* The text to be checked will typically be an indentifier of some sort.
@ -701,7 +701,7 @@ uspoof_areConfusableUTF8(const USpoofChecker *sc,
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
/**
* Check the whether two specified strings are visually confusable.
* The types of confusability to be tested - single script, mixed script,
@ -812,7 +812,7 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc,
char *dest, int32_t destCapacity,
UErrorCode *status);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
/**
* Get the "skeleton" for an identifier string.
* Skeletons are a transformation of the input string;
@ -847,7 +847,7 @@ uspoof_getSkeletonUnicodeString(const USpoofChecker *sc,
const UnicodeString &s,
UnicodeString &dest,
UErrorCode *status);
#endif /* XP_CPLUSPLUS */
#endif /* U_SHOW_CPLUSPLUS_API */
/**

View file

@ -236,7 +236,7 @@ utrans_clone(const UTransliterator* trans,
U_STABLE void U_EXPORT2
utrans_close(UTransliterator* trans);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN

View file

@ -285,7 +285,7 @@ u_fstropen(UChar *stringBuf,
U_DRAFT void U_EXPORT2
u_fclose(UFILE *file);
#ifdef XP_CPLUSPLUS
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN