summaryrefslogtreecommitdiff
path: root/Examples/test-suite/li_std_wstring.i
diff options
context:
space:
mode:
authorMarcelo Matus <mmatus@acms.arizona.edu>2005-10-24 14:59:05 +0000
committerMarcelo Matus <mmatus@acms.arizona.edu>2005-10-24 14:59:05 +0000
commit3c65cea431715a5942e729c510f3e02ac5c35e61 (patch)
treebe33a88ec23740caf9c1b010ec268a0472868247 /Examples/test-suite/li_std_wstring.i
parent733d3388620de44c41d80d376eb9bf4cc955fee4 (diff)
downloadswig-3c65cea431715a5942e729c510f3e02ac5c35e61.tar.gz
Perl added to the Unified typemap library, cleaner way to use the library, and 'normalized' macro names
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7707 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite/li_std_wstring.i')
-rw-r--r--Examples/test-suite/li_std_wstring.i75
1 files changed, 75 insertions, 0 deletions
diff --git a/Examples/test-suite/li_std_wstring.i b/Examples/test-suite/li_std_wstring.i
new file mode 100644
index 000000000..906b62b25
--- /dev/null
+++ b/Examples/test-suite/li_std_wstring.i
@@ -0,0 +1,75 @@
+%module li_std_wstring
+%include <std_wstring.i>
+
+
+%inline %{
+
+typedef std::wstring A;
+
+struct B
+{
+ B(const std::wstring& s) : cname(0), name(s), a(s)
+ {
+ }
+
+ char *cname;
+ std::wstring name;
+ A a;
+
+};
+
+
+wchar_t test_wcvalue(wchar_t x) {
+ return x;
+}
+
+const wchar_t* test_ccvalue(const wchar_t* x) {
+ return x;
+}
+
+wchar_t* test_cvalue(wchar_t* x) {
+ return x;
+}
+
+
+std::wstring test_value(std::wstring x) {
+ return x;
+}
+
+const std::wstring& test_const_reference(const std::wstring &x) {
+ return x;
+}
+
+void test_pointer(std::wstring *x) {
+}
+
+std::wstring *test_pointer_out() {
+ static std::wstring x = L"x";
+ return &x;
+}
+
+void test_const_pointer(const std::wstring *x) {
+}
+
+const std::wstring *test_const_pointer_out() {
+ static std::wstring x = L"x";
+ return &x;
+}
+
+void test_reference(std::wstring &x) {
+}
+
+std::wstring& test_reference_out() {
+ static std::wstring x = L"x";
+ return x;
+}
+
+void test_throw() throw(std::wstring){
+ static std::wstring x = L"x";
+
+ throw x;
+}
+
+%}
+
+