diff options
author | 2015-02-03 21:58:53 -0800 | |
---|---|---|
committer | 2015-02-03 23:17:12 -0800 | |
commit | 05618967516ca807d4deadea05e90b439c3f2e7c (patch) | |
tree | f8ca8ce2ea0791c47beac372d103d36d937701b5 /src/core/support/file.h | |
parent | 026a417defcd13d0ae5e8a8ddb67c18ff02fa142 (diff) |
Addressing comments.
The new gpr_tmpfile API is actually much nicer to use. Thanks Nico!
Diffstat (limited to 'src/core/support/file.h')
-rw-r--r-- | src/core/support/file.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/support/file.h b/src/core/support/file.h index a9d81498e5..92f420e7ce 100644 --- a/src/core/support/file.h +++ b/src/core/support/file.h @@ -48,11 +48,11 @@ extern "C" { will be set to 1 in case of success and 0 in case of failure. */ gpr_slice gpr_load_file(const char *filename, int *success); -/* Creates a temporary file from a template. - The last six characters of template must be "XXXXXX" and these are replaced - with a string that makes the filename unique. Since it will be modified, - template must not be a string constant. */ -FILE *gpr_tmpfile(char *template); +/* Creates a temporary file from a prefix. + If tmp_filename is not NULL, *tmp_filename is assigned the name of the + created file and it is the responsibility of the caller to gpr_free it + unless an error occurs in which case it will be set to NULL. */ +FILE *gpr_tmpfile(const char *prefix, char **tmp_filename); #ifdef __cplusplus } |