<commit_before># frozen_string_literal: true

require "ffi-gobject_introspection/i_base_info"
require "ffi-gobject_introspection/i_type_info"
require "ffi-gobject_introspection/i_arg_info"

module GObjectIntrospection
  # Wraps a GICallableInfo struct; represents a callable, either
  # IFunctionInfo, ICallbackInfo or IVFuncInfo.
  class ICallableInfo < IBaseInfo
    def return_type
      ITypeInfo.wrap Lib.g_callable_info_get_return_type(self)
    end

    def caller_owns
      Lib.g_callable_info_get_caller_owns self
    end

    def may_return_null?
      Lib.g_callable_info_may_return_null self
    end

    def can_throw_gerror?
      Lib.g_callable_info_can_throw_gerror self<commit_msg>Cache ICallableInfo#return_type<commit_after># frozen_string_literal: true

require "ffi-gobject_introspection/i_base_info"
require "ffi-gobject_introspection/i_type_info"
require "ffi-gobject_introspection/i_arg_info"

module GObjectIntrospection
  # Wraps a GICallableInfo struct; represents a callable, either
  # IFunctionInfo, ICallbackInfo or IVFuncInfo.
  class ICallableInfo < IBaseInfo
    def return_type
      @return_type ||= ITypeInfo.wrap Lib.g_callable_info_get_return_type(self)
    end

    def caller_owns
      Lib.g_callable_info_get_caller_owns self
    end

    def may_return_null?
      Lib.g_callable_info_may_return_null self
    end

    def can_throw_gerror?
      Lib.g_callable_info_can_throw_gerror self
{'fraction_non_alphanumeric': 0.04954640614096301, 'fraction_numerical': 0.0, 'mean_word_length': 4.782258064516129, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1555046', 'n_tokens_mistral': 513, 'n_tokens_neox': 508, 'n_words': 91}