mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-3946 Use U_EXPORT2 for operators
X-SVN-Rev: 16020
This commit is contained in:
parent
b7ae145f93
commit
a6432fd203
4 changed files with 12 additions and 12 deletions
|
@ -3079,7 +3079,7 @@ private:
|
|||
* @return UnicodeString(s1).append(s2)
|
||||
* @draft ICU 2.8
|
||||
*/
|
||||
U_COMMON_API UnicodeString
|
||||
U_COMMON_API UnicodeString U_EXPORT2
|
||||
operator+ (const UnicodeString &s1, const UnicodeString &s2);
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
|
|
@ -76,14 +76,14 @@ public:
|
|||
* for ICU4C C++ classes
|
||||
* @stable ICU 2.4
|
||||
*/
|
||||
static void *operator new(size_t size);
|
||||
static void * U_EXPORT2 operator new(size_t size);
|
||||
|
||||
/**
|
||||
* Override for ICU4C C++ memory management.
|
||||
* See new().
|
||||
* @stable ICU 2.4
|
||||
*/
|
||||
static void *operator new[](size_t size);
|
||||
static void * U_EXPORT2 operator new[](size_t size);
|
||||
|
||||
/**
|
||||
* Override for ICU4C C++ memory management.
|
||||
|
@ -93,14 +93,14 @@ public:
|
|||
* for ICU4C C++ classes
|
||||
* @stable ICU 2.4
|
||||
*/
|
||||
static void operator delete(void *p);
|
||||
static void U_EXPORT2 operator delete(void *p);
|
||||
|
||||
/**
|
||||
* Override for ICU4C C++ memory management.
|
||||
* See delete().
|
||||
* @stable ICU 2.4
|
||||
*/
|
||||
static void operator delete[](void *p);
|
||||
static void U_EXPORT2 operator delete[](void *p);
|
||||
|
||||
#if U_HAVE_PLACEMENT_NEW
|
||||
/**
|
||||
|
@ -108,14 +108,14 @@ public:
|
|||
* See new().
|
||||
* @draft ICU 2.6
|
||||
*/
|
||||
static inline void * operator new(size_t, void *ptr) { return ptr; }
|
||||
static inline void * U_EXPORT2 operator new(size_t, void *ptr) { return ptr; }
|
||||
|
||||
/**
|
||||
* Override for ICU4C C++ memory management for STL.
|
||||
* See delete().
|
||||
* @draft ICU 2.6
|
||||
*/
|
||||
static inline void operator delete(void *, void *) {}
|
||||
static inline void U_EXPORT2 operator delete(void *, void *) {}
|
||||
#endif /* U_HAVE_PLACEMENT_NEW */
|
||||
#endif /* U_OVERRIDE_CXX_ALLOCATION */
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ U_NAMESPACE_BEGIN
|
|||
Replaceable::~Replaceable() {}
|
||||
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UnicodeString)
|
||||
|
||||
UnicodeString
|
||||
UnicodeString U_EXPORT2
|
||||
operator+ (const UnicodeString &s1, const UnicodeString &s2) {
|
||||
return
|
||||
UnicodeString(s1.length()+s2.length()+1, (UChar32)0, 0).
|
||||
|
|
|
@ -56,21 +56,21 @@ U_NAMESPACE_BEGIN
|
|||
* and replace with uprv_malloc/uprv_free.
|
||||
*/
|
||||
|
||||
void *UMemory::operator new(size_t size) {
|
||||
void * U_EXPORT2 UMemory::operator new(size_t size) {
|
||||
return uprv_malloc(size);
|
||||
}
|
||||
|
||||
void UMemory::operator delete(void *p) {
|
||||
void U_EXPORT2 UMemory::operator delete(void *p) {
|
||||
if(p!=NULL) {
|
||||
uprv_free(p);
|
||||
}
|
||||
}
|
||||
|
||||
void *UMemory::operator new[](size_t size) {
|
||||
void * U_EXPORT2 UMemory::operator new[](size_t size) {
|
||||
return uprv_malloc(size);
|
||||
}
|
||||
|
||||
void UMemory::operator delete[](void *p) {
|
||||
void U_EXPORT2 UMemory::operator delete[](void *p) {
|
||||
if(p!=NULL) {
|
||||
uprv_free(p);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue