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:
@@ -49,7 +49,7 @@ public:
|
||||
// assign an existing file descriptor and get it back from wxFFile object
|
||||
void Attach(FILE *lfp, const wxString& name = wxEmptyString)
|
||||
{ Close(); m_fp = lfp; m_name = name; }
|
||||
void Detach() { m_fp = NULL; }
|
||||
FILE* Detach() { FILE* fpOld = m_fp; m_fp = NULL; return fpOld; }
|
||||
FILE *fp() const { return m_fp; }
|
||||
|
||||
// read/write (unbuffered)
|
||||
|
Reference in New Issue
Block a user