Mercurial > octave-nkf
comparison libinterp/octave-value/ov-fcn-handle.cc @ 15572:859c8bf6d134
Fix saved struct with function handle fails to load (bug #33857)
* ov-fcn-handle.cc: Add test.
* symtab.h (symbol_table::all_variables, symbol_table::do_all_variables):
Support excluding storage classes.
author | Max Brister <max@2bass.com> |
---|---|
date | Tue, 30 Oct 2012 22:14:05 -0700 |
parents | ab3d4c1affee |
children | 2a4f83826024 |
comparison
equal
deleted
inserted
replaced
15571:7b9551c65b7b | 15572:859c8bf6d134 |
---|---|
1309 %! endif | 1309 %! endif |
1310 %! for i = 1:numel (modes) | 1310 %! for i = 1:numel (modes) |
1311 %! mode = modes{i}; | 1311 %! mode = modes{i}; |
1312 %! nm = tmpnam (); | 1312 %! nm = tmpnam (); |
1313 %! unwind_protect | 1313 %! unwind_protect |
1314 %! f2 (1); # bug #33857 | |
1314 %! save (mode, nm, "f2", "g2", "hm2", "hdld2", "hbi2"); | 1315 %! save (mode, nm, "f2", "g2", "hm2", "hdld2", "hbi2"); |
1315 %! clear f2 g2 hm2 hdld2 hbi2 | 1316 %! clear f2 g2 hm2 hdld2 hbi2 |
1316 %! load (nm); | 1317 %! load (nm); |
1317 %! assert (f (2), f2 (2)); | 1318 %! assert (f (2), f2 (2)); |
1318 %! assert (g (2), g2 (2)); | 1319 %! assert (g (2), g2 (2)); |