gobject-introspection 3.2.1-x86-mingw32 → 3.2.2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +5 -5
  2. data/Rakefile +10 -7
  3. data/ext/gobject-introspection/rb-gi-argument.c +64 -16
  4. data/ext/gobject-introspection/rb-gi-conversions.h +3 -4
  5. data/ext/gobject-introspection/rb-gi-function-info.c +17 -8
  6. data/lib/2.2/gobject_introspection.so +0 -0
  7. data/lib/2.3/gobject_introspection.so +0 -0
  8. data/lib/2.4/gobject_introspection.so +0 -0
  9. data/lib/2.5/gobject_introspection.so +0 -0
  10. data/lib/gobject-introspection/loader.rb +11 -4
  11. data/vendor/local/bin/g-ir-compiler.exe +0 -0
  12. data/vendor/local/bin/g-ir-generate.exe +0 -0
  13. data/vendor/local/bin/g-ir-inspect.exe +0 -0
  14. data/vendor/local/bin/libgirepository-1.0-1.dll +0 -0
  15. data/vendor/local/lib/girepository-1.0/GIRepository-2.0.typelib +0 -0
  16. data/vendor/local/lib/girepository-1.0/GLib-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/gobject-introspection/giscanner/__init__.pyc +0 -0
  20. data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyo +0 -0
  21. data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyc +0 -0
  22. data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyo +0 -0
  23. data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyc +0 -0
  24. data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyo +0 -0
  25. data/vendor/local/lib/gobject-introspection/giscanner/ast.pyc +0 -0
  26. data/vendor/local/lib/gobject-introspection/giscanner/ast.pyo +0 -0
  27. data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyc +0 -0
  28. data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyo +0 -0
  29. data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.py +3 -2
  30. data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyc +0 -0
  31. data/vendor/local/lib/gobject-introspection/giscanner/ccompiler.pyo +0 -0
  32. data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyc +0 -0
  33. data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyo +0 -0
  34. data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.pyc +0 -0
  35. data/vendor/local/lib/gobject-introspection/giscanner/collections/__init__.pyo +0 -0
  36. data/vendor/local/lib/gobject-introspection/giscanner/collections/counter.pyc +0 -0
  37. data/vendor/local/lib/gobject-introspection/giscanner/collections/counter.pyo +0 -0
  38. data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.pyc +0 -0
  39. data/vendor/local/lib/gobject-introspection/giscanner/collections/ordereddict.pyo +0 -0
  40. data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyc +0 -0
  41. data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyo +0 -0
  42. data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyc +0 -0
  43. data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyo +0 -0
  44. data/vendor/local/lib/gobject-introspection/giscanner/dumper.py +1 -1
  45. data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyc +0 -0
  46. data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyo +0 -0
  47. data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyc +0 -0
  48. data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyo +0 -0
  49. data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyc +0 -0
  50. data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyo +0 -0
  51. data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyc +0 -0
  52. data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyo +0 -0
  53. data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyc +0 -0
  54. data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyo +0 -0
  55. data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyc +0 -0
  56. data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyo +0 -0
  57. data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.py +1 -0
  58. data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyc +0 -0
  59. data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyo +0 -0
  60. data/vendor/local/lib/gobject-introspection/giscanner/message.pyc +0 -0
  61. data/vendor/local/lib/gobject-introspection/giscanner/message.pyo +0 -0
  62. data/vendor/local/lib/gobject-introspection/giscanner/msvccompiler.pyc +0 -0
  63. data/vendor/local/lib/gobject-introspection/giscanner/msvccompiler.pyo +0 -0
  64. data/vendor/local/lib/gobject-introspection/giscanner/scannermain.py +1 -1
  65. data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyc +0 -0
  66. data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyo +0 -0
  67. data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyc +0 -0
  68. data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyo +0 -0
  69. data/vendor/local/lib/gobject-introspection/giscanner/shlibs.py +7 -2
  70. data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyc +0 -0
  71. data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyo +0 -0
  72. data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.py +1 -0
  73. data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyc +0 -0
  74. data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyo +0 -0
  75. data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyc +0 -0
  76. data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyo +0 -0
  77. data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyc +0 -0
  78. data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyo +0 -0
  79. data/vendor/local/lib/gobject-introspection/giscanner/utils.py +4 -0
  80. data/vendor/local/lib/gobject-introspection/giscanner/utils.pyc +0 -0
  81. data/vendor/local/lib/gobject-introspection/giscanner/utils.pyo +0 -0
  82. data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyc +0 -0
  83. data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyo +0 -0
  84. data/vendor/local/lib/libgirepository-1.0.a +0 -0
  85. data/vendor/local/lib/libgirepository-1.0.dll.a +0 -0
  86. data/vendor/local/lib/libgirepository-1.0.la +3 -3
  87. data/vendor/local/lib/pkgconfig/gobject-introspection-1.0.pc +2 -2
  88. data/vendor/local/lib/pkgconfig/gobject-introspection-no-export-1.0.pc +2 -2
  89. data/vendor/local/share/gir-1.0/GIRepository-2.0.gir +16 -5
  90. data/vendor/local/share/gir-1.0/GLib-2.0.gir +911 -377
  91. data/vendor/local/share/gir-1.0/GObject-2.0.gir +110 -53
  92. data/vendor/local/share/gir-1.0/Gio-2.0.gir +835 -287
  93. data/vendor/local/share/gobject-introspection-1.0/Makefile.introspection +1 -1
  94. data/vendor/local/share/gobject-introspection-1.0/tests/foo.h +1 -0
  95. data/vendor/local/share/gobject-introspection-1.0/tests/regress.c +2 -1
  96. data/vendor/local/share/gobject-introspection-1.0/tests/regress.h +10 -2
  97. data/vendor/local/share/license/gobject-introspection/COPYING +1 -1
  98. data/vendor/local/share/man/man1/g-ir-compiler.1 +3 -3
  99. data/vendor/local/share/man/man1/g-ir-generate.1 +2 -1
  100. metadata +8 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: face22394f08ebca5417da7390de660967d6a916
