gobject-introspection 2.0.2-x86-mingw32 → 2.0.3-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +5 -2
  3. data/ext/gobject-introspection/rb-gi-argument.c +215 -4
  4. data/ext/gobject-introspection/rb-gi-loader.c +7 -2
  5. data/ext/gobject-introspection/rb-gi-struct-info.c +1 -1
  6. data/lib/1.9/gobject_introspection.so +0 -0
  7. data/lib/2.0/gobject_introspection.so +0 -0
  8. data/test/test-function-info.rb +3 -1
  9. data/vendor/local/bin/g-ir-compiler.exe +0 -0
  10. data/vendor/local/bin/g-ir-generate.exe +0 -0
  11. data/vendor/local/bin/libgirepository-1.0-1.dll +0 -0
  12. data/vendor/local/lib/girepository-1.0/DBus-1.0.typelib +0 -0
  13. data/vendor/local/lib/girepository-1.0/DBusGLib-1.0.typelib +0 -0
  14. data/vendor/local/lib/girepository-1.0/GIRepository-2.0.typelib +0 -0
  15. data/vendor/local/lib/girepository-1.0/GLib-2.0.typelib +0 -0
  16. data/vendor/local/lib/girepository-1.0/GModule-2.0.typelib +0 -0
  17. data/vendor/local/lib/girepository-1.0/GObject-2.0.typelib +0 -0
  18. data/vendor/local/lib/girepository-1.0/Gio-2.0.typelib +0 -0
  19. data/vendor/local/lib/girepository-1.0/win32-1.0.typelib +0 -0
  20. data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyc +0 -0
  21. data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyo +0 -0
  22. data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.py +1 -0
  23. data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyc +0 -0
  24. data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyo +0 -0
  25. data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.py +52 -47
  26. data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyc +0 -0
  27. data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyo +0 -0
  28. data/vendor/local/lib/gobject-introspection/giscanner/ast.py +48 -42
  29. data/vendor/local/lib/gobject-introspection/giscanner/ast.pyc +0 -0
  30. data/vendor/local/lib/gobject-introspection/giscanner/ast.pyo +0 -0
  31. data/vendor/local/lib/gobject-introspection/giscanner/cachestore.py +11 -10
  32. data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyc +0 -0
  33. data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyo +0 -0
  34. data/vendor/local/lib/gobject-introspection/giscanner/codegen.py +7 -5
  35. data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyc +0 -0
  36. data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyo +0 -0
  37. data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.py +22 -0
  38. data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.pyc +0 -0
  39. data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.pyo +0 -0
  40. data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.py +120 -0
  41. data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.pyc +0 -0
  42. data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.pyo +0 -0
  43. data/vendor/local/lib/gobject-introspection/giscanner/docmain.py +14 -2
  44. data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyc +0 -0
  45. data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyo +0 -0
  46. data/vendor/local/lib/gobject-introspection/giscanner/docwriter.py +19 -10
  47. data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyc +0 -0
  48. data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyo +0 -0
  49. data/vendor/local/lib/gobject-introspection/giscanner/dumper.py +18 -11
  50. data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyc +0 -0
  51. data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyo +0 -0
  52. data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.py +10 -13
  53. data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyc +0 -0
  54. data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyo +0 -0
  55. data/vendor/local/lib/gobject-introspection/giscanner/girparser.py +24 -30
  56. data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyc +0 -0
  57. data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyo +0 -0
  58. data/vendor/local/lib/gobject-introspection/giscanner/girwriter.py +11 -12
  59. data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyc +0 -0
  60. data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyo +0 -0
  61. data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.py +25 -21
  62. data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyc +0 -0
  63. data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyo +0 -0
  64. data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.py +1 -1
  65. data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyc +0 -0
  66. data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyo +0 -0
  67. data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.py +98 -100
  68. data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyc +0 -0
  69. data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyo +0 -0
  70. data/vendor/local/lib/gobject-introspection/giscanner/message.py +10 -8
  71. data/vendor/local/lib/gobject-introspection/giscanner/message.pyc +0 -0
  72. data/vendor/local/lib/gobject-introspection/giscanner/message.pyo +0 -0
  73. data/vendor/local/lib/gobject-introspection/giscanner/scannermain.py +28 -16
  74. data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyc +0 -0
  75. data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyo +0 -0
  76. data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.py +83 -9
  77. data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyc +0 -0
  78. data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyo +0 -0
  79. data/vendor/local/lib/gobject-introspection/giscanner/shlibs.py +5 -1
  80. data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyc +0 -0
  81. data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyo +0 -0
  82. data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.py +20 -21
  83. data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyc +0 -0
  84. data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyo +0 -0
  85. data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.py +3 -0
  86. data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyc +0 -0
  87. data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyo +0 -0
  88. data/vendor/local/lib/gobject-introspection/giscanner/transformer.py +32 -41
  89. data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyc +0 -0
  90. data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyo +0 -0
  91. data/vendor/local/lib/gobject-introspection/giscanner/utils.py +9 -0
  92. data/vendor/local/lib/gobject-introspection/giscanner/utils.pyc +0 -0
  93. data/vendor/local/lib/gobject-introspection/giscanner/utils.pyo +0 -0
  94. data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.py +9 -11
  95. data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyc +0 -0
  96. data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyo +0 -0
  97. data/vendor/local/lib/libgirepository-1.0.a +0 -0
  98. data/vendor/local/lib/libgirepository-1.0.dll.a +0 -0
  99. data/vendor/local/lib/libgirepository-1.0.la +1 -1
  100. data/vendor/local/lib/pkgconfig/gobject-introspection-1.0.pc +1 -1
  101. data/vendor/local/lib/pkgconfig/gobject-introspection-no-export-1.0.pc +1 -1
  102. data/vendor/local/share/gir-1.0/GIRepository-2.0.gir +691 -691
  103. data/vendor/local/share/gir-1.0/GLib-2.0.gir +6972 -6467
  104. data/vendor/local/share/gir-1.0/GModule-2.0.gir +103 -4
  105. data/vendor/local/share/gir-1.0/GObject-2.0.gir +2085 -1955
  106. data/vendor/local/share/gir-1.0/Gio-2.0.gir +10955 -9269
  107. data/vendor/local/share/gir-1.0/win32-1.0.gir +19 -0
  108. data/vendor/local/share/gobject-introspection-1.0/Makefile.introspection +2 -2
  109. data/vendor/local/share/gobject-introspection-1.0/gdump.c +7 -2
  110. data/vendor/local/share/gobject-introspection-1.0/tests/annotation.c +15 -15
  111. data/vendor/local/share/gobject-introspection-1.0/tests/annotation.h +1 -1
  112. data/vendor/local/share/gobject-introspection-1.0/tests/gimarshallingtests.c +14 -0
  113. data/vendor/local/share/gobject-introspection-1.0/tests/gimarshallingtests.h +2 -2
  114. data/vendor/local/share/gobject-introspection-1.0/tests/regress.c +8 -0
  115. data/vendor/local/share/gobject-introspection-1.0/tests/regress.h +9 -0
  116. metadata +20 -21
  117. data/vendor/local/lib/gobject-introspection/giscanner/odict.py +0 -50
  118. data/vendor/local/lib/gobject-introspection/giscanner/odict.pyc +0 -0
  119. data/vendor/local/lib/gobject-introspection/giscanner/odict.pyo +0 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1331db1c67d720914be047015425c03c3414dbaa
