jdc8 / wub

Automatically exported from code.google.com/p/wub
0 stars 0 forks source link

Httpd.tcl calls coroutines with more than one argument when Resume #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've tried WubWikit for offline use, and found one issue in Httpd.tcl and a 
minor one in WikitWub.tcl (there are two places that create 
::tdbc::sqlite3::connection with -readonly 1; changing it to 0 and it will work 
fine).

The issue with Httpd.tcl is that in the method Resume, it calls its coroutine 
with two arguments. According to Tcl/Tk documentation, a coroutine can be 
resumed with optional single value. Calling it with two arguments caused an 
error.

To be exact, here is the line 2342 in file Httpd.tcl (version Feb 25, 2013):
set code [catch {{*}[dict get $r -send] send $r} e eo]

To fix the problem, I changed it to:
set code [catch {{*}[dict get $r -send] [list send $r]} e eo]

Hope this helps.

Original issue reported on code.google.com by damker...@gmail.com on 8 Jul 2013 at 2:53