4
- data.tar.gz: f3a2a68635c0d4855cca4ae1ff4f8385d9416f98
2
+ SHA256:
3
+ metadata.gz: d194b2a3011b7d4c864a8884ed7d3eb7bf05d46c592cf9c62bb37fbe08bbead3
4
+ data.tar.gz: 648e946cc39dab34d9a287a48c7a26e0e7f17ca769fbeadb4e1bf79ab6b6f397
5
5
  SHA512:
6
- metadata.gz: 92aa1e0b81aebf932e287a7fdf48a362cc086f1918338f40eea57114570ea5e601e7ed03dd1935d1d599c06e11ab2c72fb90b82586aa68cedf632f2f09d33780
7
- data.tar.gz: ab8954297edd89c13d0c04becec8a8685bf2d03ff80561a8543e1819fc77e402d0e5e2c628916c27b3b28b4c5287f38db17ca1821c383a7bd488d2f49401bb7a
6
+ metadata.gz: 12786609db8a94078cf41ae96a8f9855c611b64e16dc0d94ae46c803b3460604a264c690fb8589639f66dcd95014d9d1428c647a616cd3d22ad639443a5a31ee
7
+ data.tar.gz: 006202341b9738d462e150857c24dd13ea3cf7fd624a92a36d52b485a0cf91f5311db49cc99c1e5f7743c75eafc4c149f1b03636131532fcc7cc77cdb39983bc
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.54.1",
35
+ :version => "2.56.0",
36
36
  :compression_method => "xz",
