diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-10-15 20:20:05 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-10-15 20:20:05 +0000 |
commit | e39423c06daa6d37098d1000174587b10ce695a3 (patch) | |
tree | 0b95c0fc810d46f2993b7222ec997e2cc685e750 /libiberty/make-temp-file.c | |
parent | 26882aba54fc8a2112450a011d699eb7b1110ee9 (diff) |
libiberty: Expose choose_tmpdir, and fix constness of return type
include/ChangeLog:
* libiberty.h (choose_tmpdir): New prototype.
libiberty/ChangeLog:
* choose-temp.c (choose_tmpdir): Remove now-redundant local
copy of prototype.
* functions.texi: Regenerate.
* make-temp-file.c (choose_tmpdir): Convert return type from
char * to const char * - given that this returns a pointer to
a memoized allocation, the caller must not touch it.
From-SVN: r216285
Diffstat (limited to 'libiberty/make-temp-file.c')
-rw-r--r-- | libiberty/make-temp-file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libiberty/make-temp-file.c b/libiberty/make-temp-file.c index 7b74f8179b1..244cc23c509 100644 --- a/libiberty/make-temp-file.c +++ b/libiberty/make-temp-file.c @@ -93,7 +93,7 @@ static char *memoized_tmpdir; /* -@deftypefn Replacement char* choose_tmpdir () +@deftypefn Replacement const char* choose_tmpdir () Returns a pointer to a directory path suitable for creating temporary files in. @@ -102,7 +102,7 @@ files in. */ -char * +const char * choose_tmpdir (void) { if (!memoized_tmpdir) |