From c5e02bf327ff6c06cb92f030671a84bdb564b735 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 29 Nov 2022 08:04:37 +0000 Subject: [PATCH] Ocaml name mangling fix Fixes testcase template_expr which was resulting in OCaml syntax errors. --- Source/Modules/ocaml.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Modules/ocaml.cxx b/Source/Modules/ocaml.cxx index 963a0c2d1..13889c93d 100644 --- a/Source/Modules/ocaml.cxx +++ b/Source/Modules/ocaml.cxx @@ -1181,6 +1181,7 @@ public: /* * Produce the symbol name that ocaml will use when referring to the * target item. I wonder if there's a better way to do this: + * (WF - use Swig_name_mangle_string/Swig_name_mangle_type) * * I shudder to think about doing it with a hash lookup, but that would * make a couple of things easier: @@ -1209,6 +1210,8 @@ public: Replaceall(out, "=", "_xx_equals"); Replaceall(out, "/", "_xx_slash"); Replaceall(out, ".", "_xx_dot"); + Replaceall(out, "?", "_xx_question"); + Replaceall(out, ":", "_xx_colon"); return out; }