Skip to content

Commit

Permalink
Fix namespaces and double definition of mapscriptPINVOKE
Browse files Browse the repository at this point in the history
  • Loading branch information
geographika committed Sep 30, 2018
1 parent c07a1c8 commit 70ba392
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mapscript/csharp/csmodule.i
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ static SWIG_CSharpByteArrayHelperCallback SWIG_csharp_bytearray_callback = NULL;
public delegate void SWIGByteArrayDelegate(System.IntPtr data, int size);
static SWIGByteArrayDelegate bytearrayDelegate = new SWIGByteArrayDelegate(CreateByteArray);

[System.Runtime.InteropServices.DllImport("$dllimport", System.Runtime.InteropServices.EntryPoint="SWIGRegisterByteArrayCallback_$module")]
[System.Runtime.InteropServices.DllImport("$dllimport", EntryPoint="SWIGRegisterByteArrayCallback_$module")]
public static extern void SWIGRegisterByteArrayCallback_mapscript(SWIGByteArrayDelegate bytearrayDelegate);

static void CreateByteArray(System.IntPtr data, int size)
Expand All @@ -393,7 +393,7 @@ static SWIG_CSharpByteArrayHelperCallback SWIG_csharp_bytearray_callback = NULL;
}
}
protected static SWIGByteArrayHelper bytearrayHelper = new SWIGByteArrayHelper();
[ThreadStatic]
[System.ThreadStatic]
private static byte[] arraybuffer;

internal static byte[] GetBytes()
Expand Down
6 changes: 3 additions & 3 deletions mapscript/csharp/swig_csharp_extensions.i
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

// Ensure the class is not marked BeforeFieldInit causing memory corruption with CLR4
%pragma(csharp) imclasscode=%{
static $imclassname() {
}
//static $imclassname() {
//}

public class UTF8Marshaler : System.Runtime.InteropServices.ICustomMarshaler {
static UTF8Marshaler static_instance;
Expand Down Expand Up @@ -276,7 +276,7 @@
protected static object ThisOwn_true() { return null; }
protected static object ThisOwn_false() { return the$moduleObject; }

[System.Runtime.InteropServices.DllImport("$dllimport", System.Runtime.InteropServices.EntryPoint="SetEnvironmentVariable")]
[System.Runtime.InteropServices.DllImport("$dllimport", EntryPoint="SetEnvironmentVariable")]
public static extern int SetEnvironmentVariable(string envstring);
%}

Expand Down

0 comments on commit 70ba392

Please sign in to comment.