summaryrefslogtreecommitdiff
path: root/Lib/csharp/csharp.swg
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2008-05-14 22:12:31 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2008-05-14 22:12:31 +0000
commit336b50b43ddf1f3c63ca5aaa6e1f596203de3d5d (patch)
treece108b5031e89a1d26e5b0275f76307d285b736d /Lib/csharp/csharp.swg
parented0e1c7d90c6a6839de44de302bc79e664e6f91c (diff)
downloadswig-336b50b43ddf1f3c63ca5aaa6e1f596203de3d5d.tar.gz
Add the optimal attribute to the out typemap for more optimal code generation when returning objects by value
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10450 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/csharp/csharp.swg')
-rw-r--r--Lib/csharp/csharp.swg2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/csharp/csharp.swg b/Lib/csharp/csharp.swg
index ed7d6fb3b..35e5c26d7 100644
--- a/Lib/csharp/csharp.swg
+++ b/Lib/csharp/csharp.swg
@@ -376,7 +376,7 @@ SWIGINTERN const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
%typemap(out) SWIGTYPE
#ifdef __cplusplus
-%{ $result = new $1_ltype(($1_ltype &)$1); %}
+%{ $result = new $1_ltype((const $1_ltype &)$1); %}
#else
{
$&1_ltype $1ptr = ($&1_ltype) malloc(sizeof($1_ltype));