Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
116ec56
* version.h (RUBY_VERSION): bump RUBY_VERSION to 2.1.7.
unak Apr 14, 2015
976bf35
merge revision(s) 49154,49155,49156,49159: [Backport #10384] [Backpor…
unak Apr 24, 2015
513b313
merge revision(s) 50316: [Backport #11030]
unak Apr 28, 2015
7829c32
merge revision(s) 50141: [Backport #11021]
unak Apr 28, 2015
4a680e8
merge revision(s) 50402: [Backport #11107]
unak May 11, 2015
14c7be2
merge revision(s) 50416: [Backport #11111]
unak May 11, 2015
dd4cf6b
* ext/tk/extconf.rb: support Tcl/Tk8.6.
unak May 12, 2015
0cddf1b
merge revision(s) 49095: [Backport #11144]
unak May 13, 2015
79881c9
merge revision(s) 50541,50542: [Backport #11159]
unak May 20, 2015
f1cb00f
merge revision(s) 49776: [Backport #9144]
unak May 21, 2015
bf8a18a
merge revision(s) 49792: [Backport #10918]
unak May 21, 2015
53ce4da
merge revision(s) 50185: [Backport #10952]
unak May 21, 2015
e358e2f
merge revision(s) 50187,50202: [Backport #11051]
unak May 21, 2015
39a6566
merge revision(s) 50206: [Backport #10724]
unak May 21, 2015
bdf81a6
merge revision(s) 50305: [Backport #11065]
unak May 21, 2015
ad70c73
merge revision(s) 50404,50405: [Backport #10975]
unak May 21, 2015
137514a
merge revision(s) 50406,50407: [Backport #11075]
unak May 21, 2015
7a03d46
merge revision(s) 50421: [Backport #11113]
unak May 21, 2015
a2126a6
merge revision(s) 50509: [Backport #11132]
unak May 21, 2015
7944b62
merge revision(s) 50444: [Backport #11128]
unak May 21, 2015
3a31231
merge revision(s) 50449: [Backport #11123]
unak May 21, 2015
ed737b8
merge revision(s) 49999,50000: [Backport #10979]
unak May 28, 2015
847b7bc
* marshal.c (r_symreal): register the symbol name first so that
unak May 29, 2015
e8dc702
Partially merge revision 49195: [Bug #10717]
unak May 29, 2015
6f97605
merge revision(s) 49618,49640: [Backport #10858]
unak May 29, 2015
0d1f4fb
merge revision(s) 49491: [Backport #10823]
unak May 29, 2015
4def227
merge revision(s) 50515: [Backport #11155]
unak Jun 9, 2015
16b551f
merge revision(s) 50637: [Backport #11172]
unak Jun 9, 2015
7d7ed2c
merge revision(s) 50646: [Backport #11185]
unak Jun 9, 2015
f201642
merge revision(s) 50685: [Backport #11198]
unak Jun 9, 2015
9af0f53
merge revision(s) 49898: [Backport #10951]
unak Jun 17, 2015
61f3bae
merge revision(s) 50982,50983: [Backport #11291]
unak Jun 29, 2015
ee15197
merge revision(s) 49224,49225,49234,49235: [Backport #10711]
unak Jun 30, 2015
dffe87c
merge revision(s) 50887,50896,50902: [Backport #11060]
unak Jul 3, 2015
1bd36e3
merge revision(s) 50430,50440: [Backport #11117]
unak Jul 3, 2015
a57c925
merge revision(s) 50793,51120: [Backport #11162]
unak Jul 3, 2015
bf57198
merge revision(s) 50671: [Backport #11192]
unak Jul 3, 2015
f81db3c
merge revision(s) 50717: [Backport #11201]
unak Jul 3, 2015
759d128
merge revision(s) 49235: [Backport #10711]
unak Jul 3, 2015
b0ed276
* test/ruby/test_require.rb (TestRequire#test_loading_fifo_threading):
unak Jul 3, 2015
6282b15
* test/ruby/test_require.rb (TestRequire#test_loading_fifo_threading):
unak Jul 3, 2015
e25bb03
merge revision(s) 50972:
unak Jul 7, 2015
a0cf0fb
merge revision(s) 50860: [Backport #11249]
unak Jul 7, 2015
c7458b5
merge revision(s) 50834: [Backport #11221]
unak Jul 7, 2015
e9ea9d6
merge revision(s) 49542: [Backport #10820]
unak Aug 17, 2015
b2bb029
merge revision(s) 50827,50921: [Backport #11235]
unak Aug 17, 2015
7766666
merge revision(s) 51037: [Backport #11277]
unak Aug 17, 2015
a61756e
merge revision(s) 49788,49790: [Backport #10904]
unak Aug 17, 2015
51954bd
merge revision(s) 51344: [Backport #11387]
unak Aug 17, 2015
59f1eaa
merge revision(s) 51263,51264: [Backport #11352]
unak Aug 17, 2015
9580200
merge revision(s) 51061,51063,51091: [Backport #11285]
unak Aug 17, 2015
ccef579
merge revision(s) 51213: [Backport #11344]
unak Aug 17, 2015
d3a6478
merge revision(s) 51531: [Backport #11368]
unak Aug 17, 2015
510bdd1
merge revision(s) 51350: [Backport #11380]
unak Aug 17, 2015
bd929bb
merge revision(s) 51202,51203,51204: [Backport #11340]
unak Aug 17, 2015
d3cd7b4
merge revision(s) 51409,51453: [Backport #10910]
unak Aug 17, 2015
a5ffcda
merge revision(s) 46681,51464,51465: [Backport #11058]
unak Aug 17, 2015
190241f
merge revision(s) 51046: [Backport #11260]
unak Aug 17, 2015
813b5f4
merge revision(s) 51066: [Backport #11319]
unak Aug 17, 2015
445954a
merge revision(s) 44497: [Backport #11441]
unak Aug 17, 2015
170f64d
merge revision(s) 51423,51425: [Backport #9381]
unak Aug 17, 2015
4bf7894
merge revision(s) 51116: [Backport #11324]
unak Aug 17, 2015
26eb8e4
merge revision(s) 51470: [Backport #11413]
unak Aug 17, 2015
911ade3
merge revision(s) 51575,51584: [Backport #11439]
unak Aug 17, 2015
9ce1bf8
merge revision(s) 50829: [Backport #11248]
unak Aug 18, 2015
0f66473
add tag v2_1_7
unak Aug 18, 2015
eef7698
Merge tag 'v2_1_7' into 2.1
dbussink Aug 19, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
* ext/tk/extconf.rb: support Tcl/Tk8.6.
* ext/tk/tcltklib.c, ext/tk/lib/tk.rb: get rid of SEGV with Tcl/Tk8.6.
  [Backport ruby#10401]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@50474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed May 12, 2015
commit dd4cf6bbeb4ae5dd03d9b6cb3c2a4e73e2ab8b34
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Tue May 12 16:11:55 2015 NAKAMURA Usaku <[email protected]>

* ext/tk/extconf.rb: support Tcl/Tk8.6.

* ext/tk/tcltklib.c, ext/tk/lib/tk.rb: get rid of SEGV with Tcl/Tk8.6.
[Backport #10401]

Mon May 11 11:09:08 2015 Nobuyoshi Nakada <[email protected]>

* dln.c (dln_load): check if a different libruby is loaded by the
Expand Down
4 changes: 2 additions & 2 deletions ext/tk/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# %w[8.9 8.8 8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6 4.2]
# %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0]
# %w[8.7 8.6 8.5 8.4 8.0] # to shorten search steps
%w[8.5 8.4] # At present, Tcl/Tk8.6 is not supported.
%w[8.6 8.5 8.4]

TkLib_Config['unsupported_versions'] =
%w[8.8 8.7 8.6] # At present, Tcl/Tk8.6 is not supported.
%w[8.8 8.7]

TkLib_Config['major_nums'] = '87'

Expand Down
18 changes: 15 additions & 3 deletions ext/tk/lib/tk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1309,8 +1309,12 @@ def status.value=(val)
end

unless interp.deleted?
#Thread.current[:status].value = TclTkLib.mainloop(false)
Thread.current[:status].value = interp.mainloop(false)
begin
#Thread.current[:status].value = TclTkLib.mainloop(false)
Thread.current[:status].value = interp.mainloop(false)
rescue Exception=>e
puts "ignore exception on interp: #{e.inspect}\n" if $DEBUG
end
end

ensure
Expand Down Expand Up @@ -1569,7 +1573,15 @@ def INTERP.init_ip_internal
EOL
=end

at_exit{ INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME) }
if !WITH_RUBY_VM || RUN_EVENTLOOP_ON_MAIN_THREAD ### check Ruby 1.9 !!!!!!!
at_exit{ INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME) }
else
at_exit{
Tk.root.destroy
INTERP.remove_tk_procs(TclTkLib::FINALIZE_PROC_NAME)
INTERP_THREAD.kill.join
}
end

EventFlag = TclTkLib::EventFlag

Expand Down
71 changes: 65 additions & 6 deletions ext/tk/tcltklib.c
Original file line number Diff line number Diff line change
Expand Up @@ -6012,23 +6012,51 @@ ip_rbNamespaceObjCmd(clientData, interp, objc, objv)
Tcl_CmdInfo info;
int ret;

DUMP1("call ip_rbNamespaceObjCmd");
DUMP2("objc = %d", objc);
DUMP2("objv[0] = '%s'", Tcl_GetString(objv[0]));
DUMP2("objv[1] = '%s'", Tcl_GetString(objv[1]));
if (!Tcl_GetCommandInfo(interp, "__orig_namespace_command__", &(info))) {
DUMP1("fail to get __orig_namespace_command__");
Tcl_ResetResult(interp);
Tcl_AppendResult(interp,
"invalid command name \"namespace\"", (char*)NULL);
return TCL_ERROR;
}

rbtk_eventloop_depth++;
/* DUMP2("namespace wrapper enter depth == %d", rbtk_eventloop_depth); */
DUMP2("namespace wrapper enter depth == %d", rbtk_eventloop_depth);

if (info.isNativeObjectProc) {
#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 6
DUMP1("call a native-object-proc");
ret = (*(info.objProc))(info.objClientData, interp, objc, objv);
#else
/* Tcl8.6 or later */
int i;
Tcl_Obj **cp_objv;
char org_ns_cmd_name[] = "__orig_namespace_command__";

DUMP1("call a native-object-proc for tcl8.6 or later");
cp_objv = RbTk_ALLOC_N(Tcl_Obj *, (objc + 1));

cp_objv[0] = Tcl_NewStringObj(org_ns_cmd_name, strlen(org_ns_cmd_name));
for(i = 1; i < objc; i++) {
cp_objv[i] = objv[i];
}
cp_objv[objc] = (Tcl_Obj *)NULL;

/* ret = Tcl_EvalObjv(interp, objc, cp_objv, TCL_EVAL_DIRECT); */
ret = Tcl_EvalObjv(interp, objc, cp_objv, 0);

ckfree((char*)cp_objv);
#endif
} else {
/* string interface */
int i;
char **argv;

DUMP1("call with the string-interface");
/* argv = (char **)Tcl_Alloc(sizeof(char *) * (objc + 1)); */
argv = RbTk_ALLOC_N(char *, (objc + 1));
#if 0 /* use Tcl_Preserve/Release */
Expand Down Expand Up @@ -6056,9 +6084,10 @@ ip_rbNamespaceObjCmd(clientData, interp, objc, objv)
#endif
}

/* DUMP2("namespace wrapper exit depth == %d", rbtk_eventloop_depth); */
DUMP2("namespace wrapper exit depth == %d", rbtk_eventloop_depth);
rbtk_eventloop_depth--;

DUMP1("end of ip_rbNamespaceObjCmd");
return ret;
}
#endif
Expand All @@ -6068,6 +6097,8 @@ ip_wrap_namespace_command(interp)
Tcl_Interp *interp;
{
#if TCL_MAJOR_VERSION >= 8

#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 6
Tcl_CmdInfo orig_info;

if (!Tcl_GetCommandInfo(interp, "namespace", &(orig_info))) {
Expand All @@ -6084,6 +6115,11 @@ ip_wrap_namespace_command(interp)
orig_info.deleteProc);
}

#else /* tcl8.6 or later */
Tcl_GlobalEval(interp, "rename namespace __orig_namespace_command__");

#endif

Tcl_CreateObjCommand(interp, "namespace", ip_rbNamespaceObjCmd,
(ClientData) 0, (Tcl_CmdDeleteProc *)NULL);
#endif
Expand Down Expand Up @@ -8448,15 +8484,28 @@ invoke_tcl_proc(arg)
#endif
{
struct invoke_info *inf = (struct invoke_info *)arg;

#if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION < 6
int i, len;
#if TCL_MAJOR_VERSION >= 8
int argc = inf->objc;
char **argv = (char **)NULL;
#endif

DUMP1("call invoke_tcl_proc");

#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 6)

/* eval */
inf->ptr->return_value = Tcl_EvalObjv(inf->ptr->ip, inf->objc, inf->objv, TCL_EVAL_DIRECT);
/* inf->ptr->return_value = Tcl_EvalObjv(inf->ptr->ip, inf->objc, inf->objv, 0); */

#else /* Tcl/Tk 7.x, 8.0 -- 8.5 */

/* memory allocation for arguments of this command */
#if TCL_MAJOR_VERSION >= 8
#if TCL_MAJOR_VERSION == 8
/* Tcl/Tk 8.0 -- 8.5 */
if (!inf->cmdinfo.isNativeObjectProc) {
DUMP1("called proc is not a native-obj-proc");
/* string interface */
/* argv = (char **)ALLOC_N(char *, argc+1);*/ /* XXXXXXXXXX */
argv = RbTk_ALLOC_N(char *, (argc+1));
Expand All @@ -8470,19 +8519,24 @@ invoke_tcl_proc(arg)
}
#endif

DUMP1("reset result of tcl-interp");
Tcl_ResetResult(inf->ptr->ip);

/* Invoke the C procedure */
#if TCL_MAJOR_VERSION >= 8
#if TCL_MAJOR_VERSION == 8
/* Tcl/Tk 8.0 -- 8.5 */
if (inf->cmdinfo.isNativeObjectProc) {
DUMP1("call tcl_proc as a native-obj-proc");
inf->ptr->return_value
= (*(inf->cmdinfo.objProc))(inf->cmdinfo.objClientData,
inf->ptr->ip, inf->objc, inf->objv);
}
else
#endif
{
#if TCL_MAJOR_VERSION >= 8
#if TCL_MAJOR_VERSION == 8
/* Tcl/Tk 8.0 -- 8.5 */
DUMP1("call tcl_proc as not a native-obj-proc");
inf->ptr->return_value
= (*(inf->cmdinfo.proc))(inf->cmdinfo.clientData, inf->ptr->ip,
argc, (CONST84 char **)argv);
Expand All @@ -8505,6 +8559,9 @@ invoke_tcl_proc(arg)
#endif
}

#endif /* Tcl/Tk 8.6 or later || Tcl 7.x, 8.0 -- 8.5 */

DUMP1("end of invoke_tcl_proc");
return Qnil;
}

Expand Down Expand Up @@ -8644,7 +8701,9 @@ ip_invoke_core(interp, argc, argv)
#endif

/* invoke tcl-proc */
DUMP1("invoke tcl-proc");
rb_protect(invoke_tcl_proc, (VALUE)&inf, &status);
DUMP2("status of tcl-proc, %d", status);
switch(status) {
case TAG_RAISE:
if (NIL_P(rb_errinfo())) {
Expand Down
6 changes: 3 additions & 3 deletions version.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#define RUBY_VERSION "2.1.7"
#define RUBY_RELEASE_DATE "2015-05-11"
#define RUBY_PATCHLEVEL 342
#define RUBY_RELEASE_DATE "2015-05-12"
#define RUBY_PATCHLEVEL 343

#define RUBY_RELEASE_YEAR 2015
#define RUBY_RELEASE_MONTH 5
#define RUBY_RELEASE_DAY 11
#define RUBY_RELEASE_DAY 12

#include "ruby/version.h"

Expand Down