This file is indexed.

/usr/lib/ruby/vendor_ruby/gir_ffi/builders/signal_closure_builder.rb is in ruby-gir-ffi 0.9.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
require 'gir_ffi/builders/base_type_builder'
require 'gir_ffi/builders/marshalling_method_builder'

module GirFFI
  module Builders
    # Implements the creation of a closure class for handling a particular
    # signal. The type will be attached to the appropriate class.
    class SignalClosureBuilder < BaseTypeBuilder
      def setup_class
        setup_constants
        klass.class_eval marshaller_definition
      end

      def setup_method(_method)
        nil
      end

      def marshaller_definition
        arg_infos = info.args

        container_type_info = ReceiverTypeInfo.new(container_info)
        receiver_info = ReceiverArgumentInfo.new(container_type_info)
        return_value_info = ReturnValueInfo.new(info.return_type,
                                                info.caller_owns,
                                                info.skip_return?)

        MarshallingMethodBuilder.for_signal(receiver_info,
                                            arg_infos,
                                            return_value_info).method_definition
      end

      def klass
        @klass ||= get_or_define_class container_class, @classname, GObject::RubyClosure
      end

      def container_class
        @container_class ||= Builder.build_class(container_info)
      end

      def container_info
        @container_info ||= info.container
      end
    end
  end
end