~ubuntu-branches/ubuntu/raring/tcl8.5/raring

« back to all changes in this revision

Viewing changes to generic/tclIndexObj.c

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2011-06-26 11:47:14 UTC
  • mfrom: (11.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110626114714-mdw95b180f00mm08
Tags: 8.5.10-1
* New upstream release (closes: #617628).
* Changed tclsh8.5 alternative priority to 850 to make it higher than
  tclsh8.4 one.
* Bumped standards version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 *
10
10
 * See the file "license.terms" for information on usage and redistribution of
11
11
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
12
 
 *
13
 
 * RCS: @(#) $Id: tclIndexObj.c,v 1.38 2007/12/13 15:23:18 dgp Exp $
14
12
 */
15
13
 
16
14
#include "tclInt.h"
305
303
    Tcl_Interp *interp,         /* Used for error reporting if not NULL. */
306
304
    register Tcl_Obj *objPtr)   /* The object to convert. */
307
305
{
 
306
    if (interp) {
308
307
    Tcl_SetObjResult(interp, Tcl_NewStringObj(
309
308
            "can't convert value to index except via Tcl_GetIndexFromObj API",
310
309
            -1));
 
310
    }
311
311
    return TCL_ERROR;
312
312
}
313
313
 
397
397
    Tcl_Obj *objPtr)
398
398
{
399
399
    ckfree((char *) objPtr->internalRep.otherValuePtr);
 
400
    objPtr->typePtr = NULL;
400
401
}
401
402
 
402
403
/*
536
537
            } else {
537
538
                elementStr = TclGetStringFromObj(origObjv[i], &elemLen);
538
539
            }
539
 
            len = Tcl_ScanCountedElement(elementStr, elemLen, &flags);
 
540
            flags = 0;
 
541
            len = TclScanElement(elementStr, elemLen, &flags);
540
542
 
541
543
            if (MAY_QUOTE_WORD && len != elemLen) {
542
544
                char *quotedElementStr = TclStackAlloc(interp, (unsigned)len);
543
545
 
544
 
                len = Tcl_ConvertCountedElement(elementStr, elemLen,
 
546
                len = TclConvertElement(elementStr, elemLen,
545
547
                        quotedElementStr, flags);
546
548
                Tcl_AppendToObj(objPtr, quotedElementStr, len);
547
549
                TclStackFree(interp, quotedElementStr);
590
592
             */
591
593
 
592
594
            elementStr = TclGetStringFromObj(objv[i], &elemLen);
593
 
            len = Tcl_ScanCountedElement(elementStr, elemLen, &flags);
 
595
            flags = 0;
 
596
            len = TclScanElement(elementStr, elemLen, &flags);
594
597
 
595
598
            if (MAY_QUOTE_WORD && len != elemLen) {
596
599
                char *quotedElementStr = TclStackAlloc(interp,(unsigned) len);
597
600
 
598
 
                len = Tcl_ConvertCountedElement(elementStr, elemLen,
 
601
                len = TclConvertElement(elementStr, elemLen,
599
602
                        quotedElementStr, flags);
600
603
                Tcl_AppendToObj(objPtr, quotedElementStr, len);
601
604
                TclStackFree(interp, quotedElementStr);