Mercurial > hg > octave-lyh
diff src/variables.cc @ 312:069ae2896cf7
[project @ 1994-01-19 21:40:41 by jwe]
author | jwe |
---|---|
date | Wed, 19 Jan 1994 21:40:54 +0000 |
parents | 3c23b8ea9099 |
children | fe6e790846f5 |
line wrap: on
line diff
--- a/src/variables.cc +++ b/src/variables.cc @@ -449,18 +449,15 @@ * * #[ \t]*keyword[ \t]*:[ \t]*string-value\n * - * Returns a pointer to a static variable which is only valid until - * the next time this function is called. + * Returns a pointer to new storage. The caller is responsible for + * deleting it. */ char * extract_keyword (istream& is, char *keyword) { ostrstream buf; - static char *retval = (char *) NULL; - - delete [] retval; - retval = (char *) NULL; + char *retval = (char *) NULL; char c; while (is.get (c))