fxruby 1.6.33 → 1.6.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +9 -1
- data/README.rdoc +1 -1
- data/Rakefile +2 -2
- data/examples/thread.rb +3 -3
- data/ext/fox16_c/FXRuby.cpp +7 -5
- data/ext/fox16_c/extconf.rb +9 -1
- data/ext/fox16_c/gvl_wrappers.cpp +3 -1
- data/ext/fox16_c/include/FXRuby.h +0 -14
- data/ext/fox16_c/include/gvl_wrappers.h +15 -11
- data/lib/fox16/thread.rb +2 -1
- data/lib/fox16/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdb64100c3c660af155b0cc354ca36d84c0625b2
|
4
|
+
data.tar.gz: a0e65e9075cb681ca3cce792ebe4415523820002
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bf5beea53bda6442aa96da25167fb1d1e9c056688522d5a6de94aee2017a0436e5cd61f4774e7643a8261134651acb787a7765869ce4b78be864761fc02cd58
|
7
|
+
data.tar.gz: fcdf7ccb8bdb6002256d7700010aa2c92423c869f24108b3d996183c4d06bf26533538dfd9dd8b482c3b71f595bf211bed5a8cf7f3dff0443b22036e0996631d
|
data/History.txt
CHANGED
@@ -1,6 +1,14 @@
|
|
1
|
+
=== 1.6.34 / 2016-04-26
|
2
|
+
|
3
|
+
* Add support for RubyInstaller-2.3
|
4
|
+
* Avoid RARRAY_PTR() which broke fxruby on ruby-2.3.0.
|
5
|
+
* Make use of StringValueCStr() where it is suitable.
|
6
|
+
* Fix initialisation of runOnUiThread event handler, when FXApp is called with a block.
|
7
|
+
* Disable GVL on RubyInstaller-1.9.3. Fixes #24
|
8
|
+
|
1
9
|
=== 1.6.33 / 2015-08-20
|
2
10
|
|
3
|
-
* Avoid calls that are prohibited
|
11
|
+
* Avoid rb_* calls that are prohibited during GC. Fixes #23
|
4
12
|
* Use copy'ing getters for FXVec members in FXMat*, FXMaterial and FXLight.
|
5
13
|
This fixes the TC_FXMaterial#test_bug test case.
|
6
14
|
* Fix test suite, so that all tests pass.
|
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= FXRuby
|
2
2
|
|
3
|
-
*
|
3
|
+
* http://github.com/larskanis/fxruby
|
4
4
|
* Full API-description: http://rubydoc.info/gems/fxruby/frames
|
5
5
|
* Latest fxruby {<img src="https://badge.fury.io/rb/fxruby.svg" alt="Gem Version" />}[http://badge.fury.io/rb/fxruby]
|
6
6
|
* Status (on Linux): {<img src="https://travis-ci.org/larskanis/fxruby.svg?branch=1.6" alt="Build Status" />}[https://travis-ci.org/larskanis/fxruby]
|
data/Rakefile
CHANGED
@@ -70,7 +70,7 @@ hoe = Hoe.spec "fxruby" do
|
|
70
70
|
self.extra_rdoc_files << self.readme_file
|
71
71
|
self.extra_deps << ['mini_portile', '~> 0.6']
|
72
72
|
self.extra_dev_deps << ['rake-compiler', '~> 0.9']
|
73
|
-
self.extra_dev_deps << ['rake-compiler-dock', '~> 0.
|
73
|
+
self.extra_dev_deps << ['rake-compiler-dock', '~> 0.5.2']
|
74
74
|
self.extra_dev_deps << ['opengl', '~> 0.8']
|
75
75
|
self.extra_dev_deps << ['glu', '~> 8.0']
|
76
76
|
self.extra_dev_deps << ['test-unit', '~> 3.1']
|
@@ -157,7 +157,7 @@ end
|
|
157
157
|
desc "Build the windows binary gems"
|
158
158
|
task 'gem:windows' => 'gem' do
|
159
159
|
require 'rake_compiler_dock'
|
160
|
-
RakeCompilerDock.sh "rake cross native gem
|
160
|
+
RakeCompilerDock.sh "rake cross native gem MAKE=\"nice make V=1 -j `nproc`\" "
|
161
161
|
end
|
162
162
|
|
163
163
|
# Set environment variable SWIG_LIB to
|
data/examples/thread.rb
CHANGED
@@ -10,8 +10,8 @@ class ThreadedWindow < Fox::FXMainWindow
|
|
10
10
|
super(app, "Threaded Widget Test", :opts => DECOR_ALL, width: 200, height: 500)
|
11
11
|
|
12
12
|
@vframe = FXVerticalFrame.new(self,
|
13
|
-
FRAME_SUNKEN|FRAME_THICK|
|
14
|
-
FXButton.new(frame, "
|
13
|
+
FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL, :padding => 0) do |frame|
|
14
|
+
FXButton.new(frame, "Click to add", opts: FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X) do |button|
|
15
15
|
button.connect(SEL_COMMAND, method(:on_button_clicked))
|
16
16
|
end
|
17
17
|
end
|
@@ -19,7 +19,7 @@ class ThreadedWindow < Fox::FXMainWindow
|
|
19
19
|
|
20
20
|
def on_button_clicked(sender, sel, ptr)
|
21
21
|
FXHorizontalFrame.new(@vframe,
|
22
|
-
FRAME_SUNKEN|FRAME_THICK|
|
22
|
+
FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL, :padding => 10) do |frame|
|
23
23
|
|
24
24
|
label = FXLabel.new frame, "..."
|
25
25
|
|
data/ext/fox16_c/FXRuby.cpp
CHANGED
@@ -1347,14 +1347,16 @@ static ID id_backtrace;
|
|
1347
1347
|
static VALUE handle_rescue(VALUE args,VALUE error){
|
1348
1348
|
VALUE info=rb_gv_get("$!");
|
1349
1349
|
VALUE errat=rb_funcall(info,id_backtrace,0);
|
1350
|
-
VALUE mesg=
|
1350
|
+
VALUE mesg=rb_ary_entry(errat, 0);
|
1351
|
+
VALUE info_str=rb_obj_as_string(info);
|
1351
1352
|
fprintf(stderr,"%s: %s (%s)\n",
|
1352
|
-
|
1353
|
-
|
1353
|
+
StringValueCStr(mesg),
|
1354
|
+
StringValueCStr(info_str),
|
1354
1355
|
rb_class2name(CLASS_OF(info)));
|
1355
1356
|
for(int i=1;i<RARRAY_LEN(errat);i++){
|
1356
|
-
|
1357
|
-
|
1357
|
+
VALUE entry = rb_ary_entry(errat, i);
|
1358
|
+
if(TYPE(entry)==T_STRING){
|
1359
|
+
fprintf(stderr,"\tfrom %s\n",StringValueCStr(entry));
|
1358
1360
|
}
|
1359
1361
|
}
|
1360
1362
|
return Qnil;
|
data/ext/fox16_c/extconf.rb
CHANGED
@@ -313,7 +313,15 @@ def do_rake_compiler_setup
|
|
313
313
|
end
|
314
314
|
|
315
315
|
checking_for("thread local variables") do
|
316
|
-
$defs.push( "-DHAVE___THREAD" ) if try_compile(
|
316
|
+
$defs.push( "-DHAVE___THREAD" ) if try_compile(<<-EOT)
|
317
|
+
__thread int x=1;
|
318
|
+
#if defined(__MINGW32__)
|
319
|
+
#include <windows.h>
|
320
|
+
#if !defined(__MINGW64_VERSION_MAJOR)
|
321
|
+
#error "Old mingw32 compiler doesn't implement thread local variables properly."
|
322
|
+
#endif
|
323
|
+
#endif
|
324
|
+
EOT
|
317
325
|
end &&
|
318
326
|
have_func('rb_thread_call_without_gvl') &&
|
319
327
|
have_func('rb_thread_call_with_gvl')
|
@@ -5,7 +5,9 @@
|
|
5
5
|
|
6
6
|
#include "FXRbCommon.h"
|
7
7
|
|
8
|
-
|
8
|
+
#ifdef HAVE___THREAD
|
9
|
+
__thread int g_fxrb_thread_has_gvl = 1;
|
10
|
+
#endif
|
9
11
|
|
10
12
|
FOR_EACH_BLOCKING_FUNCTION( DEFINE_GVL_WRAPPER_STRUCT );
|
11
13
|
FOR_EACH_BLOCKING_FUNCTION( DEFINE_GVL_SKELETON );
|
@@ -27,20 +27,6 @@
|
|
27
27
|
#ifndef FXRUBY_H
|
28
28
|
#define FXRUBY_H
|
29
29
|
|
30
|
-
// RARRAY_LEN, RARRAY_PTR, RSTRING_LEN and RSTRING_PTR macros not defined before Ruby 1.8.6
|
31
|
-
#ifndef RARRAY_LEN
|
32
|
-
#define RARRAY_LEN(a) RARRAY((a))->len
|
33
|
-
#endif
|
34
|
-
#ifndef RARRAY_PTR
|
35
|
-
#define RARRAY_PTR(a) RARRAY((a))->ptr
|
36
|
-
#endif
|
37
|
-
#ifndef RSTRING_LEN
|
38
|
-
#define RSTRING_LEN(s) RSTRING((s))->len
|
39
|
-
#endif
|
40
|
-
#ifndef RSTRING_PTR
|
41
|
-
#define RSTRING_PTR(s) RSTRING((s))->ptr
|
42
|
-
#endif
|
43
|
-
|
44
30
|
#ifndef NUM2SIZET
|
45
31
|
#define NUM2SIZET(s) NUM2ULONG(s)
|
46
32
|
#endif
|
@@ -55,19 +55,21 @@ void fxrb_wakeup_fox(void *);
|
|
55
55
|
when_non_void( rettype retval; ) \
|
56
56
|
};
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
#
|
61
|
-
static void * gvl_##klass##_##name##_skeleton( void *data ){ \
|
62
|
-
struct gvl_wrapper_##klass##_##name##_params *p = (struct gvl_wrapper_##klass##_##name##_params*)data; \
|
63
|
-
g_fxrb_thread_has_gvl = 0; \
|
64
|
-
when_non_void( p->retval = ) \
|
65
|
-
klass##_##name##_gvl( p->params.firstparamname FOR_EACH_PARAM_OF_##baseclass##_##name(DEFINE_PARAM_LIST2) ); \
|
66
|
-
g_fxrb_thread_has_gvl = 1; \
|
67
|
-
return NULL; \
|
68
|
-
}
|
58
|
+
#ifdef HAVE___THREAD
|
59
|
+
extern __thread int g_fxrb_thread_has_gvl;
|
60
|
+
#endif
|
69
61
|
|
70
62
|
#if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
|
63
|
+
#define DEFINE_GVL_SKELETON(klass, name, baseclass, when_non_void, rettype, firstparamtype, firstparamname) \
|
64
|
+
static void * gvl_##klass##_##name##_skeleton( void *data ){ \
|
65
|
+
struct gvl_wrapper_##klass##_##name##_params *p = (struct gvl_wrapper_##klass##_##name##_params*)data; \
|
66
|
+
g_fxrb_thread_has_gvl = 0; \
|
67
|
+
when_non_void( p->retval = ) \
|
68
|
+
klass##_##name##_gvl( p->params.firstparamname FOR_EACH_PARAM_OF_##baseclass##_##name(DEFINE_PARAM_LIST2) ); \
|
69
|
+
g_fxrb_thread_has_gvl = 1; \
|
70
|
+
return NULL; \
|
71
|
+
}
|
72
|
+
|
71
73
|
#define DEFINE_GVL_STUB(klass, name, baseclass, when_non_void, rettype, firstparamtype, firstparamname) \
|
72
74
|
rettype klass##_##name(firstparamtype firstparamname FOR_EACH_PARAM_OF_##baseclass##_##name(DEFINE_PARAM_LIST3)){ \
|
73
75
|
struct gvl_wrapper_##klass##_##name##_params params = { \
|
@@ -77,6 +79,8 @@ extern __thread int g_fxrb_thread_has_gvl;
|
|
77
79
|
when_non_void( return params.retval; ) \
|
78
80
|
}
|
79
81
|
#else
|
82
|
+
#define DEFINE_GVL_SKELETON(klass, name, baseclass, when_non_void, rettype, firstparamtype, firstparamname)
|
83
|
+
|
80
84
|
#define DEFINE_GVL_STUB(klass, name, baseclass, when_non_void, rettype, firstparamtype, firstparamname) \
|
81
85
|
rettype klass##_##name(firstparamtype firstparamname FOR_EACH_PARAM_OF_##baseclass##_##name(DEFINE_PARAM_LIST3)){ \
|
82
86
|
return klass##_##name##_gvl(firstparamname FOR_EACH_PARAM_OF_##baseclass##_##name(DEFINE_PARAM_LIST1)); \
|
data/lib/fox16/thread.rb
CHANGED
@@ -7,8 +7,9 @@ module Fox
|
|
7
7
|
alias initialize_before_thread initialize # :nodoc:
|
8
8
|
|
9
9
|
def initialize(*args, &block)
|
10
|
-
initialize_before_thread(*args
|
10
|
+
initialize_before_thread(*args)
|
11
11
|
event_handler_setup
|
12
|
+
block.call(self) if block_given?
|
12
13
|
end
|
13
14
|
|
14
15
|
def runOnUiThread(&block)
|
data/lib/fox16/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fxruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lyle Johnson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mini_portile
|
@@ -59,14 +59,14 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.
|
62
|
+
version: 0.5.2
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
69
|
+
version: 0.5.2
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: opengl
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,14 +115,14 @@ dependencies:
|
|
115
115
|
requirements:
|
116
116
|
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: '3.
|
118
|
+
version: '3.14'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '3.
|
125
|
+
version: '3.14'
|
126
126
|
description: FXRuby is the Ruby binding to the FOX GUI toolkit.
|
127
127
|
email:
|
128
128
|
- lyle@lylejohnson.name
|
@@ -1100,7 +1100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1100
1100
|
version: '0'
|
1101
1101
|
requirements: []
|
1102
1102
|
rubyforge_project:
|
1103
|
-
rubygems_version: 2.
|
1103
|
+
rubygems_version: 2.5.1
|
1104
1104
|
signing_key:
|
1105
1105
|
specification_version: 4
|
1106
1106
|
summary: FXRuby is the Ruby binding to the FOX GUI toolkit.
|