[EMAIL PROTECTED] (David N. Welton) writes:

> Anyway, the relevant piece of code is this, now:

Oops, I shouldn't post untill I've woken up a bit.

Tcl_Obj *varsobj = Tcl_NewStringObj("::request::VARS", -1);
        for (i = 0; i < parmsarray->nelts; ++i)
        {
            if (!parms[i].key)
                continue;
            else {
                /* All this is so that a query like x=1&x=2&x=3 will
                   produce a variable that is a list */
                Tcl_Obj *newkey = STRING_TO_UTF_TO_OBJ(parms[i].key);
                Tcl_Obj *newval = STRING_TO_UTF_TO_OBJ(parms[i].val);
                Tcl_Obj *oldval = Tcl_ObjGetVar2(interp, varsobj, newkey, 0);
                
                if (oldval == NULL)
                {
                    Tcl_ObjSetVar2(interp, varsobj, newkey, newval, 0);
                } else {
                    Tcl_Obj *concat[2];
                    concat[0] = oldval;
                    concat[1] = newval;
                    Tcl_ObjSetVar2(interp, varsobj, newkey, Tcl_ConcatObj(2, concat), 
0);
                }
            }
        }

Just a cosmetic change, but important for those who read the code.  

Sorry,
-- 
David N. Welton
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/
         Work: http://www.innominate.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to