8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
*
* Copyright (c) 1990-1993 The Regents of the University of California.
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclHistory.c,v 1.4.6.1 2004/04/09 20:58:14 dgp Exp $
*/
#include "tclInt.h"
/*
*----------------------------------------------------------------------
|
|
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
*
* Copyright (c) 1990-1993 The Regents of the University of California.
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclHistory.c,v 1.4.6.2 2004/05/17 18:42:23 dgp Exp $
*/
#include "tclInt.h"
/*
*----------------------------------------------------------------------
|
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
list[1] = Tcl_NewStringObj("add", -1);
list[2] = cmdPtr;
objPtr = Tcl_NewListObj(3, list);
Tcl_IncrRefCount(objPtr);
(void) Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_GLOBAL);
Tcl_DecrRefCount(objPtr);
/*
* Execute the command.
*/
result = TCL_OK;
if (!(flags & TCL_NO_EVAL)) {
result = Tcl_EvalObjEx(interp, cmdPtr, flags & TCL_EVAL_GLOBAL);
}
return result;
}
|
>
>
>
>
>
>
>
>
|
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
list[1] = Tcl_NewStringObj("add", -1);
list[2] = cmdPtr;
objPtr = Tcl_NewListObj(3, list);
Tcl_IncrRefCount(objPtr);
(void) Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_GLOBAL);
Tcl_DecrRefCount(objPtr);
/*
* One possible failure mode above: exceeding a resource limit
*/
if (Tcl_LimitExceeded(interp)) {
return TCL_ERROR;
}
/*
* Execute the command.
*/
result = TCL_OK;
if (!(flags & TCL_NO_EVAL)) {
result = Tcl_EvalObjEx(interp, cmdPtr, flags & TCL_EVAL_GLOBAL);
}
return result;
}
|