summaryrefslogtreecommitdiff
path: root/Lib/r
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-10-27 00:14:50 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-11-05 08:40:26 +0000
commitd6d83f4df4a76e98dfa872679c2466fc59fd9d5a (patch)
treeeeed3da0e60b6f461cf43417887b35709cc8aefb /Lib/r
parentf2da4f2aded709e114bf8a4a1a3791f830a06681 (diff)
downloadswig-d6d83f4df4a76e98dfa872679c2466fc59fd9d5a.tar.gz
Overloading fixes for R and rtypecheck typemap
- Fix for special variable $argtype expansion in rtypecheck typemap. - Remove unnecessary () brackets when using rtypecheck typemap for single parameter functions. - Add rtypecheck typemaps for shared_ptr so that NULL can be used in overloaded functions taking shared_ptr.
Diffstat (limited to 'Lib/r')
-rw-r--r--Lib/r/boost_shared_ptr.i6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/r/boost_shared_ptr.i b/Lib/r/boost_shared_ptr.i
index 13f041fbb..fde6ae56b 100644
--- a/Lib/r/boost_shared_ptr.i
+++ b/Lib/r/boost_shared_ptr.i
@@ -400,6 +400,12 @@
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *&
"$typemap(rtype, TYPE)"
+%typemap(rtypecheck) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >,
+ SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > &,
+ SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *,
+ SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *&
+ "(extends($argtype, '$typemap(rtype, TYPE)') && length($arg) == 1) || is.null($arg)"
+
%typemap(scoercein) SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE >,
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > &,
SWIG_SHARED_PTR_QNAMESPACE::shared_ptr< CONST TYPE > *,