From a2d9a24f4da36a454e116c03f710f62e3ae1c9f8 Mon Sep 17 00:00:00 2001 From: Markus Friedrich Date: Tue, 24 Dec 2019 14:06:25 +0100 Subject: [PATCH] Changed return type of swig_this() to size_t. The type long may be 4 bytes but swig_this() must return the address of the object as an integer. Using size_t ensures that the return type can store a pointer. --- Lib/octave/octrun.swg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/octave/octrun.swg b/Lib/octave/octrun.swg index ff614e681..325a4cca3 100644 --- a/Lib/octave/octrun.swg +++ b/Lib/octave/octrun.swg @@ -507,10 +507,10 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own); delete this; } - long swig_this() const { + size_t swig_this() const { if (!types.size()) - return (long) this; - return (long) types[0].second.ptr; + return (size_t) this; + return (size_t) types[0].second.ptr; } const char* help_text() const { if (!types.size())