Visual Studio 2013 Compatibility

This commit is contained in:
dalkon
2013-11-12 13:47:53 +01:00
committed by Eduardo Bart
parent d3e97d33c7
commit c9597d6682
11 changed files with 67 additions and 18 deletions

View File

@@ -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
}
}