summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Gillis; u0052373 <joris.gillis@kuleuven.be>2016-08-03 17:51:08 +0200
committerJoris Gillis; u0052373 <joris.gillis@kuleuven.be>2016-08-03 17:51:08 +0200
commit4fa2dce767c98f3d699f4c71de5bacc661ab1fde (patch)
tree790e3c991b4ade417df970d5ed071e95420ae192
parent91aba1ec313dda19bb78d9a1c5c00cff5f800928 (diff)
downloadswig-4fa2dce767c98f3d699f4c71de5bacc661ab1fde.tar.gz
By default, do not allow saving of SwigRef
Saving and loading a SwigRef may easily lead to program termination
-rw-r--r--Source/Modules/matlab.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Modules/matlab.cxx b/Source/Modules/matlab.cxx
index a58f74816..5a7889e99 100644
--- a/Source/Modules/matlab.cxx
+++ b/Source/Modules/matlab.cxx
@@ -2721,6 +2721,9 @@ void MATLAB::createSwigRef() {
Printf(f_wrap_m," end\n");
Printf(f_wrap_m," end\n");
Printf(f_wrap_m," methods\n");
+ Printf(f_wrap_m," function out = saveobj(self)\n");
+ Printf(f_wrap_m," error('Serializing SWIG objects not supported.')\n");
+ Printf(f_wrap_m," end\n");
Printf(f_wrap_m," function b = isnull(self)\n");
Printf(f_wrap_m," b = isempty(self.swigPtr);\n");
Printf(f_wrap_m," end\n");