From: <hi...@us...> - 2010-01-28 20:35:15
|
Revision: 6809 http://octave.svn.sourceforge.net/octave/?rev=6809&view=rev Author: highegg Date: 2010-01-28 20:35:09 +0000 (Thu, 28 Jan 2010) Log Message: ----------- further small fixes in dict Modified Paths: -------------- trunk/octave-forge/main/general/inst/@dict/struct.m trunk/octave-forge/main/general/inst/@dict/subsasgn.m Modified: trunk/octave-forge/main/general/inst/@dict/struct.m =================================================================== --- trunk/octave-forge/main/general/inst/@dict/struct.m 2010-01-28 20:25:13 UTC (rev 6808) +++ trunk/octave-forge/main/general/inst/@dict/struct.m 2010-01-28 20:35:09 UTC (rev 6809) @@ -26,7 +26,7 @@ keys = d.keys; valid = cellfun (@isvarname, keys); if (all (valid)) - s = cell2struct (d.values, keys, 3); + s = cell2struct (d.values, keys, 1); else error ("struct: invalid key value: %s", keys{find (! valid, 1)}); endif Modified: trunk/octave-forge/main/general/inst/@dict/subsasgn.m =================================================================== --- trunk/octave-forge/main/general/inst/@dict/subsasgn.m 2010-01-28 20:25:13 UTC (rev 6808) +++ trunk/octave-forge/main/general/inst/@dict/subsasgn.m 2010-01-28 20:35:09 UTC (rev 6809) @@ -52,7 +52,7 @@ endif ## Look up the proper place to insert the new key. i = lookup (d.keys, ind); - d.keys = [d.keys(1:i,1); {ind}; d.keys(i+1:end)]; + d.keys = [d.keys(1:i,1); {ind}; d.keys(i+1:end,1)]; ## Insert value. d.values = [d.values(1:i,1); {val}; d.values(i+1:end,1)]; endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |