summaryrefslogtreecommitdiff
path: root/Examples/ocaml
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2023-04-21 09:38:15 +1200
committerOlly Betts <olly@survex.com>2023-04-21 09:39:59 +1200
commit27f964987ac68c72453ca189831287511f07a5be (patch)
treecdf56fdaf61acc04f3462be2b1fe0a1e8f572f42 /Examples/ocaml
parentc4f1975f9e81c47cdc724fc60b76029c668bdd79 (diff)
downloadswig-27f964987ac68c72453ca189831287511f07a5be.tar.gz
[OCaml] Fix reference typemaps for std::string
Fix warnings in the extend_template_method, li_std_string, and template_methods tests. std::string was missing a typecheck typemap. Add extend_template_method_runme.ml, li_std_string_runme.ml, and template_methods_runme.ml. Add INPUT, OUTPUT and INOUT typemaps for string & Use the INOUT typemap in the strings_test example. In the strings_test example, takes_and_gives_std_string() was relying on the silly fact that an argout typemap for string & was enabled by default. Remove the in, out, and typecheck typemaps for string &. Closes: #1439
Diffstat (limited to 'Examples/ocaml')
-rw-r--r--Examples/ocaml/strings_test/example.i1
1 files changed, 1 insertions, 0 deletions
diff --git a/Examples/ocaml/strings_test/example.i b/Examples/ocaml/strings_test/example.i
index d360715c1..e0697b061 100644
--- a/Examples/ocaml/strings_test/example.i
+++ b/Examples/ocaml/strings_test/example.i
@@ -12,4 +12,5 @@ using std::string;
%}
%include "std_string.i"
+%apply std::string& INOUT { std::string &inout }
%include example.h