summaryrefslogtreecommitdiff
path: root/Lib/java
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-09-17 10:23:51 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-09-17 10:23:51 +0100
commite97181ebc07a4755c1ab3e6f08eef12a3f9de07e (patch)
tree16dc71ce60c3a97a93976af5fdd5e86482aaa8c1 /Lib/java
parentf0af17b3244d98109a62e3fda5ab6e5fc458283d (diff)
downloadswig-e97181ebc07a4755c1ab3e6f08eef12a3f9de07e.tar.gz
Add missing typecheck typemaps for std::auto_ptr and std::unique_ptr
To fix overloading when using these types.
Diffstat (limited to 'Lib/java')
-rw-r--r--Lib/java/std_auto_ptr.i2
-rw-r--r--Lib/java/std_unique_ptr.i2
2 files changed, 4 insertions, 0 deletions
diff --git a/Lib/java/std_auto_ptr.i b/Lib/java/std_auto_ptr.i
index 6d65f0451..aee9b4828 100644
--- a/Lib/java/std_auto_ptr.i
+++ b/Lib/java/std_auto_ptr.i
@@ -31,6 +31,8 @@
return (cPtr == 0) ? null : new $typemap(jstype, TYPE)(cPtr, true);
}
+%typemap(typecheck, precedence=SWIG_TYPECHECK_POINTER, equivalent="TYPE *") std::auto_ptr< TYPE > ""
+
%template() std::auto_ptr< TYPE >;
%enddef
diff --git a/Lib/java/std_unique_ptr.i b/Lib/java/std_unique_ptr.i
index e1e5a2622..838ca495a 100644
--- a/Lib/java/std_unique_ptr.i
+++ b/Lib/java/std_unique_ptr.i
@@ -31,6 +31,8 @@
return (cPtr == 0) ? null : new $typemap(jstype, TYPE)(cPtr, true);
}
+%typemap(typecheck, precedence=SWIG_TYPECHECK_POINTER, equivalent="TYPE *") std::unique_ptr< TYPE > ""
+
%template() std::unique_ptr< TYPE >;
%enddef