HomePhorge

(PUP-2738) FFI::Pointer#read_win32_local_pointer
1a6c052bf8daUnpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

(PUP-2738) FFI::Pointer#read_win32_local_pointer

  • Create new block style helper that automatically calls LocalFree on a returned pointer after it's done being used. Since the ptr is no longer valid after the block yields, return nil from the method
  • Move FFI definition for LocalFree into FFI::WIN32 and out of Puppet::Util::Windows::Error and Puppet::Util::Windows::SID
  • Ensure that proper wide string is resolved / passed out of Puppet::Util::Windows::Error.format_error_code and Puppet::Util::Windows::SID.sid_ptr_to_string when resolving string inside of a block
  • Refactor Puppet::Util::Windows::SID.valid_sid? to read ptr inside block, use closure to store the 'valid' return value

Details

Provenance
Ethan J. Brown <Iristyle@github>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU2187fa384c37: Merge remote-tracking branch 'ferventcoder/ticket/master/PUP-2382-Ensure-FFI…
Branches
Unknown
Tags
Unknown

Event Timeline

Ethan J. Brown <Iristyle@github> committed rPU1a6c052bf8da: (PUP-2738) FFI::Pointer#read_win32_local_pointer (authored by Ethan J. Brown <Iristyle@github>).Jun 14 2014, 5:23 PM