gobject-introspection 3.4.6 → 3.4.7

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: 9ec68b3d114025ea94cc6822ae95955382bd477670237d0ff9756d51b73f5809
4
- data.tar.gz: bb1d89f8b52098cf67682090f938c200bf4ad39c7ff2a0c586acff67b9cb93aa
3
+ metadata.gz: 8155698d93f3dd547669c6f99f8c190d43a28e78f8ae343a0b397afaec2039e0
4
+ data.tar.gz: 9b0a49644e299b1c3cd484bd5e005e85e19aa7a872fd2caf4b7048fe6f78f50e
5
5
  SHA512:
6
- metadata.gz: 939c34fcaca4e950cd1aae46f18548d0ab6a4e606ff01008a36c746b7982ad29491792f24ca3f29fe4b76701e8faa95ad2738e5d7c2167a55023e15b2b73f8e7
7
- data.tar.gz: 5306728767ad7e6aa519ba6c1f039929f4256472a89f408c867bb424904f6400705aae7bf9debf5459fd46e81f9b4f73a596dffd2e0104255b64075673feb961
6
+ metadata.gz: 30ebf17fa41a3040f6c7e8d6e754d755c62862be2a84ceb7d3c88aeeaaeef562ab375087bb0c52a0b61e7bf5a242f0d2123201aec9b195e691105ffeaa5562ee
7
+ data.tar.gz: c8691d7a0cf8f3f3eb5c3bb25db2c5ba52bc6b8ed047509f1803da745547514ea2dd4b332aa330f67703bd40c19fbca36c1bfdb569c65c2d32fafd4b38bd48fa
@@ -508,7 +508,7 @@ rb_gi_arguments_fill_raw_out_gerror(RBGIArguments *args,
508
508
  gint n_args = g_callable_info_get_n_args(args->info);
509
509
  /* GError ** isn't listed in args. */
510
510
  GError **gerror = *((gpointer *)(args->raw_args[n_args]));
511
- VALUE cGLibError = rb_const_get(mGLib, rb_intern("Error"));
511
+ VALUE cGLibErrorInfo = rb_const_get(mGLib, rb_intern("ErrorInfo"));
512
512
  if (NIL_P(rb_error)) {
513
513
  g_set_error(gerror,
514
514
  RBG_RUBY_ERROR,
@@ -519,23 +519,22 @@ rb_gi_arguments_fill_raw_out_gerror(RBGIArguments *args,
519
519
  VALUE backtrace = rb_funcall(rb_error, rb_intern("backtrace"), 0);
520
520
  VALUE formatted_backtrace =
521
521
  rb_ary_join(backtrace, rb_str_new_cstr(" \n"));
522
- if (CBOOL2RVAL(rb_obj_is_kind_of(rb_error, cGLibError))) {
522
+ GQuark gdomain = RBG_RUBY_ERROR;
523
+ gint gcode = RBG_RUBY_ERROR_UNKNOWN;
524
+ if (RVAL2CBOOL(rb_obj_is_kind_of(rb_error, cGLibErrorInfo))) {
523
525
  VALUE domain = rb_funcall(rb_error, rb_intern("domain"), 0);
524
526
  VALUE code = rb_funcall(rb_error, rb_intern("code"), 0);
525
- g_set_error(gerror,
526
- g_quark_from_string(RVAL2CSTR(domain)),
527
- NUM2INT(code),
528
- "%s\n %s\n",
529
- RVAL2CSTR(message),
530
- RVAL2CSTR(formatted_backtrace));
531
- } else {
532
- g_set_error(gerror,
533
- RBG_RUBY_ERROR,
534
- RBG_RUBY_ERROR_UNKNOWN,
535
- "%s\n %s\n",
536
- RVAL2CSTR(message),
537
- RVAL2CSTR(formatted_backtrace));
527
+ if (!NIL_P(domain) && !NIL_P(code)) {
528
+ gdomain = g_quark_from_string(RVAL2CSTR(domain));
529
+ gcode = NUM2INT(code);
530
+ }
538
531
  }
532
+ g_set_error(gerror,
533
+ gdomain,
534
+ gcode,
535
+ "%s\n %s\n",
536
+ RVAL2CSTR(message),
537
+ RVAL2CSTR(formatted_backtrace));
539
538
  }
540
539
  }
541
540
 
@@ -544,7 +543,7 @@ rb_gi_arguments_fill_raw_result_interface(RBGIArguments *args,
544
543
  VALUE rb_result,
545
544
  gpointer raw_result,
546
545
  GITypeInfo *type_info,
547
- G_GNUC_UNUSED GITransfer transfer /* TODO */,
546
+ GITransfer transfer,
548
547
  gboolean is_return_value)
549
548
  {
550
549
  GIBaseInfo *interface_info;
@@ -584,8 +583,37 @@ rb_gi_arguments_fill_raw_result_interface(RBGIArguments *args,
584
583
  }
585
584
  break;
586
585
  case GI_INFO_TYPE_FLAGS:
586
+ rb_raise(rb_eNotImpError,
587
+ "TODO: %s::%s: out raw result(interface)[%s]: <%s>",
588
+ g_base_info_get_namespace(args->info),
589
+ g_base_info_get_name(args->info),
590
+ g_info_type_to_string(interface_type),
591
+ g_base_info_get_name(interface_info));
592
+ break;
587
593
  case GI_INFO_TYPE_OBJECT:
588
594
  case GI_INFO_TYPE_INTERFACE:
595
+ {
596
+ GObject *value = RVAL2GOBJ(rb_result);
597
+ GType gtype = g_registered_type_info_get_g_type(interface_info);
598
+ if (gtype != G_TYPE_NONE &&
599
+ !G_TYPE_CHECK_INSTANCE_TYPE(value, gtype)) {
600
+ rb_raise(rb_eArgError,
601
+ "%s::%s: must return <%s> object: <%" PRIsVALUE ">",
602
+ g_base_info_get_namespace(args->info),
603
+ g_base_info_get_name(args->info),
604
+ g_type_name(gtype),
605
+ rb_result);
606
+ }
607
+ if (transfer == GI_TRANSFER_EVERYTHING) {
608
+ g_object_ref(value);
609
+ }
610
+ if (is_return_value) {
611
+ ffi_return_value->v_pointer = value;
612
+ } else {
613
+ *((gpointer *)raw_result) = value;
614
+ }
615
+ }
616
+ break;
589
617
  case GI_INFO_TYPE_CONSTANT:
590
618
  rb_raise(rb_eNotImpError,
591
619
  "TODO: %s::%s: out raw result(interface)[%s]: <%s>",
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.6
4
+ version: 3.4.7
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: 2021-07-16 00:00:00.000000000 Z
11
+ date: 2021-07-30 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.6
19
+ version: 3.4.7
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.6
26
+ version: 3.4.7
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