gobject-introspection 3.4.0 → 3.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 439904c07c9ece750e11324a9e7220e92703960c464e3096b592b4a0c60089ed
4
- data.tar.gz: 43364a70a42e79df745fa61912d528b47442025f42b7456ee950dbcad7b259e6
3
+ metadata.gz: a4a0dcd42cc81ede7f2bf23f3c89249bdf37da5dc5ee5bf930638d7d087d6f79
4
+ data.tar.gz: 9fa9fcc1b10c554343c74f2d52c96713c1dec9b23f4f1243303731f29164a20d
5
5
  SHA512:
6
- metadata.gz: 96504ea3a2364df9625cf2b3846479f07cf0dbea4aeb81b5761aca751959476db272a15479c64d244ad72ab77f0b21698a3896ebec0efb1bdac56cc2f444958d
7
- data.tar.gz: 9b8b9e7ad2545423e95baa93241ba7ac4679cf5e5871361ffe58f503f3abb4b8997da90d2e85ec17423ead5abe80aa2a54b4ca6c6d1d024fd399bc67be0d157f
6
+ metadata.gz: '07637212088a8b3d07a699ee08367a40a4d403be2da5b00e3be860bd08512f4b8c072fe616974ab2cd7956e3f7832dcbc5c6f0b6de5444e24ea66469496ea313'
7
+ data.tar.gz: 6bbcab430782dec0a33411d26f98335c0a5bc91c96f680ccf84407c78eb0b26f5fc43db608c3980c26d171983d89aa2d69d29c761ffb135bb90b345b424f479d
@@ -120,7 +120,7 @@ rb_gi_ffi_closure_callback(G_GNUC_UNUSED ffi_cif *cif,
120
120
  i = args.metadata->len - 1;
121
121
  metadata = g_ptr_array_index(args.metadata, i);
122
122
  if (metadata->type.tag == GI_TYPE_TAG_VOID &&
123
- metadata->pointer_p &&
123
+ metadata->type.pointer_p &&
124
124
  strcmp(metadata->name, "data") == 0) {
125
125
  callback_data = *((RBGICallbackData **)(raw_args[i]));
126
126
  }
@@ -721,26 +721,50 @@ rb_gi_arguments_in_init_arg_ruby_array_c_interface_struct(RBGIArguments *args,
721
721
  {
722
722
  GIStructInfo *struct_info =
723
723
  (GIStructInfo *)(metadata->element_type.interface_info);
724
- guint8 *raw_array;
725
- gsize struct_size;
726
724
  long i, n_elements;
727
725
 
728
726
  n_elements = RARRAY_LEN(rb_array);
729
- struct_size = g_struct_info_get_size(struct_info);
730
- raw_array = ALLOC_N(guint8, struct_size * n_elements);
731
- for (i = 0; i < n_elements; i++) {
732
- VALUE rb_element = RARRAY_AREF(rb_array, i);
733
- gpointer element;
734
- element = rb_gi_struct_info_from_ruby(struct_info, rb_element);
735
- memcpy(raw_array + (struct_size * i),
736
- element,
737
- struct_size);
727
+ if (metadata->element_type.pointer_p) {
728
+ if (metadata->transfer != GI_TRANSFER_NOTHING) {
729
+ rb_raise(rb_eNotImpError,
730
+ "TODO: [%s::%s] %s "
731
+ "Ruby -> GIArgument(array/%s)[interface(%s)](%s)[%s]",
732
+ args->name,
733
+ metadata->name,
734
+ rb_gi_direction_to_string(metadata->direction),
735
+ rb_gi_array_type_to_string(metadata->array_type),
736
+ g_info_type_to_string(metadata->element_type.interface_type),
737
+ g_type_name(metadata->element_type.interface_gtype),
738
+ rb_gi_transfer_to_string(metadata->transfer));
739
+ }
740
+ gpointer *raw_array = ALLOC_N(gpointer, n_elements);
741
+ for (i = 0; i < n_elements; i++) {
742
+ VALUE rb_element = RARRAY_AREF(rb_array, i);
743
+ gpointer element;
744
+ element = rb_gi_struct_info_from_ruby(struct_info, rb_element);
745
+ raw_array[i] = element;
746
+ }
747
+ rb_gi_arguments_in_init_arg_ruby_array_c_generic(args,
748
+ metadata,
749
+ rb_array,
750
+ raw_array);
751
+ } else {
752
+ gsize struct_size = g_struct_info_get_size(struct_info);
753
+ guint8 *raw_array = ALLOC_N(guint8, struct_size * n_elements);
754
+ for (i = 0; i < n_elements; i++) {
755
+ VALUE rb_element = RARRAY_AREF(rb_array, i);
756
+ gpointer element;
757
+ element = rb_gi_struct_info_from_ruby(struct_info, rb_element);
758
+ memcpy(raw_array + (struct_size * i),
759
+ element,
760
+ struct_size);
761
+ }
762
+ rb_gi_arguments_in_init_arg_ruby_array_c_generic(args,
763
+ metadata,
764
+ rb_array,
765
+ raw_array);
738
766
  }
739
767
 
740
- rb_gi_arguments_in_init_arg_ruby_array_c_generic(args,
741
- metadata,
742
- rb_array,
743
- raw_array);
744
768
  metadata->free_func = rb_gi_arguments_in_free_array_c_interface_struct;
745
769
  }
746
770
 
@@ -584,7 +584,7 @@ rb_gi_arguments_out_init_arg(RBGIArguments *args,
584
584
  memset(argument, 0, sizeof(GIArgument));
585
585
  switch (metadata->type.tag) {
586
586
  case GI_TYPE_TAG_VOID:
587
- if (metadata->pointer_p) {
587
+ if (metadata->type.pointer_p) {
588
588
  gpointer *pointer = ALLOC(gpointer);
589
589
  *pointer = NULL;
590
590
  argument->v_pointer = pointer;
@@ -800,7 +800,7 @@ rb_gi_arguments_out_to_ruby_arg(RBGIArguments *args,
800
800
  memset(&normalized_argument, 0, sizeof(GIArgument));
801
801
  switch (metadata->type.tag) {
802
802
  case GI_TYPE_TAG_VOID:
803
- if (metadata->pointer_p) {
803
+ if (metadata->type.pointer_p) {
804
804
  normalized_argument.v_pointer = *((gpointer *)(argument->v_pointer));
805
805
  }
806
806
  break;
@@ -57,12 +57,14 @@ rb_gi_arg_metadata_type_init(RBGIArgMetadataType *type,
57
57
  GITypeInfo *type_info)
58
58
  {
59
59
  type->info = type_info;
60
+ type->pointer_p = FALSE;
60
61
  type->tag = GI_TYPE_TAG_VOID;
61
62
  type->interface_info = NULL;
62
63
  type->interface_type = GI_INFO_TYPE_INVALID;
63
64
  type->interface_gtype = G_TYPE_INVALID;
64
65
 
65
66
  if (type->info) {
67
+ type->pointer_p = g_type_info_is_pointer(type->info);
66
68
  type->tag = g_type_info_get_tag(type->info);
67
69
  }
68
70
  if (type->tag == GI_TYPE_TAG_INTERFACE) {
@@ -114,7 +116,6 @@ rb_gi_arg_metadata_new(GICallableInfo *callable_info, gint i)
114
116
  metadata->array_p = (metadata->type.tag == GI_TYPE_TAG_ARRAY);
115
117
  metadata->array_length_p = FALSE;
116
118
  metadata->may_be_null_p = rb_gi_arg_info_may_be_null(arg_info);
117
- metadata->pointer_p = g_type_info_is_pointer(type_info);
118
119
  metadata->caller_allocates_p = g_arg_info_is_caller_allocates(arg_info);
119
120
  metadata->zero_terminated_p = FALSE;
120
121
  metadata->output_buffer_p = rb_gi_arg_info_is_output_buffer(arg_info);
@@ -40,6 +40,7 @@ typedef void (*RBGIArgFreeFunc)(RBGIArguments *args,
40
40
 
41
41
  typedef struct {
42
42
  GITypeInfo *info;
43
+ gboolean pointer_p;
43
44
  GITypeTag tag;
44
45
  GIBaseInfo *interface_info;
45
46
  GIInfoType interface_type;
@@ -64,7 +65,6 @@ struct RBGIArgMetadata_ {
64
65
  gboolean array_length_p;
65
66
  gboolean interface_p;
66
67
  gboolean may_be_null_p;
67
- gboolean pointer_p;
68
68
  gboolean caller_allocates_p;
69
69
  gboolean zero_terminated_p;
70
70
  gboolean output_buffer_p;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gobject-introspection
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME Project Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-10 00:00:00.000000000 Z
11
+ date: 2019-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glib2
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.4.0
19
+ version: 3.4.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.4.0
26
+ version: 3.4.1
27
27
  description: Ruby/GObjectIntrospection provides bindings of GObject Introspection
28
28
  and a loader module that can generate dynamically Ruby bindings of any GObject C
29
29
  libraries
@@ -154,7 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubygems_version: 3.1.0.pre1
157
+ rubyforge_project:
158
+ rubygems_version: 2.7.6.2
158
159
  signing_key:
159
160
  specification_version: 4
160
161
  summary: Ruby/GObjectIntrospection is a Ruby binding of GObject Introspection.