4
+ data.tar.gz: a094b6e63bf888a009652a89ec497b97dc187269
5
+ SHA512:
6
+ metadata.gz: 3f76e7a58d161f612a467016165d4f55b8494df045d86945fae857f610ab3b6cca3efc8421d83852b8c1bd9606dae8198b8392d5847ee66667417e52f0a28d0e
7
+ data.tar.gz: 182bf6532518ce1882d720cc3ebbdff96c2dbba1ccc1b30fe09e0cdaef8ea1ac1b2109d4252950d0b105fbe6ca56a5c5497f1345c203411515d0642398b68d9b
data/Rakefile CHANGED
@@ -32,7 +32,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
32
32
  :name => "glib",
33
33
  :download_site => :gnome,
34
34
  :label => "GLib",
35
- :version => "2.36.2",
35
+ :version => "2.38.2",
36
36
  :compression_method => "xz",
37
37
  :windows => {
38
38
  :build => false,
@@ -40,13 +40,14 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
40
40
  :native => {
41
41
  :build => true,
42
42
  :need_autoreconf => true,
43
+ :built_file => "lib/libglib-2.0.so",
43
44
  },
44
45
  },
45
46
  {
46
47
  :name => "gobject-introspection",
47
48
  :download_site => :gnome,
48
49
  :label => "gobject-introspection",
49
- :version => "1.36.0",
50
+ :version => "1.38.0",
50
51
  :compression_method => "xz",
51
52
  :windows => {
52
53
  :configure_args => [
@@ -57,12 +58,14 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
57
58
  "0001-Support-external-g-ir-scanner.patch",
58
59
  ],
59
60
  :need_autoreconf => true,
61
+ :built_file => "bin/libgirepository-1.0-1.dll",
60
62
  },
61
63
  :native => {
62
64
  :build => true,
63
65
  :patches => [
64
66
  # "cross-compilable-g-ir-scanner.diff",
65
67
  ],
68
+ :built_file => "bin/g-ir-scanner",
66
69
  }
67
70
  },
