mirror of
https://github.com/edubart/otclient.git
synced 2026-01-21 04:16:23 +01:00
Visual Studio 2013 Compatibility
This commit is contained in:
@@ -22,14 +22,24 @@
|
||||
|
||||
#include "demangle.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <windows.h>
|
||||
#include <dbghelp.h>
|
||||
#else
|
||||
#include <cxxabi.h>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
namespace stdext {
|
||||
|
||||
const char* demangle_name(const char* name)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
static char buffer[1024];
|
||||
UnDecorateSymbolName(name, buffer, sizeof(buffer), UNDNAME_COMPLETE);
|
||||
return &buffer[6];
|
||||
#else
|
||||
size_t len;
|
||||
int status;
|
||||
static char buffer[1024];
|
||||
@@ -39,6 +49,7 @@ const char* demangle_name(const char* name)
|
||||
free(demangled);
|
||||
}
|
||||
return buffer;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user