module YARP

def self.dump_internal(source, source_size, filepath)

def self.dump_internal(source, source_size, filepath)
  LibRubyParser::YPBuffer.with do |buffer|
    metadata = [filepath.bytesize, filepath.b, 0].pack("LA*L") if filepath
    LibRubyParser.yp_parse_serialize(source, source_size, buffer.pointer, metadata)
    buffer.read
  end
end