diff options
author | Marcelo Matus <mmatus@acms.arizona.edu> | 2005-10-24 14:59:05 +0000 |
---|---|---|
committer | Marcelo Matus <mmatus@acms.arizona.edu> | 2005-10-24 14:59:05 +0000 |
commit | 3c65cea431715a5942e729c510f3e02ac5c35e61 (patch) | |
tree | be33a88ec23740caf9c1b010ec268a0472868247 /Examples/test-suite/li_std_wstring.i | |
parent | 733d3388620de44c41d80d376eb9bf4cc955fee4 (diff) | |
download | swig-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.i | 75 |
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; +} + +%} + + |