Mercurial > hg > octave-lyh
diff liboctave/lo-utils.cc @ 10411:479cc8a0a846
use gnulib namespace
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 15 Mar 2010 15:57:23 -0400 |
parents | 07ebe522dac2 |
children | 12d25a1d84bf |
line wrap: on
line diff
--- a/liboctave/lo-utils.cc +++ b/liboctave/lo-utils.cc @@ -136,7 +136,7 @@ { int new_len = name.length () + value.length () + 2; - char *new_item = static_cast<char*> (malloc (new_len)); + char *new_item = static_cast<char*> (gnulib::malloc (new_len)); sprintf (new_item, "%s=%s", name.c_str (), value.c_str ()); @@ -164,7 +164,7 @@ int grow_size = 1024; int max_size = grow_size; - char *buf = static_cast<char *> (malloc (max_size)); + char *buf = static_cast<char *> (gnulib::malloc (max_size)); char *bufptr = buf; int len = 0; @@ -179,7 +179,7 @@ int tmp = bufptr - buf + grow_size - 1; grow_size *= 2; max_size += grow_size; - buf = static_cast<char *> (realloc (buf, max_size)); + buf = static_cast<char *> (gnulib::realloc (buf, max_size)); bufptr = buf + tmp; if (*(bufptr-1) == '\n')