module FFI::Compiler::Loader

def self.caller_path(line = caller[0])

def self.caller_path(line = caller[0])
  if FFI::Platform::OS == 'windows'
    drive = line[0..1]
    path =  line[2..-1].split(/:/)[0]
    full_path = drive + path
  else
    full_path = line.split(/:/)[0]
  end
  File.dirname full_path
end