subsasgn works destructive on shared data

Christoph Albers Christoph.Albers at bruker-biospin.de
Mon Jun 22 04:56:27 CDT 2009


On Saturday 20 June 2009, Jaroslav Hajek wrote:
> I fixed this in development sources.
> http://hg.savannah.gnu.org/hgweb/octave/rev/ff612fdaee95

Thank you for the quick reply, but with the patch subsasgn does not work at 
all:

s = struct( "a", 1 );

function bug(x)
    subsasgn( x, substruct(".","a"), 3 );
    x.a
end

bug(s);

output
------

ans =  1

Cheers,
Christoph

-- 
Bruker BioSpin GmbH, Silberstreifen, D-76287 Rheinstetten
Sitz der Gesellschaft ist Rheinstetten, HRB 102368 Amtsgericht Mannheim
Geschäftsführer: Dr. Bernd Gewiese, Dr. Gerhard Roth, Dr. Dieter Schmalbein



More information about the Bug-octave mailing list