Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Commit

Permalink
Use _pclose (fix Visual Studio)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Jun 5, 2017
1 parent d8613b8 commit a699352
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/TH/THDiskFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,13 @@ static int THPipeFile_mode(const char *mode, int *isReadable, int *isWritable)
static void THPipeFile_free(THFile *self)
{
THDiskFile *dfself = (THDiskFile*)(self);
if(dfself->handle)
if(dfself->handle) {
#ifdef _WIN32
_pclose(dfself->handle);
#else
pclose(dfself->handle);
#endif
}
THFree(dfself->name);
THFree(dfself);
}
Expand Down

0 comments on commit a699352

Please sign in to comment.