少年修仙传客户端基础资源
hch
2024-04-01 d01413b00ef631ac20347716b23818b0b811f65f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "il2cpp-config.h"
 
#include "os/Error.h"
#include "os/ThreadLocalValue.h"
 
// Note: for now the implementation is not platform depentent.
 
namespace il2cpp
{
namespace os
{
    static ThreadLocalValue s_LastError;
 
    ErrorCode Error::GetLastError()
    {
        void* value = 0;
 
        s_LastError.GetValue(&value);
 
        return (ErrorCode)(int64_t)value;
    }
 
    void Error::SetLastError(ErrorCode code)
    {
        s_LastError.SetValue((void*)((int64_t)code));
    }
}
}