summaryrefslogtreecommitdiff
path: root/Lib/tcl/std_wstring.i
diff options
context:
space:
mode:
authorMarcelo Matus <mmatus@acms.arizona.edu>2005-10-18 13:24:15 +0000
committerMarcelo Matus <mmatus@acms.arizona.edu>2005-10-18 13:24:15 +0000
commit7e5e4fd1f9c8adfcd0eb1328e35143e110e115ff (patch)
treec9290832aaa1a42f5bcb6dd14ffaf82ed584ddca /Lib/tcl/std_wstring.i
parent5bbd841acc554b9e3d1ec33d604e825197ae6e0c (diff)
downloadswig-7e5e4fd1f9c8adfcd0eb1328e35143e110e115ff.tar.gz
massive typemap unification
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7676 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/tcl/std_wstring.i')
-rw-r--r--Lib/tcl/std_wstring.i37
1 files changed, 37 insertions, 0 deletions
diff --git a/Lib/tcl/std_wstring.i b/Lib/tcl/std_wstring.i
new file mode 100644
index 000000000..39fa92c8b
--- /dev/null
+++ b/Lib/tcl/std_wstring.i
@@ -0,0 +1,37 @@
+//
+// std::wstring
+//
+
+#ifndef SWIG_STD_BASIC_STRING
+#define SWIG_STD_WSTRING
+
+%{
+#include <string>
+%}
+
+namespace std
+{
+ class wstring;
+}
+
+%include <typemaps/std_string.i>
+%include <tclwstrings.swg>
+
+%fragment("Tcl_std_wstring_asptr","header",fragment="SWIG_AsCharPtrAndSize") {
+%tcl_asptr_decl(std::wstring)
+}
+%fragment("Tcl_std_wstring_asval","header",fragment="Tcl_std_wstring_asptr") {
+%tcl_asptr_decl(std::wstring)
+}
+
+%std_string_asptr_frag(std::wstring, wchar_t, SWIG_AsCharPtrAndSize, "Tcl_std_wstring_asptr")
+%std_string_asval_frag(std::wstring, "Tcl_std_wstring_asval")
+%std_string_from(std::wstring, SWIG_FromCharPtrAndSize)
+
+%typemap_asptrfromn(SWIG_CCode(UNISTRING), std::wstring);
+
+#else
+
+%include <std/std_string.i>
+
+#endif