01: /*
02: * StringListStringCmd.java --
03: *
04: * This file tests modification of an internal rep.
05: * The behavior we don't want is for TclBlend to
06: * convert the Tcl_Obj created for the list into
07: * a ref to the TclString. We only want to convert
08: * a Tcl_Obj from C into a ref.
09: *
10: * Copyright (c) 2002 by Mo DeJong
11: *
12: * See the file "license.terms" for information on usage and redistribution
13: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
14: *
15: * RCS: @(#) $Id: StringListStringCmd.java,v 1.1 2002/12/21 04:05:19 mdejong Exp $
16: */
17:
18: package tests;
19:
20: import tcl.lang.*;
21:
22: public class StringListStringCmd implements Command {
23: public void cmdProc(Interp interp, TclObject[] objv)
24: throws TclException {
25: String s = "1 2 3 4 5";
26: TclObject obj = TclString.newInstance(s);
27: TclList.getLength(interp, obj);
28: TclString.append(obj, " 6 7 8 9 10");
29: return;
30: }
31: }
|