Changeset View
Changeset View
Standalone View
Standalone View
include/runetype.h
Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | typedef struct { | ||||
void *__variable; /* Data which depends on the encoding */ | void *__variable; /* Data which depends on the encoding */ | ||||
int __variable_len; /* how long that data is */ | int __variable_len; /* how long that data is */ | ||||
} _RuneLocale; | } _RuneLocale; | ||||
#define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */ | #define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */ | ||||
__BEGIN_DECLS | __BEGIN_DECLS | ||||
extern const _RuneLocale _DefaultRuneLocale; | extern const _RuneLocale _DefaultRuneLocale; | ||||
extern const _RuneLocale *_CurrentRuneLocale; | extern const _RuneLocale *_CurrentRuneLocale; | ||||
#if defined(__NO_TLS) || defined(__RUNETYPE_INTERNAL) | #ifdef __RUNETYPE_INTERNAL | ||||
extern const _RuneLocale *__getCurrentRuneLocale(void); | extern const _RuneLocale *__getCurrentRuneLocale(void); | ||||
#else | #else | ||||
extern _Thread_local const _RuneLocale *_ThreadRuneLocale; | extern _Thread_local const _RuneLocale *_ThreadRuneLocale; | ||||
static __inline const _RuneLocale *__getCurrentRuneLocale(void) | static __inline const _RuneLocale *__getCurrentRuneLocale(void) | ||||
{ | { | ||||
if (_ThreadRuneLocale) | if (_ThreadRuneLocale) | ||||
return _ThreadRuneLocale; | return _ThreadRuneLocale; | ||||
return _CurrentRuneLocale; | return _CurrentRuneLocale; | ||||
} | } | ||||
#endif /* __NO_TLS || __RUNETYPE_INTERNAL */ | #endif /*__RUNETYPE_INTERNAL */ | ||||
#define _CurrentRuneLocale (__getCurrentRuneLocale()) | #define _CurrentRuneLocale (__getCurrentRuneLocale()) | ||||
__END_DECLS | __END_DECLS | ||||
#endif /* !_RUNETYPE_H_ */ | #endif /* !_RUNETYPE_H_ */ |