68
71
  ]
@@ -29,6 +29,10 @@ array_c_to_ruby(const gchar **elements, GITypeInfo *type_info, VALUE rb_array)
29
29
  gboolean fixed_size_p;
30
30
  gboolean zero_terminated_p;
31
31
 
32
+ if (!elements) {
33
+ return;
34
+ }
35
+
32
36
  n_elements = g_type_info_get_array_length(type_info);
33
37
  fixed_size_p = g_type_info_get_array_fixed_size(type_info);
34
38
  zero_terminated_p = g_type_info_is_zero_terminated(type_info);
@@ -257,9 +261,13 @@ rb_gi_argument_to_ruby(GIArgument *argument, GITypeInfo *type_info)
257
261
  rb_argument = interface_to_ruby(argument, type_info);
258
262
  break;
259
263
  case GI_TYPE_TAG_GLIST:
264
+ rb_argument = GOBJGLIST2RVAL(argument->v_pointer);
265
+ break;
260
266
  case GI_TYPE_TAG_GSLIST:
261
267
  case GI_TYPE_TAG_GHASH:
262
- rb_raise(rb_eNotImpError, "TODO: GIArgument(unichar) -> Ruby");
268
+ rb_raise(rb_eNotImpError,
269
+ "TODO: GIArgument(%s) -> Ruby",
270
+ g_type_tag_to_string(type_tag));
263
271
  break;
264
272
  case GI_TYPE_TAG_ERROR:
265
273
  rb_argument = GERROR2RVAL(argument->v_pointer);
@@ -505,10 +513,201 @@ rb_gi_out_argument_fin(GIArgument *argument, GIArgInfo *arg_info)
505
513
  xfree(argument->v_pointer);
506
514
  }
507
515
 
