ICU 58.2 58.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

uclean.h
Go to the documentation of this file.
1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 ******************************************************************************
5 * Copyright (C) 2001-2014, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 ******************************************************************************
8 * file name: uclean.h
9 * encoding: US-ASCII
10 * tab size: 8 (not used)
11 * indentation:4
12 *
13 * created on: 2001July05
14 * created by: George Rhoten
15 */
16
17 #ifndef __UCLEAN_H__
18 #define __UCLEAN_H__
19
20 #include "unicode/utypes.h"
52 U_STABLE void U_EXPORT2
53 u_init(UErrorCode *status);
54
55 #ifndef U_HIDE_SYSTEM_API
56
101 U_STABLE void U_EXPORT2
102 u_cleanup(void);
103
104
113 typedef void *U_CALLCONV UMemAllocFn(const void *context, size_t size);
122 typedef void *U_CALLCONV UMemReallocFn(const void *context, void *mem, size_t size);
133 typedef void U_CALLCONV UMemFreeFn (const void *context, void *mem);
134
151 U_STABLE void U_EXPORT2
152 u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMemFreeFn *f,
153 UErrorCode *status);
154
155
156 #ifndef U_HIDE_DEPRECATED_API
157 /*********************************************************************************
158 *
159 * Deprecated Functions
160 *
161 * The following functions for user supplied mutexes are no longer supported.
162 * Any attempt to use them will return a U_UNSUPPORTED_ERROR.
163 *
164 **********************************************************************************/
165
173 typedef void *UMTX;
174
191 typedef void U_CALLCONV UMtxInitFn (const void *context, UMTX *mutex, UErrorCode* status);
192
193
203 typedef void U_CALLCONV UMtxFn (const void *context, UMTX *mutex);
204
205
223 U_DEPRECATED void U_EXPORT2
224 u_setMutexFunctions(const void *context, UMtxInitFn *init, UMtxFn *destroy, UMtxFn *lock, UMtxFn *unlock,
225 UErrorCode *status);
226
227
236 typedef int32_t U_CALLCONV UMtxAtomicFn(const void *context, int32_t *p);
237
253 U_DEPRECATED void U_EXPORT2
254 u_setAtomicIncDecFunctions(const void *context, UMtxAtomicFn *inc, UMtxAtomicFn *dec,
255 UErrorCode *status);
256
257 #endif /* U_HIDE_DEPRECATED_API */
258 #endif /* U_HIDE_SYSTEM_API */
259
260 #endif
UMemReallocFn
void * UMemReallocFn(const void *context, void *mem, size_t size)
Pointer type for a user supplied memory re-allocation function.
Definition: uclean.h:122
UMemAllocFn
void * UMemAllocFn(const void *context, size_t size)
Pointer type for a user supplied memory allocation function.
Definition: uclean.h:113
U_CALLCONV
#define U_CALLCONV
Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to ma...
Definition: platform.h:857
u_setAtomicIncDecFunctions
void u_setAtomicIncDecFunctions(const void *context, UMtxAtomicFn *inc, UMtxAtomicFn *dec, UErrorCode *status)
Set the functions that ICU will use for atomic increment and decrement of int32_t values...
U_DEPRECATED
#define U_DEPRECATED
This is used to declare a function as a deprecated public ICU C API.
Definition: umachine.h:138
u_setMutexFunctions
void u_setMutexFunctions(const void *context, UMtxInitFn *init, UMtxFn *destroy, UMtxFn *lock, UMtxFn *unlock, UErrorCode *status)
Set the functions that ICU will use for mutex operations Use of this function is optional; by default...
u_cleanup
void u_cleanup(void)
Clean up the system resources, such as allocated memory or open files, used in all ICU libraries...
UMtxFn
void UMtxFn(const void *context, UMTX *mutex)
Function Pointer type for a user supplied mutex functions.
Definition: uclean.h:203
UMtxAtomicFn
int32_t UMtxAtomicFn(const void *context, int32_t *p)
Pointer type for a user supplied atomic increment or decrement function.
Definition: uclean.h:236
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:396
UMemFreeFn
void UMemFreeFn(const void *context, void *mem)
Pointer type for a user supplied memory free function.
Definition: uclean.h:133
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
u_setMemoryFunctions
void u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMemFreeFn *f, UErrorCode *status)
Set the functions that ICU will use for memory allocation.
u_init
void u_init(UErrorCode *status)
Initialize ICU.
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:134
UMTX
void * UMTX
An opaque pointer type that represents an ICU mutex.
Definition: uclean.h:173
UMtxInitFn
void UMtxInitFn(const void *context, UMTX *mutex, UErrorCode *status)
Function Pointer type for a user supplied mutex initialization function.
Definition: uclean.h:191