From c1f6192fafe40c342ee943490091143218918eb5 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 31 Oct 2006 22:06:52 +0000 Subject: [PATCH] more nopgcpp tests (for const methods) git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9498 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- .../Examples/test-suite/java_typemaps_proxy.i | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/SWIG/Examples/test-suite/java_typemaps_proxy.i b/SWIG/Examples/test-suite/java_typemaps_proxy.i index 3c6559f13..a15361bc9 100644 --- a/SWIG/Examples/test-suite/java_typemaps_proxy.i +++ b/SWIG/Examples/test-suite/java_typemaps_proxy.i @@ -93,10 +93,12 @@ namespace NS { %inline %{ struct Without { - Without(Without *p) {} + Without(Without *p) : var(0) {} static void static_method(Without *p) {} void member_method(Without *p) {} + Without *var; }; +Without *global_without = 0; void global_method_without(Without *p) {} struct With { With(With *p) {} @@ -106,3 +108,19 @@ struct With { void global_method_with(With *p) {} %} +%typemap(jtype, nopgcpp="1") const ConstWithout * "long"; +%inline %{ +class ConstWithout { +public: + ConstWithout(const ConstWithout *p) : const_var(0), var_const(0) {} + static void static_method(const ConstWithout *p) {} + void member_method(const ConstWithout *p) {} + void const_member_method(const ConstWithout *p) const {} + const ConstWithout * const_var; + const ConstWithout * const var_const; +}; +const ConstWithout * global_constwithout = 0; +void global_method_constwithout(const ConstWithout *p) {} +%} + +