Return the old file descriptor/pointer from wx(F)File::Detach().
Make Detach() more convenient to use. Closes #15494. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
// assign an existing file descriptor and get it back from wxFile object
|
||||
void Attach(int lfd) { Close(); m_fd = lfd; m_lasterror = 0; }
|
||||
void Detach() { m_fd = fd_invalid; }
|
||||
int Detach() { int fdOld = m_fd; m_fd = fd_invalid; return fdOld; }
|
||||
int fd() const { return m_fd; }
|
||||
|
||||
// read/write (unbuffered)
|
||||
|
Reference in New Issue
Block a user