You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-cvs@tcl.apache.org by ro...@apache.org on 2003/11/15 01:01:25 UTC
cvs commit: tcl-websh/src/generic formdata.c
ronnie 2003/11/14 16:01:25
Modified: src/generic formdata.c
Log:
- potential bug fix of call to web::uri2list
Revision Changes Path
1.7 +13 -8 tcl-websh/src/generic/formdata.c
Index: formdata.c
===================================================================
RCS file: /home/cvs/tcl-websh/src/generic/formdata.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- formdata.c 27 Mar 2002 19:08:37 -0000 1.6
+++ formdata.c 15 Nov 2003 00:01:24 -0000 1.7
@@ -33,8 +33,8 @@
Tcl_Obj *tclo = NULL;
int tRes = 0;
int listLen = -1;
- Tcl_Obj *tmps[2];
- Tcl_Obj *tmpObj = NULL;
+ Tcl_Obj *cmdList[2];
+ Tcl_Obj *uriCmd = NULL;
Tcl_Obj *formData = NULL;
Tcl_Channel channel;
int mode;
@@ -135,13 +135,18 @@
/* unregister if was a varchannel */
Web_UnregisterVarChannel(interp, channelName, channel);
- tmpObj = Tcl_NewStringObj("web::uri2list ", -1);
- Tcl_AppendObjToObj(tmpObj, formData);
+ cmdList[0] = Tcl_NewStringObj("web::uri2list", -1);
+ cmdList[1] = Tcl_DuplicateObj(formData);
+ Tcl_IncrRefCount(cmdList[0]);
+ Tcl_IncrRefCount(cmdList[1]);
+ uriCmd = Tcl_NewListObj(2, cmdList);
+ Tcl_IncrRefCount(uriCmd);
+ tRes = Tcl_EvalObjEx(interp, uriCmd, TCL_EVAL_DIRECT);
+ Tcl_DecrRefCount(uriCmd);
+ Tcl_DecrRefCount(cmdList[0]);
+ Tcl_DecrRefCount(cmdList[1]);
- Tcl_IncrRefCount(tmpObj);
- tRes = Tcl_EvalObjEx(interp, tmpObj, TCL_EVAL_DIRECT);
- Tcl_DecrRefCount(tmpObj);
Tcl_DecrRefCount(formData);
if (tRes == TCL_ERROR) {
---------------------------------------------------------------------
To unsubscribe, e-mail: websh-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-cvs-help@tcl.apache.org