Lines Matching refs:sym
15 ocaml_is_mangled(const char *sym)
17 return 0 == strncmp(sym, caml_prefix, caml_prefix_len)
18 && isupper(sym[caml_prefix_len]);
23 * sym: a symbol which may have been mangled by the OCaml compiler
29 ocaml_demangle_sym(const char *sym)
36 if (!ocaml_is_mangled(sym)) {
40 len = strlen(sym);
51 if (sym[i] == '_' && sym[i + 1] == '_') {
56 else if (sym[i] == '$' && isxdigit(sym[i + 1]) && isxdigit(sym[i + 2])) {
58 result[j++] = (hex(sym[i + 1]) << 4) | hex(sym[i + 2]);
62 result[j++] = sym[i++];