Mercurial > hg > octave-terminal
changeset 4381:c77614c1c611
[project @ 2003-04-22 16:57:29 by jwe]
author | jwe |
---|---|
date | Tue, 22 Apr 2003 16:57:29 +0000 |
parents | 7ca3b6d84c59 |
children | f8373733d8f9 |
files | src/ChangeLog src/load-save.cc |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-04-22 John W. Eaton <jwe@bevo.che.wisc.edu> + + * load-save.cc (MAT5_DO_WRITE): Always allocate temporary buffer + using new. + 2003-04-18 John W. Eaton <jwe@bevo.che.wisc.edu> * toplev.cc (octave_config_info): Delete LIBKPATHSEA from struct.
--- a/src/load-save.cc +++ b/src/load-save.cc @@ -4095,7 +4095,8 @@ #define MAT5_DO_WRITE(TYPE, data, count, stream) \ do \ { \ - OCTAVE_LOCAL_BUFFER (TYPE, ptr, count); \ + std::auto_ptr<TYPE> tmp_auto_ptr (new TYPE [count]); \ + TYPE *ptr = tmp_auto_ptr.get (); \ for (int i = 0; i < count; i++) \ ptr[i] = X_CAST (TYPE, data[i]); \ stream.write (X_CAST (char *, ptr), count * sizeof (TYPE)); \