516
+ static void
517
+ rb_gi_return_argument_free_container(GIArgument *argument,
518
+ GITypeInfo *type_info)
519
+ {
520
+ GITypeTag type_tag;
521
+
522
+ type_tag = g_type_info_get_tag(type_info);
523
+
524
+ rb_raise(rb_eNotImpError,
525
+ "TODO: free GIArgument(%s) as container",
526
+ g_type_tag_to_string(type_tag));
527
+ }
528
+
529
+ static void
530
+ rb_gi_return_argument_free_everything_array(GIArgument *argument,
531
+ GITypeInfo *type_info)
532
+ {
533
+ switch (g_type_info_get_array_type(type_info)) {
534
+ case GI_ARRAY_TYPE_C:
535
+ g_strfreev(argument->v_pointer);
536
+ break;
537
+ case GI_ARRAY_TYPE_ARRAY:
538
+ g_array_free(argument->v_pointer, TRUE);
539
+ break;
540
+ case GI_ARRAY_TYPE_PTR_ARRAY:
541
+ g_ptr_array_free(argument->v_pointer, TRUE);
542
+ break;
543
+ case GI_ARRAY_TYPE_BYTE_ARRAY:
544
+ g_ptr_array_free(argument->v_pointer, TRUE);
545
+ break;
546
+ default:
547
+ g_assert_not_reached();
548
+ break;
549
+ }
550
+ }
551
+
552
+ static void
553
+ rb_gi_return_argument_free_everything_interface(GIArgument *argument,
554
+ GITypeInfo *type_info)
555
+ {
556
+ GIBaseInfo *interface_info;
557
+ GIInfoType interface_type;
558
+
559
+ interface_info = g_type_info_get_interface(type_info);
560
+ interface_type = g_base_info_get_type(interface_info);
561
+ g_base_info_unref(interface_info);
562
+
563
+ switch (interface_type) {
564
+ case GI_INFO_TYPE_INVALID:
565
+ rb_raise(rb_eNotImpError,
566
+ "TODO: free GIArgument(interface)[invalid] everything");
567
+ break;
568
+ case GI_INFO_TYPE_FUNCTION:
569
+ rb_raise(rb_eNotImpError,
570
+ "TODO: free GIArgument(interface)[function] everything");
571
+ break;
572
+ case GI_INFO_TYPE_CALLBACK:
573
+ rb_raise(rb_eNotImpError,
574
+ "TODO: free GIArgument(interface)[callback] everything");
575
+ break;
576
+ case GI_INFO_TYPE_STRUCT:
577
+ rbgobj_instance_unref(argument->v_pointer);
578
+ break;
579
+ case GI_INFO_TYPE_BOXED:
580
+ rb_raise(rb_eNotImpError,
581
+ "TODO: free GIArgument(interface)[boxed] everything");
582
+ break;
583
+ case GI_INFO_TYPE_ENUM:
584
+ rb_raise(rb_eNotImpError,
585
+ "TODO: free GIArgument(interface)[enum] everything");
586
+ break;
587
+ case GI_INFO_TYPE_FLAGS:
588
+ rb_raise(rb_eNotImpError,
589
+ "TODO: free GIArgument(interface)[flags] everything");
590
+ break;
591
+ case GI_INFO_TYPE_OBJECT:
592
+ if (argument->v_pointer) {
593
+ g_object_unref(argument->v_pointer);
594
+ }
595
+ break;
596
+ case GI_INFO_TYPE_INTERFACE:
597
+ rb_raise(rb_eNotImpError,
598
+ "TODO: free GIArgument(interface)[interface] everything");
599
+ break;
600
+ case GI_INFO_TYPE_CONSTANT:
601
+ rb_raise(rb_eNotImpError,
602
+ "TODO: free GIArgument(interface)[constant] everything");
603
+ break;
604
+ case GI_INFO_TYPE_INVALID_0:
605
+ g_assert_not_reached();
606
+ break;
607
+ case GI_INFO_TYPE_UNION:
608
+ rb_raise(rb_eNotImpError,
609
+ "TODO: free GIArgument(interface)[union] everything");
610
+ break;
611
+ case GI_INFO_TYPE_VALUE:
612
+ rb_raise(rb_eNotImpError,
613
+ "TODO: free GIArgument(interface)[value] everything");
614
+ break;
615
+ case GI_INFO_TYPE_SIGNAL:
616
+ rb_raise(rb_eNotImpError,
617
+ "TODO: free GIArgument(interface)[signal] everything");
618
+ break;
619
+ case GI_INFO_TYPE_VFUNC:
620
+ rb_raise(rb_eNotImpError,
621
+ "TODO: free GIArgument(interface)[vfunc] everything");
622
+ break;
623
+ case GI_INFO_TYPE_PROPERTY:
624
+ rb_raise(rb_eNotImpError,
625
+ "TODO: free GIArgument(interface)[property] everything");
626
+ break;
627
+ case GI_INFO_TYPE_FIELD:
628
+ rb_raise(rb_eNotImpError,
629
+ "TODO: free GIArgument(interface)[field] everything");
630
+ break;
631
+ case GI_INFO_TYPE_ARG:
632
+ rb_raise(rb_eNotImpError,
633
+ "TODO: free GIArgument(interface)[arg] everything");
634
+ break;
635
+ case GI_INFO_TYPE_TYPE:
636
+ rb_raise(rb_eNotImpError,
637
+ "TODO: free GIArgument(interface)[type] everything");
638
+ break;
639
+ case GI_INFO_TYPE_UNRESOLVED:
640
+ rb_raise(rb_eNotImpError,
641
+ "TODO: free GIArgument(interface)[unresolved] everything");
642
+ break;
643
+ default:
644
+ g_assert_not_reached();
645
+ break;
646
+ }
647
+ }
648
+
649
+ static void
650
+ rb_gi_return_argument_free_everything(GIArgument *argument,
651
+ GITypeInfo *type_info)
652
+ {
653
+ GITypeTag type_tag;
654
+
655
+ type_tag = g_type_info_get_tag(type_info);
656
+ switch (type_tag) {
657
+ case GI_TYPE_TAG_VOID:
658
+ case GI_TYPE_TAG_BOOLEAN:
659
+ case GI_TYPE_TAG_INT8:
660
+ case GI_TYPE_TAG_UINT8:
661
+ case GI_TYPE_TAG_INT16:
662
+ case GI_TYPE_TAG_UINT16:
663
+ case GI_TYPE_TAG_INT32:
664
+ case GI_TYPE_TAG_UINT32:
665
+ case GI_TYPE_TAG_INT64:
666
+ case GI_TYPE_TAG_UINT64:
667
+ case GI_TYPE_TAG_FLOAT:
668
+ case GI_TYPE_TAG_DOUBLE:
669
+ case GI_TYPE_TAG_GTYPE:
670
+ rb_raise(rb_eNotImpError,
671
+ "TODO: free GIArgument(%s) everything",
672
+ g_type_tag_to_string(type_tag));
673
+ break;
674
+ case GI_TYPE_TAG_UTF8:
675
+ g_free(argument->v_string);
676
+ break;
677
+ case GI_TYPE_TAG_FILENAME:
678
+ rb_raise(rb_eNotImpError,
679
+ "TODO: free GIArgument(%s) everything",
680
+ g_type_tag_to_string(type_tag));
681
+ break;
682
+ case GI_TYPE_TAG_ARRAY:
683
+ rb_gi_return_argument_free_everything_array(argument, type_info);
684
+ break;
685
+ case GI_TYPE_TAG_INTERFACE:
686
+ rb_gi_return_argument_free_everything_interface(argument, type_info);
687
+ break;
688
+ case GI_TYPE_TAG_GLIST:
689
+ g_list_foreach(argument->v_pointer, (GFunc)g_object_unref, NULL);
690
+ g_list_free(argument->v_pointer);
691
+ break;
692
+ case GI_TYPE_TAG_GSLIST:
693
+ case GI_TYPE_TAG_GHASH:
694
+ case GI_TYPE_TAG_ERROR:
695
+ case GI_TYPE_TAG_UNICHAR:
696
+ rb_raise(rb_eNotImpError,
697
+ "TODO: free GIArgument(%s) everything",
698
+ g_type_tag_to_string(type_tag));
699
+ break;
700
+ default:
701
+ g_assert_not_reached();
702
+ break;
703
+ }
704
+ }
705
+
508
706
  VALUE
