Fixed modtcl result fetching from the interpreter.

Tcl 8.6 no longer supports accessing the result field directly,
so we now use the public getter.

Thanks to flakes for finding this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1970 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
silverleo
2010-05-09 17:24:02 +00:00
parent e2c694c933
commit 3b9392a0b3
+5 -11
View File
@@ -106,8 +106,7 @@ public:
if (!sMyArgs.empty()) {
i = Tcl_EvalFile(interp, sMyArgs.c_str());
if (i != TCL_OK) {
result = interp->result;
PutModule(CString(result));
PutModule(Tcl_GetStringResult(interp));
}
}
@@ -140,8 +139,7 @@ public:
while (Tcl_DoOneEvent(TCL_DONT_WAIT)) {}
i = Tcl_Eval(interp,"Binds::ProcessTime");
if (i != TCL_OK) {
result = interp->result;
PutModule(CString(result));
PutModule(Tcl_GetStringResult(interp));
}
}
@@ -183,8 +181,7 @@ public:
CString sCommand = "Binds::ProcessPubm {" + sNick + "} {" + sHost + "} - {" + sChannel + "} {" + sMes + "}";
i = Tcl_Eval(interp, sCommand.c_str());
if (i != TCL_OK) {
result = interp->result;
PutModule(CString(result));
PutModule(Tcl_GetStringResult(interp));
}
return CONTINUE;
}
@@ -201,8 +198,7 @@ public:
sCommand = "Binds::ProcessNick {" + sOldNick + "} {" + sHost + "} - {" + vChans[n]->GetName() + "} {" + sNewNickTmp + "}";
i = Tcl_Eval(interp, sCommand.c_str());
if (i != TCL_OK) {
result = interp->result;
PutModule(CString(result));
PutModule(Tcl_GetStringResult(interp));
}
}
}
@@ -215,8 +211,7 @@ public:
CString sCommand = "Binds::ProcessKick {" + sOpNick + "} {" + sOpHost + "} - {" + Channel.GetName() + "} {" + sNick + "} {" + sMessage + "}";
i = Tcl_Eval(interp, sCommand.c_str());
if (i != TCL_OK) {
result = interp->result;
PutModule(CString(result));
PutModule(Tcl_GetStringResult(interp));
}
}
@@ -224,7 +219,6 @@ public:
private:
Tcl_Interp *interp;
int i;
char *result;
static CString argvit(const char *argv[], unsigned int end, unsigned int begin, CString delim) {
CString sRet;