gobject-introspection 3.0.9-x86-mingw32 → 3.1.0-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +2 -2
- data/ext/gobject-introspection/rb-gi-argument.c +205 -47
- data/ext/gobject-introspection/rb-gi-constructor-info.c +9 -15
- data/ext/gobject-introspection/rb-gi-function-info.c +147 -46
- data/ext/gobject-introspection/rb-gi-method-info.c +5 -3
- data/ext/gobject-introspection/rb-gi-private.h +3 -1
- data/lib/2.2/gobject_introspection.so +0 -0
- data/lib/2.3/gobject_introspection.so +0 -0
- data/lib/gi.rb +19 -0
- data/lib/gobject-introspection.rb +10 -0
- data/lib/gobject-introspection/callable-info.rb +19 -5
- data/lib/gobject-introspection/loader.rb +113 -82
- data/vendor/local/bin/g-ir-compiler.exe +0 -0
- data/vendor/local/bin/g-ir-generate.exe +0 -0
- data/vendor/local/bin/g-ir-inspect.exe +0 -0
- data/vendor/local/bin/libgirepository-1.0-1.dll +0 -0
- data/vendor/local/lib/girepository-1.0/GIRepository-2.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/GLib-2.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/Gio-2.0.typelib +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ast.py +2 -1
- data/vendor/local/lib/gobject-introspection/giscanner/ast.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ast.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/counter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/counter.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/message.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/message.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/msvccompiler.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/msvccompiler.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/utils.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/utils.pyo +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyc +0 -0
- data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyo +0 -0
- data/vendor/local/lib/libgirepository-1.0.a +0 -0
- data/vendor/local/lib/libgirepository-1.0.dll.a +0 -0
- data/vendor/local/lib/libgirepository-1.0.la +2 -2
- data/vendor/local/lib/pkgconfig/gobject-introspection-1.0.pc +1 -1
- data/vendor/local/lib/pkgconfig/gobject-introspection-no-export-1.0.pc +1 -1
- data/vendor/local/share/gir-1.0/GIRepository-2.0.gir +10 -4
- data/vendor/local/share/gir-1.0/GLib-2.0.gir +939 -162
- data/vendor/local/share/gir-1.0/GObject-2.0.gir +389 -565
- data/vendor/local/share/gir-1.0/Gio-2.0.gir +594 -173
- data/vendor/local/share/gobject-introspection-1.0/gdump.c +8 -1
- data/vendor/local/share/gobject-introspection-1.0/tests/regress.h +13 -0
- metadata +7 -5
@@ -78,44 +78,33 @@ module GObjectIntrospection
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def define_module_function(target_module, name, function_info)
|
81
|
-
unlock_gvl = should_unlock_gvl?(function_info, target_module)
|
82
|
-
|
83
|
-
|
84
|
-
method_name = "#{target_module}\#.#{name}"
|
85
|
-
validate_arguments(function_info, method_name, arguments)
|
86
|
-
[arguments, block]
|
87
|
-
end
|
81
|
+
function_info.unlock_gvl = should_unlock_gvl?(function_info, target_module)
|
82
|
+
method_name = "#{target_module}\#.#{name}"
|
83
|
+
arguments_builder = ArgumentsBuilder.new(function_info, method_name)
|
88
84
|
target_module.module_eval do
|
89
85
|
define_method(name) do |*arguments, &block|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
},
|
95
|
-
&block)
|
86
|
+
arguments_builder.build(arguments, block)
|
87
|
+
arguments = arguments_builder.arguments
|
88
|
+
block = arguments_builder.block
|
89
|
+
function_info.invoke(arguments, &block)
|
96
90
|
end
|
97
91
|
module_function(name)
|
98
92
|
end
|
99
93
|
end
|
100
94
|
|
101
95
|
def define_singleton_method(klass, name, info)
|
102
|
-
unlock_gvl = should_unlock_gvl?(info, klass)
|
103
|
-
|
104
|
-
|
105
|
-
validate_arguments(info, "#{klass}.#{name}", arguments)
|
106
|
-
[arguments, block]
|
107
|
-
end
|
96
|
+
info.unlock_gvl = should_unlock_gvl?(info, klass)
|
97
|
+
arguments_builder = ArgumentsBuilder.new(info, "#{klass}.#{name}")
|
98
|
+
require_callback_p = info.require_callback?
|
108
99
|
singleton_class = (class << klass; self; end)
|
109
100
|
singleton_class.__send__(:define_method, name) do |*arguments, &block|
|
110
|
-
|
111
|
-
|
101
|
+
arguments_builder.build(arguments, block)
|
102
|
+
arguments = arguments_builder.arguments
|
103
|
+
block = arguments_builder.block
|
104
|
+
if block.nil? and require_callback_p
|
112
105
|
to_enum(name, *arguments)
|
113
106
|
else
|
114
|
-
info.invoke(
|
115
|
-
:arguments => arguments,
|
116
|
-
:unlock_gvl => unlock_gvl,
|
117
|
-
},
|
118
|
-
&block)
|
107
|
+
info.invoke(arguments, &block)
|
119
108
|
end
|
120
109
|
end
|
121
110
|
end
|
@@ -286,25 +275,18 @@ module GObjectIntrospection
|
|
286
275
|
def load_constructor_infos(infos, klass)
|
287
276
|
return if infos.empty?
|
288
277
|
|
289
|
-
prepare = lambda do |info, method_name, arguments, &block|
|
290
|
-
arguments, block = build_arguments(info, arguments, &block)
|
291
|
-
validate_arguments(info, "#{klass}\##{method_name}", arguments)
|
292
|
-
[arguments, block]
|
293
|
-
end
|
294
278
|
call_initialize_post = lambda do |object|
|
295
279
|
initialize_post(object)
|
296
280
|
end
|
297
281
|
infos.each do |info|
|
298
282
|
name = "initialize_#{info.name}"
|
299
|
-
unlock_gvl = should_unlock_gvl?(info, klass)
|
283
|
+
info.unlock_gvl = should_unlock_gvl?(info, klass)
|
284
|
+
arguments_builder = ArgumentsBuilder.new(info, "#{klass}\##{name}")
|
300
285
|
klass.__send__(:define_method, name) do |*arguments, &block|
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
:unlock_gvl => unlock_gvl,
|
306
|
-
},
|
307
|
-
&block)
|
286
|
+
arguments_builder.build(arguments, block)
|
287
|
+
arguments = arguments_builder.arguments
|
288
|
+
block = arguments_builder.block
|
289
|
+
info.invoke(self, arguments, &block)
|
308
290
|
call_initialize_post.call(self)
|
309
291
|
end
|
310
292
|
klass.__send__(:private, name)
|
@@ -320,30 +302,8 @@ module GObjectIntrospection
|
|
320
302
|
end
|
321
303
|
|
322
304
|
def initialize_post(object)
|
323
|
-
|
324
|
-
|
325
|
-
def build_arguments(info, arguments, &block)
|
326
|
-
last_in_arg = info.in_args.last
|
327
|
-
if block and last_in_arg and last_in_arg.gclosure?
|
328
|
-
[arguments + [block], nil]
|
329
|
-
else
|
330
|
-
[arguments, block]
|
331
|
-
end
|
332
|
-
end
|
333
|
-
|
334
|
-
def validate_arguments(info, method_name, arguments)
|
335
|
-
n_in_args = info.n_in_args
|
336
|
-
n_required_in_args = info.n_required_in_args
|
337
|
-
return if (n_required_in_args..n_in_args).cover?(arguments.size)
|
338
|
-
|
339
|
-
detail = "#{arguments.size} for "
|
340
|
-
if n_in_args == n_required_in_args
|
341
|
-
detail << "#{n_in_args}"
|
342
|
-
else
|
343
|
-
detail << "#{n_required_in_args}..#{n_in_args}"
|
344
|
-
end
|
345
|
-
message = "#{method_name}: wrong number of arguments (#{detail})"
|
346
|
-
raise ArgumentError, message
|
305
|
+
return unless object.is_a?(GLib::Object)
|
306
|
+
self.class.reference_gobject(object, :sink => true)
|
347
307
|
end
|
348
308
|
|
349
309
|
def find_suitable_callable_info(infos, arguments)
|
@@ -453,7 +413,7 @@ module GObjectIntrospection
|
|
453
413
|
case return_type_tag
|
454
414
|
when TypeTag::BOOLEAN
|
455
415
|
case name
|
456
|
-
when /\A(?:is|get_is)_/
|
416
|
+
when /\A(?:is|get_is|can_be)_/
|
457
417
|
"#{$POSTMATCH}?"
|
458
418
|
when /\Aget_/
|
459
419
|
if function_info.n_in_args.zero?
|
@@ -539,33 +499,29 @@ module GObjectIntrospection
|
|
539
499
|
end
|
540
500
|
|
541
501
|
def define_method(info, klass, method_name)
|
542
|
-
unlock_gvl = should_unlock_gvl?(info, klass)
|
502
|
+
info.unlock_gvl = should_unlock_gvl?(info, klass)
|
543
503
|
remove_existing_method(klass, method_name)
|
544
504
|
function_info_p = (info.class == FunctionInfo)
|
545
|
-
|
546
|
-
|
547
|
-
prepare = lambda do |arguments, &block|
|
548
|
-
arguments, block = build_arguments(info, arguments, &block)
|
549
|
-
validate_arguments(info, "#{klass}\##{method_name}", arguments)
|
550
|
-
[arguments, block]
|
551
|
-
end
|
505
|
+
have_return_value_p = info.have_return_value?
|
506
|
+
arguments_builder = ArgumentsBuilder.new(info, "#{klass}\##{method_name}")
|
552
507
|
require_callback_p = info.require_callback?
|
553
508
|
klass.__send__(:define_method, method_name) do |*arguments, &block|
|
554
|
-
arguments
|
555
|
-
|
509
|
+
arguments.unshift(self) if function_info_p
|
510
|
+
arguments_builder.build(arguments, block)
|
511
|
+
arguments = arguments_builder.arguments
|
512
|
+
block = arguments_builder.block
|
556
513
|
if block.nil? and require_callback_p
|
557
514
|
to_enum(method_name, *arguments)
|
558
515
|
else
|
559
|
-
|
560
|
-
|
561
|
-
:unlock_gvl => unlock_gvl,
|
562
|
-
}
|
563
|
-
options[:receiver] = self unless function_info_p
|
564
|
-
return_value = info.invoke(options, &block)
|
565
|
-
if no_return_value_p
|
566
|
-
self
|
516
|
+
if function_info_p
|
517
|
+
return_value = info.invoke(arguments, &block)
|
567
518
|
else
|
519
|
+
return_value = info.invoke(self, arguments, &block)
|
520
|
+
end
|
521
|
+
if have_return_value_p
|
568
522
|
return_value
|
523
|
+
else
|
524
|
+
self
|
569
525
|
end
|
570
526
|
end
|
571
527
|
end
|
@@ -609,5 +565,80 @@ module GObjectIntrospection
|
|
609
565
|
load_fields(info, klass)
|
610
566
|
load_methods(info, klass)
|
611
567
|
end
|
568
|
+
|
569
|
+
class ArgumentsBuilder
|
570
|
+
attr_reader :arguments
|
571
|
+
attr_reader :block
|
572
|
+
def initialize(info, method_name)
|
573
|
+
@info = info
|
574
|
+
@method_name = method_name
|
575
|
+
|
576
|
+
@prepared = false
|
577
|
+
|
578
|
+
@arguments = nil
|
579
|
+
@block = nil
|
580
|
+
end
|
581
|
+
|
582
|
+
def build(arguments, block)
|
583
|
+
prepare
|
584
|
+
|
585
|
+
@arguments = arguments
|
586
|
+
@block = block
|
587
|
+
|
588
|
+
build_arguments
|
589
|
+
validate_arguments
|
590
|
+
end
|
591
|
+
|
592
|
+
private
|
593
|
+
def prepare
|
594
|
+
return if @prepared
|
595
|
+
|
596
|
+
@in_args = @info.in_args
|
597
|
+
@n_in_args = @in_args.size
|
598
|
+
@n_required_in_args = @info.n_required_in_args
|
599
|
+
@last_in_arg = @in_args.last
|
600
|
+
if @last_in_arg
|
601
|
+
@last_in_arg_is_gclosure = @last_in_arg.gclosure?
|
602
|
+
else
|
603
|
+
@last_in_arg_is_gclosure = false
|
604
|
+
end
|
605
|
+
@valid_n_args_range = (@n_required_in_args..@n_in_args)
|
606
|
+
|
607
|
+
@prepared = true
|
608
|
+
end
|
609
|
+
|
610
|
+
def build_arguments
|
611
|
+
if @block and @last_in_arg_is_gclosure
|
612
|
+
@arguments << @block
|
613
|
+
@block = nil
|
614
|
+
end
|
615
|
+
|
616
|
+
n_missing_arguments = @n_in_args - @arguments.size
|
617
|
+
if n_missing_arguments > 0
|
618
|
+
nil_indexes = []
|
619
|
+
@in_args.each_with_index do |arg, i|
|
620
|
+
nil_indexes << i if arg.may_be_null?
|
621
|
+
end
|
622
|
+
return if nil_indexes.size < n_missing_arguments
|
623
|
+
nil_indexes.each_with_index do |nil_index, i|
|
624
|
+
next if i <= n_missing_arguments
|
625
|
+
@arguments.insert(nil_index, nil)
|
626
|
+
end
|
627
|
+
end
|
628
|
+
end
|
629
|
+
|
630
|
+
def validate_arguments
|
631
|
+
return if @valid_n_args_range.cover?(@arguments.size)
|
632
|
+
|
633
|
+
detail = "#{@arguments.size} for "
|
634
|
+
if @n_in_args == @n_required_in_args
|
635
|
+
detail << "#{@n_in_args}"
|
636
|
+
else
|
637
|
+
detail << "#{@n_required_in_args}..#{@n_in_args}"
|
638
|
+
end
|
639
|
+
message = "#{@method_name}: wrong number of arguments (#{detail})"
|
640
|
+
raise ArgumentError, message
|
641
|
+
end
|
642
|
+
end
|
612
643
|
end
|
613
644
|
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -569,7 +569,8 @@ class Node(Annotated):
|
|
569
569
|
(namespace, name) pair. When combined with a ., this is called a
|
570
570
|
GIName. It's possible for nodes to contain or point to other nodes."""
|
571
571
|
|
572
|
-
c_name = property(lambda self: self.namespace.name + self.name
|
572
|
+
c_name = property(lambda self: self.namespace.name + self.name if self.namespace else
|
573
|
+
self.name)
|
573
574
|
gi_name = property(lambda self: '%s.%s' % (self.namespace.name, self.name))
|
574
575
|
|
575
576
|
def __init__(self, name=None):
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# libgirepository-1.0.la - a libtool library file
|
2
|
-
# Generated by libtool (GNU libtool) 2.4.
|
2
|
+
# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-0.1
|
3
3
|
#
|
4
4
|
# Please DO NOT delete this file!
|
5
5
|
# It is necessary for linking the library.
|
@@ -13,7 +13,7 @@ library_names='libgirepository-1.0.dll.a'
|
|
13
13
|
# The name of the static archive.
|
14
14
|
old_library='libgirepository-1.0.a'
|
15
15
|
|
16
|
-
# Linker flags that
|
16
|
+
# Linker flags that cannot go in dependency_libs.
|
17
17
|
inherited_linker_flags=' -pthread'
|
18
18
|
|
19
19
|
# Libraries that this one depends upon.
|