diff options
-rw-r--r-- | ext/tcltklib/extconf.rb | 2 | ||||
-rw-r--r-- | ext/tk/lib/tkfont.rb | 15 | ||||
-rw-r--r-- | intern.h | 6 | ||||
-rw-r--r-- | io.c | 6 | ||||
-rw-r--r-- | regex.c | 3 | ||||
-rw-r--r-- | string.c | 3 |
6 files changed, 29 insertions, 6 deletions
diff --git a/ext/tcltklib/extconf.rb b/ext/tcltklib/extconf.rb index e1086855ba..713cc811e5 100644 --- a/ext/tcltklib/extconf.rb +++ b/ext/tcltklib/extconf.rb @@ -21,6 +21,7 @@ def find_tcl(tcllib) find_library(tcllib, func, *paths) else find_library("tcl", func, *paths) or + find_library("tcl8.2", func, *paths) or find_library("tcl8.0", func, *paths) or find_library("tcl7.6", func, *paths) end @@ -33,6 +34,7 @@ def find_tk(tklib) find_library(tklib, func, *paths) else find_library("tk", func, *paths) or + find_library("tk8.2", func, *paths) or find_library("tk8.0", func, *paths) or find_library("tk4.2", func, *paths) end diff --git a/ext/tk/lib/tkfont.rb b/ext/tk/lib/tkfont.rb index c680d166e7..2683260d69 100644 --- a/ext/tk/lib/tkfont.rb +++ b/ext/tk/lib/tkfont.rb @@ -667,7 +667,20 @@ class TkFont alias measure_core measure_core_tk8x alias metrics_core metrics_core_tk8x - when /^8\.1/ + when /^8\.[12]/ + alias create_latinfont create_latinfont_tk8x + alias create_kanjifont create_kanjifont_tk81 + alias create_compoundfont create_compoundfont_tk81 + alias actual_core actual_core_tk8x + alias configure_core configure_core_tk8x + alias configinfo_core configinfo_core_tk8x + alias delete_core delete_core_tk8x + alias latin_replace_core latin_replace_core_tk8x + alias kanji_replace_core kanji_replace_core_tk81 + alias measure_core measure_core_tk8x + alias metrics_core metrics_core_tk8x + + when /^8\.*/ alias create_latinfont create_latinfont_tk8x alias create_kanjifont create_kanjifont_tk81 alias create_compoundfont create_compoundfont_tk81 @@ -210,6 +210,12 @@ VALUE rb_Array _((VALUE)); /* parse.y */ extern int ruby_sourceline; extern char *ruby_sourcefile; +#define yyparse rb_yyparse +#define yylex rb_yylex +#define yyerror rb_yyerror +#define yylval rb_yylval +#define yychar rb_yychar +#define yydebug rb_yydebug int yyparse _((void)); ID rb_id_attrset _((ID)); void rb_parser_append_print _((void)); @@ -3254,9 +3254,9 @@ Init_IO() rb_define_method(rb_cIO, "flush", rb_io_flush, 0); rb_define_method(rb_cIO, "tell", rb_io_tell, 0); rb_define_method(rb_cIO, "seek", rb_io_seek, 2); - rb_define_const(rb_cIO, "SEEK_SET", SEEK_SET); - rb_define_const(rb_cIO, "SEEK_CUR", SEEK_CUR); - rb_define_const(rb_cIO, "SEEK_END", SEEK_END); + rb_define_const(rb_cIO, "SEEK_SET", INT2FIX(SEEK_SET)); + rb_define_const(rb_cIO, "SEEK_CUR", INT2FIX(SEEK_CUR)); + rb_define_const(rb_cIO, "SEEK_END", INT2FIX(SEEK_END)); rb_define_method(rb_cIO, "rewind", rb_io_rewind, 0); rb_define_method(rb_cIO, "pos", rb_io_tell, 0); rb_define_method(rb_cIO, "pos=", rb_io_set_pos, 1); @@ -1406,7 +1406,8 @@ re_compile_pattern(pattern, size, bufp) case 'W': for (c = 0; c < (1 << BYTEWIDTH); c++) { if (SYNTAX(c) != Sword && - (current_mbctype || SYNTAX(c) != Sword2)) + (current_mbctype && !re_mbctab[c] || + !current_mbctype && SYNTAX(c) != Sword2)) SET_LIST_BIT(c); } last = -1; @@ -756,6 +756,7 @@ rb_str_upto(beg, end, excl) int excl; { VALUE current; + ID succ = rb_intern("succ"); if (TYPE(end) != T_STRING) end = rb_str_to_str(end); @@ -763,7 +764,7 @@ rb_str_upto(beg, end, excl) while (rb_str_cmp(current, end) <= 0) { rb_yield(current); if (!excl && rb_str_equal(current, end)) break; - current = rb_str_succ(current); + current = rb_funcall(current, succ, 0, 0); if (excl && rb_str_equal(current, end)) break; if (RSTRING(current)->len > RSTRING(end)->len) break; |