ICU 76.1 76.1
Loading...
Searching...
No Matches
uclean.h
Go to the documentation of this file.
1// © 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: UTF-8
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"
52U_CAPI void U_EXPORT2
54
55#ifndef U_HIDE_SYSTEM_API
101U_CAPI void U_EXPORT2
103
113typedef void *U_CALLCONV UMemAllocFn(const void *context, size_t size);
123typedef void *U_CALLCONV UMemReallocFn(const void *context, void *mem, size_t size);
133typedef void U_CALLCONV UMemFreeFn (const void *context, void *mem);
134
151U_CAPI void U_EXPORT2
153 UErrorCode *status);
154
156
157#ifndef U_HIDE_DEPRECATED_API
158/*********************************************************************************
159 *
160 * Deprecated Functions
161 *
162 * The following functions for user supplied mutexes are no longer supported.
163 * Any attempt to use them will return a U_UNSUPPORTED_ERROR.
164 *
165 **********************************************************************************/
166
174typedef void *UMTX;
175
193typedef void U_CALLCONV UMtxInitFn (const void *context, UMTX *mutex, UErrorCode* status);
194
195
205typedef void U_CALLCONV UMtxFn (const void *context, UMTX *mutex);
207
225U_DEPRECATED void U_EXPORT2
226u_setMutexFunctions(const void *context, UMtxInitFn *init, UMtxFn *destroy, UMtxFn *lock, UMtxFn *unlock,
227 UErrorCode *status);
228
229
238typedef int32_t U_CALLCONV UMtxAtomicFn(const void *context, int32_t *p);
239
255U_DEPRECATED void U_EXPORT2
257 UErrorCode *status);
258
259#endif /* U_HIDE_DEPRECATED_API */
260#endif /* U_HIDE_SYSTEM_API */
261
262#endif
#define U_CALLCONV
Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to ma...
Definition platform.h:846
#define U_CALLCONV_FPTR
Similar to U_CALLCONV, but only used on function pointers.
Definition platform.h:857
void UMemFreeFn(const void *context, void *mem)
Pointer type for a user supplied memory free function.
Definition uclean.h:133
void * UMemAllocFn(const void *context, size_t size)
Pointer type for a user supplied memory allocation function.
Definition uclean.h:113
U_CAPI void u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMemFreeFn *f, UErrorCode *status)
Set the functions that ICU will use for memory allocation.
int32_t UMtxAtomicFn(const void *context, int32_t *p)
Pointer type for a user supplied atomic increment or decrement function.
Definition uclean.h:238
void UMtxInitFn(const void *context, UMTX *mutex, UErrorCode *status)
Function Pointer type for a user supplied mutex initialization function.
Definition uclean.h:193
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.
void UMtxFn(const void *context, UMTX *mutex)
Function Pointer type for a user supplied mutex functions.
Definition uclean.h:205
void * UMemReallocFn(const void *context, void *mem, size_t size)
Pointer type for a user supplied memory re-allocation function.
Definition uclean.h:123
U_CAPI void u_cleanup(void)
Clean up the system resources, such as allocated memory or open files, used in all ICU libraries.
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_CAPI void u_init(UErrorCode *status)
Initialize ICU.
void * UMTX
An opaque pointer type that represents an ICU mutex.
Definition uclean.h:174
#define U_DEPRECATED
This is used to declare a function as a deprecated public ICU C API
Definition umachine.h:116
#define U_CDECL_END
This is used to end a declaration of a library private ICU C API.
Definition umachine.h:86
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition umachine.h:110
#define U_CDECL_BEGIN
This is used to begin a declaration of a library private ICU C API.
Definition umachine.h:85
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition utypes.h:430