summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Andersson <j.a.e.andersson@gmail.com>2016-07-05 13:17:38 -0500
committerJoel Andersson <j.a.e.andersson@gmail.com>2016-07-05 17:25:49 -0500
commitabe6b9992c456d0569c0d7819b3e54bf4761f67b (patch)
treeb2dbd231d07c25a4518b54e1271306405e3f5542
parentff091e9342f631236762c98f9d48e9bbf03cd482 (diff)
downloadswig-abe6b9992c456d0569c0d7819b3e54bf4761f67b.tar.gz
Issue #67 nested_structs.i
-rw-r--r--Examples/test-suite/nested_structs.i8
1 files changed, 6 insertions, 2 deletions
diff --git a/Examples/test-suite/nested_structs.i b/Examples/test-suite/nested_structs.i
index f4f7a275a..207552529 100644
--- a/Examples/test-suite/nested_structs.i
+++ b/Examples/test-suite/nested_structs.i
@@ -1,5 +1,10 @@
%module nested_structs
+/* MATLAB/Octave not (always) case sensitive */
+#ifdef SWIGMATLAB
+%rename(outer_) outer;
+#endif
+
// bug #491476
%inline %{
struct Outer {
@@ -29,7 +34,7 @@ void setValues(struct Outer *outer, int val) {
int getInside1Val(struct Outer *n) { return n->inside1.val; }
%}
-/*
+/*
Below was causing problems in Octave as wrappers were compiled as C++.
Solution requires regenerating the inner struct into
the global C++ namespace (which is where it is intended to be in C).
@@ -43,4 +48,3 @@ int nestedByPtr(struct Named *s);
int nestedByVal(struct Named s) { return s.val; }
int nestedByPtr(struct Named *s) { return s->val; }
%}
-