fltk: fix about variable types (#12292)

* fltk: fix about variable types
This commit is contained in:
t-karatsu 2019-08-07 03:07:27 +09:00 committed by Greg Becker
parent ae975c48ac
commit d488d04ed3
3 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,11 @@
--- fltk-1.3.3/src/Fl_Tree_Item.cxx 2014-09-05 11:59:00.000000000 +0900
+++ fltk-1.3.3/src/Fl_Tree_Item_b.cxx 2019-08-05 19:10:28.620960943 +0900
@@ -549,7 +549,7 @@
} else { // different parent?
if ( to > to_parent->children() ) // try to prevent a reparent() error
return -4;
- if ( from_parent->deparent(from) < 0 ) // deparent self from current parent
+ if ( from_parent->deparent(from) == NULL ) // deparent self from current parent
return -5;
if ( to_parent->reparent(this, to) < 0 ) { // reparent self to new parent at position 'to'
to_parent->reparent(this, 0); // failed? shouldn't happen, reparent at 0

View file

@ -27,6 +27,14 @@ class Fltk(Package):
patch('font.patch', when='@1.3.3')
# https://github.com/fltk/fltk/commits/master/src/Fl_Tree_Item.cxx
# -Fix return value test, as pointed out by Albrecht.
patch('fix_compare_val.patch', when='@:1.3.3')
# https://github.com/fltk/fltk/commits/master/test/menubar.cxx
# -Allow compilation with -std=c++11
# -Add missing cast (part of patch for STR #2813).
patch('type_cast.patch', when='@:1.3.3')
variant('shared', default=True,
description='Enables the build of shared libraries')

View file

@ -0,0 +1,17 @@
--- fltk-1.3.3/test/menubar.cxx 2012-02-18 17:29:30.000000000 +0900
+++ fltk-1.3.3/test/menubar_b.cxx 2019-08-06 14:16:55.733089438 +0900
@@ -127,10 +127,10 @@
{"Italic", 0, 0, 0, 0, 0, FL_ITALIC, 14},
{"BoldItalic",0,0,0, 0, 0, FL_BOLD+FL_ITALIC, 14},
{"Small", 0, 0, 0, 0, 0, FL_BOLD+FL_ITALIC, 10},
- {"Emboss", 0, 0, 0, 0, FL_EMBOSSED_LABEL},
- {"Engrave", 0, 0, 0, 0, FL_ENGRAVED_LABEL},
- {"Shadow", 0, 0, 0, 0, FL_SHADOW_LABEL},
- {"@->", 0, 0, 0, 0, FL_SYMBOL_LABEL},
+ {"Emboss", 0, 0, 0, 0, (uchar)FL_EMBOSSED_LABEL},
+ {"Engrave", 0, 0, 0, 0, (uchar)FL_ENGRAVED_LABEL},
+ {"Shadow", 0, 0, 0, 0, (uchar)FL_SHADOW_LABEL},
+ {"@->", 0, 0, 0, 0, (uchar)FL_SYMBOL_LABEL},
{0},
{"&International",0,0,0,FL_SUBMENU},
{"Sharp Ess",0x0000df},