summaryrefslogtreecommitdiff
path: root/Lib/swigrun.swg
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-07-16 13:14:40 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-07-17 15:20:20 +0100
commitc3c061cac8fbae8c65caefe462a3bd879fc6f547 (patch)
treee676e2bbfe3889c3cdc94127936cabeed88daba1 /Lib/swigrun.swg
parentc737bd57131c02eed9573d13f30662397890ba0b (diff)
downloadswig-c3c061cac8fbae8c65caefe462a3bd879fc6f547.tar.gz
Add Python support for std::unique_ptr inputs
Equivalent to Java/C# implementation.
Diffstat (limited to 'Lib/swigrun.swg')
-rw-r--r--Lib/swigrun.swg10
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/swigrun.swg b/Lib/swigrun.swg
index de0db2dc3..9ec98ccf2 100644
--- a/Lib/swigrun.swg
+++ b/Lib/swigrun.swg
@@ -44,6 +44,8 @@
#define SWIG_POINTER_DISOWN 0x1
#define SWIG_CAST_NEW_MEMORY 0x2
#define SWIG_POINTER_NO_NULL 0x4
+#define SWIG_POINTER_CLEAR 0x8
+#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
/* Flags for new pointer objects */
#define SWIG_POINTER_OWN 0x1
@@ -129,7 +131,13 @@
*/
#define SWIG_OK (0)
+/* Runtime errors are < 0 */
#define SWIG_ERROR (-1)
+/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
+/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
+/* Errors < -200 are generic runtime specific errors */
+#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
+
#define SWIG_IsOK(r) (r >= 0)
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
@@ -144,7 +152,7 @@
#define SWIG_OLDOBJ (SWIG_OK)
#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
-/* Check, add and del mask methods */
+/* Check, add and del object mask methods */
#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))