def dependencies(klass, nametag, versiontag, flagtag)
      deps = []

      nametd = ::FFI::AutoPointer.new(RPM::C.rpmtdNew, Package.method(:release_td))
      versiontd = ::FFI::AutoPointer.new(RPM::C.rpmtdNew, Package.method(:release_td))
      flagtd = ::FFI::AutoPointer.new(RPM::C.rpmtdNew, Package.method(:release_td))

      min = RPM::C::HEADERGET_MINMEM
      return deps if RPM::C.headerGet(@hdr, nametag, nametd, min) != 1
      return deps if RPM::C.headerGet(@hdr, versiontag, versiontd, min) != 1
      return deps if RPM::C.headerGet(@hdr, flagtag, flagtd, min) != 1

      RPM::C.rpmtdInit(nametd)
      while RPM::C.rpmtdNext(nametd) != -1
        deps << klass.new(RPM::C.rpmtdGetString(nametd),
                          RPM::Version.new(RPM::C.rpmtdNextString(versiontd)),
                          RPM::C.rpmtdNextUint32(flagtd).read_uint, self)
      end
      deps
    end
def dependencies(klass, nametag, versiontag, flagtag)
      deps = []

      nametd = ::FFI::AutoPointer.new(RPM::C.rpmtdNew, Package.method(:release_td))
      versiontd = ::FFI::AutoPointer.new(RPM::C.rpmtdNew, Package.method(:release_td))
      flagtd = ::FFI::AutoPointer.new(RPM::C.rpmtdNew, Package.method(:release_td))

      min = RPM::C::HEADERGET_MINMEM
      return deps if RPM::C.headerGet(@hdr, nametag, nametd, min) != 1
      return deps if RPM::C.headerGet(@hdr, versiontag, versiontd, min) != 1
      return deps if RPM::C.headerGet(@hdr, flagtag, flagtd, min) != 1

      RPM::C.rpmtdInit(nametd)
      while RPM::C.rpmtdNext(nametd) != -1
        deps << klass.new(RPM::C.rpmtdGetString(nametd),
                          RPM::Version.new(RPM::C.rpmtdNextString(versiontd)),
                          RPM::C.rpmtdNextUint32(flagtd).read_uint, self)
      end
      deps
    end
@return [Array<RPM::Dependency>] Dependencies for +klass+
 @example
    dependencies(RPM::Provide, :providename, :provideversion, :provideflags)

 @visibility private