2011-11-22 19:55:39 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2011, Oliver Tappe, zooey@hirschkaefer.de.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _ICU_THREAD_LOCAL_STORAGE_VALUE_H
|
|
|
|
#define _ICU_THREAD_LOCAL_STORAGE_VALUE_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <pthread.h>
|
|
|
|
|
2011-12-15 16:10:26 +04:00
|
|
|
#include <unicode/ucnv.h>
|
|
|
|
|
2011-11-22 19:55:39 +04:00
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace BPrivate {
|
|
|
|
namespace Libroot {
|
|
|
|
|
|
|
|
|
|
|
|
struct ICUThreadLocalStorageValue {
|
2011-12-15 16:10:26 +04:00
|
|
|
UConverter* converter;
|
|
|
|
char charset[64];
|
2011-11-22 19:55:39 +04:00
|
|
|
|
|
|
|
ICUThreadLocalStorageValue();
|
|
|
|
~ICUThreadLocalStorageValue();
|
|
|
|
|
|
|
|
static status_t GetInstanceForKey(pthread_key_t tlsKey,
|
|
|
|
ICUThreadLocalStorageValue*& instanceOut);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace Libroot
|
|
|
|
} // namespace BPrivate
|
|
|
|
|
|
|
|
|
|
|
|
#endif // _ICU_THREAD_LOCAL_STORAGE_VALUE_H
|