diff --git a/Lib/csharp/csharp.swg b/Lib/csharp/csharp.swg index 6ef2d188c..9141f1971 100644 --- a/Lib/csharp/csharp.swg +++ b/Lib/csharp/csharp.swg @@ -841,6 +841,7 @@ using System.Runtime.InteropServices; /* Some ANSI C typemaps */ %apply unsigned long { size_t }; +%apply const unsigned long & { const size_t & }; /* csharp keywords */ %include diff --git a/Lib/csharp/std_common.i b/Lib/csharp/std_common.i index 77044703a..cee11e8ca 100644 --- a/Lib/csharp/std_common.i +++ b/Lib/csharp/std_common.i @@ -1,4 +1,5 @@ %include %apply size_t { std::size_t }; +%apply const size_t& { const std::size_t& }; diff --git a/Lib/java/java.swg b/Lib/java/java.swg index 5d0dccc62..af76e11b4 100644 --- a/Lib/java/java.swg +++ b/Lib/java/java.swg @@ -1185,6 +1185,7 @@ SWIG_PROXY_CONSTRUCTOR(true, true, SWIGTYPE) /* Some ANSI C typemaps */ %apply unsigned long { size_t }; +%apply const unsigned long & { const size_t & }; /* java keywords */ %include diff --git a/Lib/java/std_common.i b/Lib/java/std_common.i index 77044703a..cee11e8ca 100644 --- a/Lib/java/std_common.i +++ b/Lib/java/std_common.i @@ -1,4 +1,5 @@ %include %apply size_t { std::size_t }; +%apply const size_t& { const std::size_t& };