Skip to content

Commit

Permalink
use int64 to represent c#/c ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Aug 26, 2011
1 parent a920d11 commit d8986e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/interfaces/csharp_modular/swig_typemaps.i
Expand Up @@ -67,7 +67,7 @@

CSHARPTYPE[] ret = new CSHARPTYPE[len];

Marshal.Copy(new IntPtr(ptr.ToInt32() + Marshal.SizeOf(typeof(int))), ret, 0, len);
Marshal.Copy(new IntPtr(ptr.ToInt64() + Marshal.SizeOf(typeof(int))), ret, 0, len);
return ret;
}
%enddef
Expand Down Expand Up @@ -151,7 +151,7 @@ TYPEMAP_SGVECTOR(float64_t, double, double)

CSHARPTYPE[] ret = new CSHARPTYPE[len];

Marshal.Copy(new IntPtr(ptr.ToInt32() + 2 * Marshal.SizeOf(typeof(int))), ret, 0, len);
Marshal.Copy(new IntPtr(ptr.ToInt64() + 2 * Marshal.SizeOf(typeof(int))), ret, 0, len);

CSHARPTYPE[,] result = new CSHARPTYPE[rows, cols];
for (int i = 0; i < rows; i++) {
Expand Down Expand Up @@ -252,7 +252,7 @@ TYPEMAP_SGMATRIX(float64_t, double, double)

CSHARPTYPE[] ret = new CSHARPTYPE[len];

Marshal.Copy(new IntPtr(ptr.ToInt32() + 2 * Marshal.SizeOf(typeof(CSHARPTYPE))), ret, 0, len);
Marshal.Copy(new IntPtr(ptr.ToInt64() + 2 * Marshal.SizeOf(typeof(CSHARPTYPE))), ret, 0, len);

CSHARPTYPE[,] result = new CSHARPTYPE[rows, cols];
for (int i = 0; i < rows; i++) {
Expand Down

0 comments on commit d8986e9

Please sign in to comment.