HomePhorge

(PUP-391) Use FFI.errno instead of GetLastError
0bc115f51a11Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-391) Use FFI.errno instead of GetLastError

  • In commit bf6f5c4e67c527d97da2dd3ee692692c8b9a8981, @@GetLastError was introduced as a band-aid to ensure the appropriate error code was read out of the thread local storage after a Win32 API call was made. At that time, not all of the code had been converted to FFI compatible and not all gems had been upgraded to FFI compatible. Calls still made using Win32API were not captured by FFI.errno (which only calls GetLastError *after* making an FFI defined Win32 API call) resulting in a number of test fails. The solution at the time was to manually call GetLastError instead to retrieve the value set by SetLastError.
  • Now that all Win32 API calls are made through FFI, FFI will automatically capture API results by calling GetLastError, and we can remove the unnecessary binding to GetLastError here.

Details

Provenance
Ethan J. Brown <Iristyle@github>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU51e91f7e7463: (PUP-391) Remove unused file19windows.rb variable
Branches
Unknown
Tags
Unknown

Event Timeline

Ethan J. Brown <Iristyle@github> committed rPU0bc115f51a11: (PUP-391) Use FFI.errno instead of GetLastError (authored by Ethan J. Brown <Iristyle@github>).Jul 3 2014, 4:19 PM