HomePhorge

(PUP-2382) FFI typedef for win32_bool / fix User
b28137fb6d7fUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-2382) FFI typedef for win32_bool / fix User

  • Previously check_token_membership was failing in 2003 spec tests due to 2 issues
    • FFI::Pointer::NULL cannot be used in place of our :handle typedef, and therefore we must add a new constant of 0 to be used for NULL handles
    • FFI defines a :bool as variable width "(?? 1 byte in C++)", while Win32 defines a BOOL as int, and is fixed to 4 bytes on x86 and x64
  • Fortunately the bool issue really only bit us in the one spot where we were using a pointer to a bool, but by adding a new typedef for :win32_bool, all call sites comparing the return value needed to be updated for correctness to compare against FFI::WIN32_FALSE
  • A test was added to ensure these APIs are called during spec tests on all Windows platforms, and not just 2003

Details

Provenance
Ethan J. Brown <Iristyle@github>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUda289b16c0ac: Merge pull request #2687 from hlindberg/PUP-2642_selector-default-out-of-band
Branches
Unknown
Tags
Unknown

Event Timeline

Ethan J. Brown <Iristyle@github> committed rPUb28137fb6d7f: (PUP-2382) FFI typedef for win32_bool / fix User (authored by Ethan J. Brown <Iristyle@github>).May 23 2014, 8:32 PM