summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-11-29 08:04:37 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-11-29 08:04:37 +0000
commitc5e02bf327ff6c06cb92f030671a84bdb564b735 (patch)
treea45b7602b7363cf262f44a591e544cd06410dfec /Source
parentacf040c3fe5bd719c97ee3cbba171895c4b7da14 (diff)
downloadswig-c5e02bf327ff6c06cb92f030671a84bdb564b735.tar.gz
Ocaml name mangling fix
Fixes testcase template_expr which was resulting in OCaml syntax errors.
Diffstat (limited to 'Source')
-rw-r--r--Source/Modules/ocaml.cxx3
1 files changed, 3 insertions, 0 deletions
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;
}