Return instead of using out parameter
This commit is contained in:
parent
8b7af2c770
commit
076f1474fa
|
@ -147,8 +147,8 @@ TF_StringStream* TF_GetLocalTempDirectories() {
|
|||
return list;
|
||||
}
|
||||
|
||||
void TF_GetTempFileName(const char* extension, char** name) {
|
||||
*name = strdup(::tensorflow::io::GetTempFilename(extension).c_str());
|
||||
char* TF_GetTempFileName(const char* extension) {
|
||||
return strdup(::tensorflow::io::GetTempFilename(extension).c_str());
|
||||
}
|
||||
|
||||
TF_CAPI_EXPORT extern uint64_t TF_NowNanos(void) {
|
||||
|
|
|
@ -154,8 +154,7 @@ TF_CAPI_EXPORT extern TF_StringStream* TF_GetLocalTempDirectories(void);
|
|||
|
||||
// Creates a temporary file name with an extension.
|
||||
// The caller is responsible for freeing the returned pointer.
|
||||
TF_CAPI_EXPORT extern void TF_GetTempFileName(const char* extension,
|
||||
char** name);
|
||||
TF_CAPI_EXPORT extern char* TF_GetTempFileName(const char* extension);
|
||||
|
||||
// Returns the number of nanoseconds since the Unix epoch.
|
||||
TF_CAPI_EXPORT extern uint64_t TF_NowNanos(void);
|
||||
|
|
Loading…
Reference in New Issue