509
707
  rb_gi_return_argument_to_ruby(GIArgument *argument,
510
708
  GICallableInfo *callable_info)
511
709
  {
710
+ VALUE rb_argument;
512
711
  gboolean may_return_null;
513
712
  GITypeInfo return_value_info;
514
713
 
@@ -518,7 +717,21 @@ rb_gi_return_argument_to_ruby(GIArgument *argument,
518
717
  }
519
718
 
520
719
  g_callable_info_load_return_type(callable_info, &return_value_info);
521
- return rb_gi_argument_to_ruby(argument, &return_value_info);
720
+ rb_argument = rb_gi_argument_to_ruby(argument, &return_value_info);
721
+ switch (g_callable_info_get_caller_owns(callable_info)) {
722
+ case GI_TRANSFER_NOTHING:
723
+ break;
724
+ case GI_TRANSFER_CONTAINER:
725
+ rb_gi_return_argument_free_container(argument, &return_value_info);
726
+ break;
727
+ case GI_TRANSFER_EVERYTHING:
728
+ rb_gi_return_argument_free_everything(argument, &return_value_info);
729
+ break;
730
+ default:
731
+ g_assert_not_reached();
732
+ break;
733
+ }
734
+ return rb_argument;
522
735
  }
523
736
 
524
737
  static void
