mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-18 06:26:16 +00:00
Fix Mono compilation on Windows/Ming
(cherry picked from commit 83140541dc)
This commit is contained in:
@@ -63,7 +63,13 @@ struct ThreadLocalStorage::Impl {
|
||||
#endif
|
||||
}
|
||||
|
||||
Impl(void (*p_destr_callback_func)(void *)) {
|
||||
#ifdef WINDOWS_ENABLED
|
||||
#define _CALLBACK_FUNC_ __stdcall
|
||||
#else
|
||||
#define _CALLBACK_FUNC_
|
||||
#endif
|
||||
|
||||
Impl(void _CALLBACK_FUNC_ (*p_destr_callback_func)(void *)) {
|
||||
#ifdef WINDOWS_ENABLED
|
||||
dwFlsIndex = FlsAlloc(p_destr_callback_func);
|
||||
ERR_FAIL_COND(dwFlsIndex == FLS_OUT_OF_INDEXES);
|
||||
@@ -89,10 +95,12 @@ void ThreadLocalStorage::set_value(void *p_value) const {
|
||||
pimpl->set_value(p_value);
|
||||
}
|
||||
|
||||
void ThreadLocalStorage::alloc(void (*p_destr_callback)(void *)) {
|
||||
void ThreadLocalStorage::alloc(void _CALLBACK_FUNC_ (*p_destr_callback)(void *)) {
|
||||
pimpl = memnew(ThreadLocalStorage::Impl(p_destr_callback));
|
||||
}
|
||||
|
||||
#undef _CALLBACK_FUNC_
|
||||
|
||||
void ThreadLocalStorage::free() {
|
||||
memdelete(pimpl);
|
||||
pimpl = NULL;
|
||||
|
||||
Reference in New Issue
Block a user