- char *mangledSymbol = (char*)malloc(tokenLength+1u);
- strncpy(mangledSymbol, startOfToken, tokenLength);
- mangledSymbol[tokenLength] = '\0';
-
- size_t size;
- int status;
- char* demangled=NULL;
- demangled = abi::__cxa_demangle( mangledSymbol, NULL, &size, &status );
- if( demangled != NULL )
- {
- result = demangled;
- free(demangled); // demangle() allocates returned string, so free it
- }
- else
+ char *mangledSymbol = reinterpret_cast< char* >( malloc( tokenLength + 1u ) );
+ if(mangledSymbol != NULL)