@@ -538,8 +751,6 @@ rb_gi_argument_from_ruby_array_c(GIArgument *argument,
538
751
  g_type_tag_to_string(element_type_tag));
539
752
  break;
540
753
  case GI_TYPE_TAG_INT8:
541
- argument->v_pointer = StringValueCStr(rb_argument);
542
- break;
543
754
  case GI_TYPE_TAG_UINT8:
544
755
  argument->v_pointer = RSTRING_PTR(rb_argument);
545
756
  break;
@@ -55,9 +55,14 @@ static VALUE
55
55
  struct_alloc(VALUE klass)
56
56
  {
57
57
  VALUE rb_size;
58
+ size_t size;
59
+ gpointer instance;
58
60
 
59
61
  rb_size = rb_iv_get(klass, "@size");
60
- return Data_Wrap_Struct(klass, NULL, xfree, xmalloc(NUM2ULONG(rb_size)));
62
+ size = NUM2ULONG(rb_size);
63
+ instance = xmalloc(size);
64
+ memset(instance, 0, size);
65
+ return Data_Wrap_Struct(klass, NULL, xfree, instance);
61
66
  }
62
67
 
63
68
  static VALUE
@@ -121,7 +126,7 @@ rg_s_register_boxed_class_converter(VALUE klass, VALUE rb_gtype)
121
126
 
122
127
  memset(&table, 0, sizeof(RGConvertTable));
123
128
  CONST_ID(id_to_i, "to_i");
124
- table.type = NUM2UINT(rb_funcall(rb_gtype, id_to_i, 0));
129
+ table.type = NUM2ULONG(rb_funcall(rb_gtype, id_to_i, 0));
125
130
  table.klass = Qnil;
126
131
  table.instance2robj = boxed_instance2robj;
127
132
 
@@ -71,7 +71,7 @@ rg_get_field_value(VALUE self, VALUE rb_struct, VALUE rb_n)
71
71
  VALUE rb_gtype;
72
72
  GType gtype;
73
73
  rb_gtype = rb_funcall(rb_struct, rb_intern("gtype"), 0);
74
- gtype = NUM2UINT(rb_funcall(rb_gtype, rb_intern("to_i"), 0));
74
+ gtype = NUM2ULONG(rb_funcall(rb_gtype, rb_intern("to_i"), 0));
75
75
  instance = RVAL2BOXED(rb_struct, gtype);
76
76
  } else {
77
77
  Data_Get_Struct(rb_struct, void, instance);
Binary file
Binary file
@@ -31,7 +31,9 @@ class TestFunctionInfo < Test::Unit::TestCase
31
31
  end
32
32
 
33
33
  def test_invoke
34
- assert_equal("notify", @info.invoke(1))
34
+ # TODO: "#invoke" expects Array. We should confirm specification.
35
+ #assert_equal("notify", @info.invoke(1))
36
+ assert_equal("notify", @info.invoke([1]))
35
37
  end
36
38
  end
37
39
 
Binary file
Binary file
@@ -26,6 +26,7 @@ from giscanner.scannermain import (get_preprocessor_option_group,
26
26
  create_source_scanner,
27
27
  process_packages)
28
28
 
29
+
29
30
  def annotation_main(args):
30
31
  parser = optparse.OptionParser('%prog [options] sources')
31
32