aboutsummaryrefslogtreecommitdiff
path: root/Lib/csharp/wchar.i
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2013-11-09 11:32:50 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2013-11-09 11:32:50 +0000
commitc7b5316912df44db7e728cd66ba030a0502b737b (patch)
treea27036b846780660eff53df4c17d6908ddd0d73a /Lib/csharp/wchar.i
parentd73f04e925e9210f2c688ef3656e6059eb540565 (diff)
parent5f53503b7d7fa62a351edc7d3d579d69c55c9952 (diff)
downloadswig-c7b5316912df44db7e728cd66ba030a0502b737b.tar.gz
Merge branch 'master' of https://github.com/BrantKyser/swig
- Remove using directives from the generated C# code and fully qualify the use of all .NET framework types in order to minimize potential name collisions from input files defining types, namespace, etc with the same name as .NET framework members. - Globally qualify the use of .NET framework types in the System namespace - Remove .NET 1.1 support, .NET 2 is the minimum for the C# module Closes #79 * 'master' of https://github.com/BrantKyser/swig: Correct spelling of compatibility. Update documentation to reflect fully qualifying the use of .NET types in the generated code. Add support for SWIG2_CSHARP macro to create SWIG 2 backwards compatability mode. Remove using directives from the generated C# code and fully qualify the use of all .NET framework types in order to minimize potential name collisions from input files defining types, namespace, etc with the same name as .NET framework members. Since SWIG 3.0 removes support for .NET 1.1, cleanup the C# library by removing the use of the SWIG_DOTNET_1 macro. Globablly qualify the use of types from the .NET framework's System namespace in the C# module and library. Add test case to demonstrate the name collision that occurs in the generated C# code when a namespace is named System.
Diffstat (limited to 'Lib/csharp/wchar.i')
-rw-r--r--Lib/csharp/wchar.i12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/csharp/wchar.i b/Lib/csharp/wchar.i
index 1d95edded..9361edf6f 100644
--- a/Lib/csharp/wchar.i
+++ b/Lib/csharp/wchar.i
@@ -20,14 +20,14 @@ static SWIG_CSharpWStringHelperCallback SWIG_csharp_wstring_callback = NULL;
%pragma(csharp) imclasscode=%{
protected class SWIGWStringHelper {
- public delegate string SWIGWStringDelegate(IntPtr message);
+ public delegate string SWIGWStringDelegate(global::System.IntPtr message);
static SWIGWStringDelegate wstringDelegate = new SWIGWStringDelegate(CreateWString);
- [DllImport("$dllimport", EntryPoint="SWIGRegisterWStringCallback_$module")]
+ [global::System.Runtime.InteropServices.DllImport("$dllimport", EntryPoint="SWIGRegisterWStringCallback_$module")]
public static extern void SWIGRegisterWStringCallback_$module(SWIGWStringDelegate wstringDelegate);
- static string CreateWString([MarshalAs(UnmanagedType.LPWStr)]IntPtr cString) {
- return System.Runtime.InteropServices.Marshal.PtrToStringUni(cString);
+ static string CreateWString([global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]global::System.IntPtr cString) {
+ return global::System.Runtime.InteropServices.Marshal.PtrToStringUni(cString);
}
static SWIGWStringHelper() {
@@ -77,12 +77,12 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterWStringCallback_$module(SWIG_CSharpWStri
// wchar_t *
%typemap(ctype) wchar_t * "wchar_t *"
-%typemap(imtype, inattributes="[MarshalAs(UnmanagedType.LPWStr)]", out="IntPtr" ) wchar_t * "string"
+%typemap(imtype, inattributes="[global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPWStr)]", out="global::System.IntPtr" ) wchar_t * "string"
%typemap(cstype) wchar_t * "string"
%typemap(csin) wchar_t * "$csinput"
%typemap(csout, excode=SWIGEXCODE) wchar_t * {
- string ret = System.Runtime.InteropServices.Marshal.PtrToStringUni($imcall);$excode
+ string ret = global::System.Runtime.InteropServices.Marshal.PtrToStringUni($imcall);$excode
return ret;
}
%typemap(csvarin, excode=SWIGEXCODE2) wchar_t * %{