summaryrefslogtreecommitdiff
path: root/Lib/php
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-07-03 13:58:26 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-07-04 11:19:29 +0100
commit71cd6a38fe539a89dc2ee159c6d54017fd4e90a0 (patch)
tree4f7ab68006694285eafcfd5775d940310093f007 /Lib/php
parente75095e6c56ac45aba7aaafb4c732e1f1c675591 (diff)
downloadswig-71cd6a38fe539a89dc2ee159c6d54017fd4e90a0.tar.gz
Performance optimisation for directors for classes passed by value
The directorin typemaps in the director methods now use std::move on the input parameter when copying the object from the stack to the heap prior to the callback into the target language, thereby taking advantage of move semantics if available.
Diffstat (limited to 'Lib/php')
-rw-r--r--Lib/php/php.swg2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/php/php.swg b/Lib/php/php.swg
index 7d6d5f29d..c2442d24b 100644
--- a/Lib/php/php.swg
+++ b/Lib/php/php.swg
@@ -454,7 +454,7 @@
%typemap(directorin) SWIGTYPE
%{
ZVAL_UNDEF($input);
- SWIG_SetPointerZval($input, SWIG_as_voidptr(new $1_ltype((const $1_ltype &)$1)), $&1_descriptor, 1);
+ SWIG_SetPointerZval($input, SWIG_as_voidptr(new $1_ltype(SWIG_STD_MOVE($1))), $&1_descriptor, 1);
%}
%typemap(out, phptype="void") void "";