Mercurial > octave-nkf
comparison src/ls-mat5.cc @ 12699:c0d102ad9bba
Fix loading of objects in MAT-files (bug #32641).
* ls-mat5.cc: Fix loading of objects in MAT-files (bug #32641).
author | David Bateman <dbateman@free.fr> |
---|---|
date | Thu, 02 Jun 2011 11:57:08 -0700 |
parents | 824b3e0ab12a |
children | c1b754d93572 |
comparison
equal
deleted
inserted
replaced
12689:53c0ed961de8 | 12699:c0d102ad9bba |
---|---|
1223 m.contents("args")(0).string_value()); | 1223 m.contents("args")(0).string_value()); |
1224 } | 1224 } |
1225 else | 1225 else |
1226 { | 1226 { |
1227 octave_class* cls = new octave_class (m, classname); | 1227 octave_class* cls = new octave_class (m, classname); |
1228 cls->reconstruct_exemplar (); | 1228 |
1229 | 1229 if (cls->reconstruct_exemplar ()) |
1230 if (! cls->reconstruct_parents ()) | |
1231 warning ("load: unable to reconstruct object inheritance"); | |
1232 | |
1233 tc = cls; | |
1234 if (load_path::find_method (classname, "loadobj") != | |
1235 std::string()) | |
1236 { | 1230 { |
1237 octave_value_list tmp = feval ("loadobj", tc, 1); | 1231 |
1238 | 1232 if (! cls->reconstruct_parents ()) |
1239 if (! error_state) | 1233 warning ("load: unable to reconstruct object inheritance"); |
1240 tc = tmp(0); | 1234 |
1241 else | 1235 tc = cls; |
1242 goto data_read_error; | 1236 if (load_path::find_method (classname, "loadobj") != |
1237 std::string()) | |
1238 { | |
1239 octave_value_list tmp = feval ("loadobj", tc, 1); | |
1240 | |
1241 if (! error_state) | |
1242 tc = tmp(0); | |
1243 else | |
1244 goto data_read_error; | |
1245 } | |
1246 } | |
1247 else | |
1248 { | |
1249 tc = m; | |
1250 warning ("load: element has been converted to a structure"); | |
1243 } | 1251 } |
1244 } | 1252 } |
1245 } | 1253 } |
1246 else | 1254 else |
1247 tc = m; | 1255 tc = m; |