gir_ffi 0.15.1 → 0.15.2
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/Changelog.md +5 -0
- data/README.md +7 -6
- data/lib/ffi-gobject_introspection/lib.rb +1 -1
- data/lib/gir_ffi/version.rb +1 -1
- data/test/integration/generated_regress_test.rb +32 -8
- data/test/introspection_test_helper.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8d94670dbb092ece3c0225fe0c77a7457396df6e9c2fea40d11dabe5a4a2a55
|
4
|
+
data.tar.gz: f6e93738320b337279fbad487ea40996f4e99c40a90c892ae1c9d7836f89adff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39265520b4755ffd62d8e065ff07793cc3dbb086d9062c12c06210cd85b2586b03838a931154175773aecb70cbae9e3a0c59ff08dfef63588d983c159688c5fb
|
7
|
+
data.tar.gz: 5e9e9cdd8c21b416279afea10bc7283497d5c52010497e45142a5aa40098d7680e430afacf6fecea61e7ac2720224fcb9fe34a2f74588dbe77af9aa6c0a4ae76
|
data/Changelog.md
CHANGED
data/README.md
CHANGED
@@ -69,11 +69,12 @@ On Debian and Ubuntu, installing `libgirepository1.0-1` and `gir1.2-glib-2.0`
|
|
69
69
|
should be enough to use GirFFI in your application.
|
70
70
|
|
71
71
|
To run the tests, you should additionally install `libgirepository1.0-dev`,
|
72
|
-
`
|
72
|
+
`gobject-introspection`, `gir1.2-gtop-2.0`, `gir1.2-gtk-3.0`,
|
73
73
|
`gir1.2-gtksource-3.0`, `gir1.2-pango-1.0`, `gir1.2-secret-1` and
|
74
74
|
`gir1.2-gstreamer-1.0`. This should be enough to get `rake test` working.
|
75
75
|
|
76
|
-
GirFFI has not been tested on Mac OS X or Microsoft Windows. YMMV.
|
76
|
+
GirFFI has not been tested on Mac OS X or Microsoft Windows. YMMV. Pull
|
77
|
+
requests to support these platforms are welcome.
|
77
78
|
|
78
79
|
## Overrides
|
79
80
|
|
@@ -96,9 +97,9 @@ Please feel free to file bugs or send pull requests!
|
|
96
97
|
If you just want to help out but don't know where to start, have a look at
|
97
98
|
TODO.md, and check the notes in the code (e.g., using `dnote`).
|
98
99
|
|
99
|
-
If you want to send pull requests or patches,
|
100
|
-
|
101
|
-
out
|
100
|
+
If you want to send pull requests or patches, try to follow the instructions
|
101
|
+
below. **If you get stuck, please make a pull request anyway and I'll try to
|
102
|
+
help out.**
|
102
103
|
|
103
104
|
* Make sure `rake test` runs without reporting any failures.
|
104
105
|
* Add tests for your feature. Otherwise, I can't see if it works or if I
|
@@ -119,7 +120,7 @@ The following people have contributed to GirFFI over the years:
|
|
119
120
|
|
120
121
|
## License
|
121
122
|
|
122
|
-
Copyright © 2009–
|
123
|
+
Copyright © 2009–2019 [Matijs van Zuijlen](http://www.matijs.net)
|
123
124
|
|
124
125
|
GirFFI is free software, distributed under the terms of the GNU Lesser
|
125
126
|
General Public License, version 2.1 or later. See the file COPYING.LIB for
|
data/lib/gir_ffi/version.rb
CHANGED
@@ -941,7 +941,10 @@ describe Regress do
|
|
941
941
|
instance = make_derived_instance do |info|
|
942
942
|
# TODO: Do not pass callback again in user_data if destroy notifier is absent
|
943
943
|
info.install_vfunc_implementation :do_baz,
|
944
|
-
proc { |obj, callback, _user_data|
|
944
|
+
proc { |obj, callback, _user_data|
|
945
|
+
callback.call
|
946
|
+
a = obj.get_name
|
947
|
+
}
|
945
948
|
end
|
946
949
|
b = nil
|
947
950
|
instance.do_baz { b = "hello" }
|
@@ -2314,7 +2317,10 @@ describe Regress do
|
|
2314
2317
|
it "handles the 'test' signal" do
|
2315
2318
|
a = b = nil
|
2316
2319
|
o = Regress::TestSubObj.new
|
2317
|
-
GObject.signal_connect(o, "test", 2)
|
2320
|
+
GObject.signal_connect(o, "test", 2) do |i, d|
|
2321
|
+
a = d
|
2322
|
+
b = i
|
2323
|
+
end
|
2318
2324
|
GObject.signal_emit o, "test"
|
2319
2325
|
assert_equal [2, o], [a, b]
|
2320
2326
|
end
|
@@ -3347,7 +3353,10 @@ describe Regress do
|
|
3347
3353
|
it "has a working function #test_callback_async" do
|
3348
3354
|
a = 1
|
3349
3355
|
stored_proc = nil
|
3350
|
-
Regress.test_callback_async
|
3356
|
+
Regress.test_callback_async do |user_data|
|
3357
|
+
stored_proc = user_data
|
3358
|
+
a = 2
|
3359
|
+
end
|
3351
3360
|
result = Regress.test_callback_thaw_async
|
3352
3361
|
_(a).must_equal 2
|
3353
3362
|
_(stored_proc).wont_be_nil
|
@@ -3360,7 +3369,10 @@ describe Regress do
|
|
3360
3369
|
it "has a working function #test_callback_destroy_notify" do
|
3361
3370
|
a = 1
|
3362
3371
|
stored_proc = nil
|
3363
|
-
r1 = Regress.test_callback_destroy_notify
|
3372
|
+
r1 = Regress.test_callback_destroy_notify do |user_data|
|
3373
|
+
stored_proc = user_data
|
3374
|
+
a = 2
|
3375
|
+
end
|
3364
3376
|
_(a).must_equal 2
|
3365
3377
|
stored_id = stored_proc.object_id
|
3366
3378
|
_(GirFFI::CallbackBase::CALLBACKS[stored_id].object_id).must_equal stored_id
|
@@ -3401,9 +3413,18 @@ describe Regress do
|
|
3401
3413
|
|
3402
3414
|
it "has a working function #test_callback_thaw_async" do
|
3403
3415
|
invoked = []
|
3404
|
-
Regress.test_callback_async
|
3405
|
-
|
3406
|
-
|
3416
|
+
Regress.test_callback_async do
|
3417
|
+
invoked << 1
|
3418
|
+
1
|
3419
|
+
end
|
3420
|
+
Regress.test_callback_async do
|
3421
|
+
invoked << 2
|
3422
|
+
2
|
3423
|
+
end
|
3424
|
+
Regress.test_callback_async do
|
3425
|
+
invoked << 3
|
3426
|
+
3
|
3427
|
+
end
|
3407
3428
|
result = Regress.test_callback_thaw_async
|
3408
3429
|
_(invoked).must_equal [3, 2, 1]
|
3409
3430
|
_(result).must_equal 1
|
@@ -3418,7 +3439,10 @@ describe Regress do
|
|
3418
3439
|
|
3419
3440
|
it "has a working function #test_callback_user_data" do
|
3420
3441
|
stored_id = nil
|
3421
|
-
result = Regress.test_callback_user_data
|
3442
|
+
result = Regress.test_callback_user_data do |u|
|
3443
|
+
stored_id = u
|
3444
|
+
5
|
3445
|
+
end
|
3422
3446
|
# TODO: Ensure that the key stored_id is no longer in the callback store
|
3423
3447
|
_(stored_id).wont_be_nil
|
3424
3448
|
_(result).must_equal 5
|
@@ -50,7 +50,7 @@ module IntrospectionTestExtensions
|
|
50
50
|
get_introspection_data(namespace, klass).find_vfunc name
|
51
51
|
end
|
52
52
|
|
53
|
-
def skip_below(introduction_version)
|
53
|
+
def skip_below(introduction_version)
|
54
54
|
unless LATEST_VERSION >= introduction_version
|
55
55
|
raise "Version #{introduction_version} is too new and would always be skipped"
|
56
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gir_ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matijs van Zuijlen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|