Loading...
Searching...
No Matches
uclean.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
* Copyright (C) 2001-2014, International Business Machines
* Corporation and others. All Rights Reserved.
******************************************************************************
* file name: uclean.h
* encoding: UTF-8
* tab size: 8 (not used)
* indentation:4
*
* created on: 2001July05
* created by: George Rhoten
*/
#ifndef __UCLEAN_H__
#define __UCLEAN_H__
#include "unicode/utypes.h"
U_CAPI void U_EXPORT2
u_init(UErrorCode *status);
#ifndef U_HIDE_SYSTEM_API
U_CAPI void U_EXPORT2
u_cleanup(void);
U_CDECL_BEGIN
typedef void *U_CALLCONV UMemAllocFn(const void *context, size_t size);
typedef void *U_CALLCONV UMemReallocFn(const void *context, void *mem, size_t size);
typedef void U_CALLCONV UMemFreeFn (const void *context, void *mem);
U_CAPI void U_EXPORT2
u_setMemoryFunctions(const void *context, UMemAllocFn * U_CALLCONV_FPTR a, UMemReallocFn * U_CALLCONV_FPTR r, UMemFreeFn * U_CALLCONV_FPTR f,
UErrorCode *status);
U_CDECL_END
#ifndef U_HIDE_DEPRECATED_API
/*********************************************************************************
*
* Deprecated Functions
*
* The following functions for user supplied mutexes are no longer supported.
* Any attempt to use them will return a U_UNSUPPORTED_ERROR.
*
**********************************************************************************/
typedef void *UMTX;
U_CDECL_BEGIN
typedef void U_CALLCONV UMtxInitFn (const void *context, UMTX *mutex, UErrorCode* status);
typedef void U_CALLCONV UMtxFn (const void *context, UMTX *mutex);
U_CDECL_END
U_DEPRECATED void U_EXPORT2
u_setMutexFunctions(const void *context, UMtxInitFn *init, UMtxFn *destroy, UMtxFn *lock, UMtxFn *unlock,
UErrorCode *status);
typedef int32_t U_CALLCONV UMtxAtomicFn(const void *context, int32_t *p);
U_DEPRECATED void U_EXPORT2
u_setAtomicIncDecFunctions(const void *context, UMtxAtomicFn *inc, UMtxAtomicFn *dec,
UErrorCode *status);
#endif /* U_HIDE_DEPRECATED_API */
#endif /* U_HIDE_SYSTEM_API */
#endif
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:836
U_CALLCONV_FPTR
#define U_CALLCONV_FPTR
Similar to U_CALLCONV, but only used on function pointers.
Definition platform.h:847
UMemFreeFn
void UMemFreeFn(const void *context, void *mem)
Pointer type for a user supplied memory free function.
Definition uclean.h:133
UMemAllocFn
void * UMemAllocFn(const void *context, size_t size)
Pointer type for a user supplied memory allocation function.
Definition uclean.h:113
u_setMemoryFunctions
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.
UMtxAtomicFn
int32_t UMtxAtomicFn(const void *context, int32_t *p)
Pointer type for a user supplied atomic increment or decrement function.
Definition uclean.h:238
UMtxInitFn
void UMtxInitFn(const void *context, UMTX *mutex, UErrorCode *status)
Function Pointer type for a user supplied mutex initialization function.
Definition uclean.h:193
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.
UMtxFn
void UMtxFn(const void *context, UMTX *mutex)
Function Pointer type for a user supplied mutex functions.
Definition uclean.h:205
UMemReallocFn
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_cleanup
U_CAPI void u_cleanup(void)
Clean up the system resources, such as allocated memory or open files, used in all ICU libraries.
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_init
U_CAPI void u_init(UErrorCode *status)
Initialize ICU.
UMTX
void * UMTX
An opaque pointer type that represents an ICU mutex.
Definition uclean.h:174
U_DEPRECATED
#define U_DEPRECATED
This is used to declare a function as a deprecated public ICU C API.
Definition umachine.h:116
U_CDECL_END
#define U_CDECL_END
This is used to end a declaration of a library private ICU C API.
Definition umachine.h:86
U_CAPI
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition umachine.h:110
U_CDECL_BEGIN
#define U_CDECL_BEGIN
This is used to begin a declaration of a library private ICU C API.
Definition umachine.h:85
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition utypes.h:509