cplus_demangle 0.1.2

Rust wrapper for GNU libiberty's cplus_demangle to demangle C++ symbols
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <demangle.h>

char* cplus_demangle_wrapper(const char* mangled_name, int show_params, int show_ansi) {
  // This is a simple wrapper solely to allow using the demangle macros
  // DMGL_PARAMS and DMGL_ANSI.
  int options = DMGL_NO_OPTS;
  if (show_params) {
    options |= DMGL_PARAMS;
  }
  if (show_ansi) {
    options |= DMGL_ANSI;
  }
  return cplus_demangle(mangled_name, options);
}