Open chrstphrchvz opened 3 years ago
The current situation is for sure wrong. Currently the method seems to return whatever is on top of the perl stack, which is probably not intended. However, the Grab() method (unlike the lowercase counterpart grab()) is not documented, nor can I find any usages of Grab() in the Tk code or even on CPAN. The original Tcl function returns TCL_OK or TCL_ERROR, which suggests that the method should rather return nothing, just throw an exception on errors. So maybe it would be better to change it to
int result = Tk_Grab(info->interp,info->tkwin,global);
if (result != TCL_OK)
{
croak("%s",Tcl_GetStringResult(info->interp));
}
and change the return value of Tk_Grab to void
.
Address ParseXS warning:
Not sure if this is 100% correct or whether it fixes any actual bugs.