37
37
  :windows => {
38
38
  :build => false,
@@ -47,7 +47,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
47
47
  :name => "gobject-introspection",
48
48
  :download_site => :gnome,
49
49
  :label => "gobject-introspection",
50
- :version => "1.54.1",
50
+ :version => "1.56.0",
51
51
  :compression_method => "xz",
52
52
  :windows => {
53
53
  :configure_args => [
@@ -58,12 +58,12 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
58
58
  "support-external-g-ir-scanner.diff",
59
59
  ],
60
60
  :need_autoreconf => true,
61
+ :build_concurrently => false,
61
62
  :built_file => "bin/libgirepository-1.0-1.dll",
62
63
  },
63
64
  :native => {
64
65
  :build => true,
65
66
  :patches => [
66
- # "cross-compilable-g-ir-scanner.diff",
67
67
  ],
68
68
  :built_file => "bin/g-ir-scanner",
69
69
  }
@@ -74,20 +74,23 @@ package_task.define
74
74
 
75
75
  namespace :native do
76
76
  namespace :"gobject-introspection" do
77
+ patched_paths = []
78
+
77
79
  g_ir_scanner_dir = package_task.native.absolute_binary_dir
78
80
  g_ir_scanner_dir += "lib/gobject-introspection/giscanner"
79
- patched_path = g_ir_scanner_dir + "patched"
80
- file patched_path.to_s do
81
+ g_ir_scanner_patched_path = g_ir_scanner_dir + "patched"
82
+ patched_paths << g_ir_scanner_patched_path
83
+ file g_ir_scanner_patched_path.to_s do
81
84
  Dir.chdir(g_ir_scanner_dir.to_s) do
82
85
  patch = "#{package_task.package.patches_dir}/cross-g-ir-scanner.diff"
83
86
  sh("patch -p2 < #{patch}")
84
87
  rm_f(Dir.glob("*.{pyc,pyo}"))
85
88
  end
86
- touch(patched_path)
89
+ touch(g_ir_scanner_patched_path)
87
90
  end
88
91
 
89
92
  desc "Make g-ir-scanner workable for Windows on non Windows"
90
- task :cross => patched_path
93
+ task :cross => patched_paths
91
94
  end
92
95
 
93
96
  namespace :builder do
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2012-2017 Ruby-GNOME2 Project Team
3
+ * Copyright (C) 2012-2018 Ruby-GNOME2 Project Team
4
4
  *
5
5
  * This library is free software; you can redistribute it and/or
6
6
  * modify it under the terms of the GNU Lesser General Public
@@ -21,6 +21,7 @@
21
21
  #include "rb-gi-private.h"
22
22
 
23
23
  static VALUE rb_cGLibValue = Qnil;
24
+ static VALUE rb_cGLibBytes = Qnil;
24
25
 
25
26
  static const gchar *
26
27
  rb_gi_transfer_to_string(GITransfer transfer)
@@ -267,6 +268,14 @@ array_c_to_ruby_sized(gconstpointer *elements,
267
268
  }
268
269
  break;
269
270
  case GI_TYPE_TAG_FILENAME:
271
+ g_base_info_unref(element_type_info);
272
+ {
273
+ const gchar **filenames = (const gchar **)elements;
274
+ for (i = 0; i < n_elements; i++) {
275
+ rb_ary_push(rb_array, CSTRFILENAME2RVAL(filenames[i]));
276
+ }
277
+ }
278
+ break;
270
279
  case GI_TYPE_TAG_ARRAY:
271
280
  g_base_info_unref(element_type_info);
272
281
  rb_raise(rb_eNotImpError,
@@ -1264,10 +1273,10 @@ rb_gi_argument_to_ruby(GIArgument *argument,
1264
1273
  rb_argument = UINT2NUM(argument->v_uint32);
1265
1274
  break;
1266
1275
  case GI_TYPE_TAG_INT64:
1267
- rb_argument = LONG2NUM(argument->v_int64);
1276
+ rb_argument = LL2NUM(argument->v_int64);
1268
1277
  break;
1269
1278
  case GI_TYPE_TAG_UINT64:
1270
- rb_argument = ULONG2NUM(argument->v_uint64);
1279
+ rb_argument = ULL2NUM(argument->v_uint64);
1271
1280
  break;
1272
1281
  case GI_TYPE_TAG_FLOAT:
1273
1282
  rb_argument = DBL2NUM(argument->v_float);
@@ -2281,6 +2290,8 @@ rb_gi_return_argument_free_everything_array_c(GIArgument *argument,
2281
2290
  g_strfreev(argument->v_pointer);
2282
2291
  break;
2283
2292
  case GI_TYPE_TAG_FILENAME:
2293
+ g_strfreev(argument->v_pointer);
2294
+ break;
2284
2295
  case GI_TYPE_TAG_ARRAY:
2285
2296
  case GI_TYPE_TAG_INTERFACE:
2286
2297
  case GI_TYPE_TAG_GLIST:
@@ -2869,13 +2880,17 @@ rb_gi_value_argument_from_ruby_interface(GIArgument *argument,
2869
2880
  }
2870
2881
  argument->v_pointer = gvalue;
2871
2882
  } else if (gtype == G_TYPE_BYTES) {
2872
- VALUE rb_string;
2873
- GBytes *gbytes;
2883
+ if (RVAL2CBOOL(rb_obj_is_kind_of(rb_argument, rb_cGLibBytes))) {
2884
+ argument->v_pointer = RVAL2BOXED(rb_argument, G_TYPE_BYTES);
2885
+ } else {
2886
+ VALUE rb_string;
2887
+ GBytes *gbytes;
2874
2888
 
2875
- rb_string = StringValue(rb_argument);
2876
- gbytes = g_bytes_new(RSTRING_PTR(rb_string),
2877
- RSTRING_LEN(rb_string));
2878
- argument->v_pointer = gbytes;
2889
+ rb_string = StringValue(rb_argument);
2890
+ gbytes = g_bytes_new(RSTRING_PTR(rb_string),
2891
+ RSTRING_LEN(rb_string));
2892
+ argument->v_pointer = gbytes;
2893
+ }
2879
2894
  } else if (gtype == G_TYPE_CLOSURE) {
2880
2895
  GClosure *rclosure = NULL;
2881
2896
 
@@ -3136,10 +3151,10 @@ rb_gi_value_argument_from_ruby(GIArgument *argument, GITypeInfo *type_info,
3136
3151
  argument->v_uint32 = NUM2UINT(rb_argument);
3137
3152
  break;
3138
3153
  case GI_TYPE_TAG_INT64:
3139
- argument->v_int64 = NUM2LONG(rb_argument);
3154
+ argument->v_int64 = NUM2LL(rb_argument);
3140
3155
  break;
3141
3156
  case GI_TYPE_TAG_UINT64:
3142
- argument->v_uint64 = NUM2ULONG(rb_argument);
3157
+ argument->v_uint64 = NUM2ULL(rb_argument);
3143
3158
  break;
3144
3159
  case GI_TYPE_TAG_FLOAT:
3145
3160
  argument->v_float = NUM2DBL(rb_argument);
@@ -3406,14 +3421,46 @@ rb_gi_in_argument_transfer(GIArgument *argument, GITransfer transfer,
3406
3421
  }
3407
3422
 
3408
3423
  GIArgument *
3409
- rb_gi_in_argument_from_ruby(GIArgument *argument, GIArgInfo *arg_info,
3410
- VALUE rb_argument, VALUE self)
3424
+ rb_gi_in_argument_from_ruby(GICallableInfo *callable_info,
3425
+ GIArgument *argument,
3426
+ GIArgInfo *arg_info,
3427
+ guint nth_rb_argument,
3428
+ VALUE rb_argument,
3429
+ VALUE self)
3411
3430
  {
3412
3431
  GITypeInfo type_info;
3413
3432
 
3414
- if (g_arg_info_may_be_null(arg_info) && NIL_P(rb_argument)) {
3415
- memset(argument, 0, sizeof(GIArgument));
3416
- return argument;
3433
+ if (NIL_P(rb_argument)) {
3434
+ if (g_arg_info_may_be_null(arg_info)) {
3435
+ memset(argument, 0, sizeof(GIArgument));
3436
+ return argument;
3437
+ } else {
3438
+ const char *module_name;
3439
+ GIBaseInfo *klass;
3440
+ const char *suffix;
3441
+
3442
+ module_name = g_base_info_get_namespace(callable_info);
3443
+ klass = g_base_info_get_container(callable_info);
3444
+ if (nth_rb_argument == 1) {
3445
+ suffix = "st";
3446
+ } else if (nth_rb_argument == 2) {
3447
+ suffix = "nd";
3448
+ } else if (nth_rb_argument == 3) {
3449
+ suffix = "rd";
3450
+ } else {
3451
+ suffix = "th";
3452
+ }
3453
+ rb_raise(rb_eArgError,
3454
+ "<%s%s%s%s%s>: the %u%s argument must not nil: <%s>",
3455
+ module_name,
3456
+ klass ? "::" : "",
3457
+ klass ? g_base_info_get_name(klass) : "",
3458
+ klass ? "#" : ".",
3459
+ g_base_info_get_name(callable_info),
3460
+ nth_rb_argument,
3461
+ suffix,
3462
+ g_base_info_get_name(arg_info));
3463
+ }
3417
3464
  }
3418
3465
 
3419
3466
  g_arg_info_load_type(arg_info, &type_info);
@@ -4406,4 +4453,5 @@ void
4406
4453
  rb_gi_argument_init(void)
4407
4454
  {
4408
4455
  rb_cGLibValue = rb_const_get(mGLib, rb_intern("Value"));
4456
+ rb_cGLibBytes = rb_const_get(mGLib, rb_intern("Bytes"));
4409
4457
  }
@@ -46,9 +46,6 @@
46
46
  #define RVAL2GI_VALUE_ARGUMENT(argument, type_info, rb_argument, self) \
47
47
  (rb_gi_value_argument_from_ruby((argument), (type_info), \
48
48
  (rb_argument), (self)))
49
- #define RVAL2GI_IN_ARGUMENT(argument, arg_info, rb_argument, self) \
50
- (rb_gi_in_argument_from_ruby((argument), (arg_info), \
51
- (rb_argument), (self)))
52
49
  #define RVAL2GI_IN_ARRAY_ARGUMENT(array_argument, length_argument, \
53
50
  array_arg_info, length_arg_info, \
54
51
  rb_argument) \
@@ -127,8 +124,10 @@ GIArgument *rb_gi_value_argument_from_ruby (GIArgument *argument,
127
124
  GITypeInfo *type_info,
128
125
  VALUE rb_argument,
129
126
  VALUE self);
130
- GIArgument *rb_gi_in_argument_from_ruby (GIArgument *argument,
127
+ GIArgument *rb_gi_in_argument_from_ruby (GICallableInfo *callable_info,
128
+ GIArgument *argument,
131
129
  GIArgInfo *arg_info,
130
+ guint nth_rb_argument,
132
131
  VALUE rb_argument,
133
132
  VALUE self);
134
133
  GIArgument *rb_gi_in_array_argument_from_ruby (GIArgument *array_argument,
@@ -1123,8 +1123,11 @@ in_callback_argument_from_ruby(RBGIArgMetadata *metadata, GArray *in_args)
1123
1123
  }
1124
1124
 
1125
1125
  static void
1126
- in_argument_from_ruby(RBGIArgMetadata *metadata, VALUE rb_arguments,
1127
- GArray *in_args, GPtrArray *args_metadata,
1126
+ in_argument_from_ruby(GICallableInfo *callable_info,
1127
+ RBGIArgMetadata *metadata,
1128
+ VALUE rb_arguments,
1129
+ GArray *in_args,
1130
+ GPtrArray *args_metadata,
1128
1131
  VALUE self)
1129
1132
  {
1130
1133
  if (metadata->callback_p && !metadata->destroy_p) {
@@ -1172,10 +1175,12 @@ in_argument_from_ruby(RBGIArgMetadata *metadata, VALUE rb_arguments,
1172
1175
  rb_argument = RARRAY_PTR(rb_arguments)[metadata->rb_arg_index];
1173
1176
  }
1174
1177
  argument = &(g_array_index(in_args, GIArgument, metadata->in_arg_index));
1175
- RVAL2GI_IN_ARGUMENT(argument,
1176
- &(metadata->arg_info),
1177
- rb_argument,
1178
- self);
1178
+ rb_gi_in_argument_from_ruby(callable_info,
1179
+ argument,
1180
+ &(metadata->arg_info),
1181
+ metadata->rb_arg_index,
1182
+ rb_argument,
1183
+ self);
1179
1184
  }
1180
1185
  }
1181
1186
 
@@ -1215,8 +1220,12 @@ arguments_from_ruby(GICallableInfo *info, VALUE self, VALUE rb_arguments,
1215
1220
 
1216
1221
  metadata = g_ptr_array_index(args_metadata, i);
1217
1222
  if (metadata->in_arg_index != -1) {
1218
- in_argument_from_ruby(metadata, rb_arguments,
1219
- in_args, args_metadata, self);
1223
+ in_argument_from_ruby(info,
1224
+ metadata,
1225
+ rb_arguments,
1226
+ in_args,
1227
+ args_metadata,
1228
+ self);
1220
1229
  } else {
1221
1230
  out_argument_from_ruby(metadata, out_args);
1222
1231
  }
Binary file
Binary file
Binary file
Binary file
@@ -437,6 +437,12 @@ module GObjectIntrospection
437
437
  if name == "initialize"
438
438
  name += "_raw"
439
439
  end
440
+
441
+ n_in_args = function_info.n_in_args
442
+ if options[:n_in_args_offset]
443
+ n_in_args += options[:n_in_args_offset]
444
+ end
445
+
440
446
  return_type = function_info.return_type
441
447
  return_type_tag = return_type.tag
442
448
  if return_type_tag == TypeTag::VOID
@@ -445,11 +451,12 @@ module GObjectIntrospection
445
451
  return_type_tag = TypeTag::ARRAY
446
452
  end
447
453
  end
454
+
448
455
  case return_type_tag
449
456
  when TypeTag::BOOLEAN
450
457
  case name
451
458
  when "equal"
452
- if function_info.n_in_args == 1
459
+ if n_in_args == 1
453
460
  "=="
454
461
  else
455
462
  name
@@ -457,7 +464,7 @@ module GObjectIntrospection
457
464
  when /\A(?:is|get_is|can_be)_/
458
465
  "#{$POSTMATCH}?"
459
466
  when /\Aget_/
460
- if function_info.n_in_args.zero?
467
+ if n_in_args.zero?
461
468
  if function_info.n_out_args.zero?
462
469
  "#{$POSTMATCH}?"
463
470
  else
@@ -476,7 +483,7 @@ module GObjectIntrospection
476
483
  when TypeTag::GLIST, TypeTag::GSLIST, TypeTag::ARRAY
477
484
  case name
478
485
  when /\A(?:list|get)_/
479
- if function_info.n_in_args.zero?
486
+ if n_in_args.zero?
480
487
  $POSTMATCH
481
488
  else
482
489
  name
@@ -487,7 +494,7 @@ module GObjectIntrospection
487
494
  else
488
495
  case name
489
496
  when /\Aget_/
490
- if function_info.n_in_args.zero?
497
+ if n_in_args.zero?
491
498
  $POSTMATCH
492
499
  else
493
500
  name
Binary file
Binary file
Binary file
@@ -116,7 +116,7 @@ class CCompiler(object):
116
116
  runtime_path_envvar = []
117
117
  runtime_paths = []
118
118
 
119
- if self.check_is_msvc():
119
+ if os.name == 'nt':
120
120
  runtime_path_envvar = ['LIB', 'PATH']
121
121
  else:
122
122
  runtime_path_envvar = ['LD_LIBRARY_PATH']
@@ -288,9 +288,10 @@ class CCompiler(object):
288
288
  proc = subprocess.Popen([self.compiler_cmd, '-print-search-dirs'],
289
289
  stdout=subprocess.PIPE)
290
290
  o, e = proc.communicate()
291
+ libsearch = options.library_paths
291
292
  for line in o.decode('ascii').splitlines():
292
293
  if line.startswith('libraries: '):
293
- libsearch = line[len('libraries: '):].split(os.pathsep)
294
+ libsearch += line[len('libraries: '):].split(os.pathsep)
294
295
 
295
296
  shlibs = []
296
297
  not_resolved = []
@@ -227,7 +227,7 @@ class DumpCompiler(object):
227
227
  else:
228
228
  args.extend(['-o', output])
229
229
  if libtool:
230
- if os.name == 'nt':
230
+ if utils.host_os() == 'nt':
231
231
  args.append('-Wl,--export-all-symbols')
232
232
  else:
233
233
  args.append('-export-dynamic')
@@ -330,6 +330,7 @@ class MainTransformer(object):
330
330
  # might lose the ctype from the original node.
331
331
  if type_node is not None:
332
332
  result.ctype = type_node.ctype
333
+ result.complete_ctype = type_node.complete_ctype
333
334
  return result
334
335
 
335
336
  def _get_position(self, func, param):
@@ -562,7 +562,7 @@ def scanner_main(args):
562
562
  if options.warn_fatal and warning_count > 0:
563
563
  message.fatal("warnings configured as fatal")
564
564
  return 1
565
- elif warning_count > 0 and options.warn_all is False:
565
+ elif warning_count > 0 and options.warn_all is False and options.quiet is False:
566
566
  print("g-ir-scanner: %s: warning: %d warnings suppressed "
567
567
  "(use --warn-all to see them)" %
568
568
  (transformer.namespace.name, warning_count, ))
@@ -29,7 +29,7 @@ import platform
29
29
  import re
30
30
  import subprocess
31
31
 
32
- from .utils import get_libtool_command, extract_libtool_shlib
32
+ from .utils import get_libtool_command, extract_libtool_shlib, host_os
33
33
  from .ccompiler import CCompiler
34
34
 
35
35
 
@@ -94,7 +94,7 @@ def _resolve_non_libtool(options, binary, libraries):
94
94
  else:
95
95
  binary.args[0] = old_argdir
96
96
 
97
- if os.name == 'nt':
97
+ if host_os() == 'nt':
98
98
  cc = CCompiler()
99
99
  shlibs = cc.resolve_windows_libs(libraries, options)
100
100
 
@@ -117,6 +117,11 @@ def _resolve_non_libtool(options, binary, libraries):
117
117
  shlibs = []
118
118
  for line in proc.stdout:
119
119
  line = line.decode('ascii')
120
+ # ldd on *BSD show the argument passed on the first line even if
121
+ # there is only one argument. We have to ignore it because it is
122
+ # possible for the name of the binary to match _ldd_library_pattern.
123
+ if line == binary.args[0] + ':\n':
124
+ continue
120
125
  for library, pattern in patterns.items():
121
126
  m = pattern.search(line)
122
127
  if m:
@@ -70,6 +70,7 @@ STORAGE_CLASS_EXTERN = 1 << 2
70
70
  STORAGE_CLASS_STATIC = 1 << 3
71
71
  STORAGE_CLASS_AUTO = 1 << 4
72
72
  STORAGE_CLASS_REGISTER = 1 << 5
73
+ STORAGE_CLASS_THREAD_LOCAL = 1 << 6
73
74
 
74
75
  TYPE_QUALIFIER_NONE = 0
75
76
  TYPE_QUALIFIER_CONST = 1 << 1
@@ -184,6 +184,10 @@ def cflag_real_include_path(cflag):
184
184
  return "-I" + os.path.realpath(cflag[2:])
185
185
 
186
186
 
187
+ def host_os():
188
+ return os.environ.get("GI_HOST_OS", os.name)
189
+
190
+
187
191
  def which(program):
188
192
  def is_exe(fpath):
189
193
  return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
Binary file