Skip to content
Snippets Groups Projects
Commit e415ecf9 authored by Lars Kanis's avatar Lars Kanis
Browse files

Adjust for Ruby-2.4 with unified Integers

parent 57a2deb9
No related branches found
No related tags found
No related merge requests found
......@@ -715,7 +715,7 @@ inline void* to_FXEvent(VALUE obj){
$2 = RSTRING_LEN($input);
}
// Extract a C array (dashpattern) and its length (dashlength) from a Ruby array of Fixnums
// Extract a C array (dashpattern) and its length (dashlength) from a Ruby array of Integers
%typemap(in) (const FXchar* dashpattern, FXuint dashlength) {
Check_Type($input, T_ARRAY);
$1 = new FXchar[RARRAY_LEN($input)];
......@@ -763,7 +763,7 @@ inline void* to_FXEvent(VALUE obj){
*/
%typemap(in) FXWindow* TOOLBAR_DOCK_AFTER {
if (TYPE($input) == T_FIXNUM) {
if (TYPE($input) == T_FIXNUM || TYPE($input) == T_BIGNUM)) {
$1 = reinterpret_cast<FXWindow *>(static_cast<long>(NUM2INT($input)));
} else {
SWIG_ConvertPtr($input, (void **) &$1, SWIGTYPE_p_FXWindow, 1);
......
......@@ -26,7 +26,7 @@ class TC_FXButton < Fox::TestCase
def testStyle
assert(@button.buttonStyle)
assert_instance_of(Fixnum, @button.buttonStyle)
assert_kind_of(Integer, @button.buttonStyle)
@button.buttonStyle |= BUTTON_AUTOGRAY
assert((@button.buttonStyle & BUTTON_AUTOGRAY) != 0)
......@@ -56,7 +56,7 @@ class TC_FXButton < Fox::TestCase
def testState
assert(@button.state)
assert_kind_of(Fixnum, @button.state)
assert_kind_of(Integer, @button.state)
@button.state = STATE_UP
assert_equal(STATE_UP, @button.state)
......
......@@ -22,7 +22,7 @@ class TC_FXHeader < Fox::TestCase
def test_getArrowDir
@header.appendItem("")
assert_instance_of(Fixnum, @header.getArrowDir(0))
assert_kind_of(Integer, @header.getArrowDir(0))
end
def test_arrowUp?
......
......@@ -12,7 +12,7 @@ class TC_FXWindow < Fox::TestCase
def test_width_accessor
pos = @window.width
assert_instance_of(Fixnum, pos)
assert_kind_of(Integer, pos)
@window.width = pos + 1
assert_equal(pos + 1, @window.width)
@window.width = pos + 2.7
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment