Diff
Not logged in

Differences From Artifact [871f5518e8]:

To Artifact [177ee0a79b]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* 
 * tclProc.c --
 *
 *	This file contains routines that implement Tcl procedures,
 *	including the "proc" and "uplevel" commands.
 *
 * Copyright (c) 1987-1993 The Regents of the University of California.
 * Copyright (c) 1994-1998 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: tclProc.c,v 1.54 2004/08/25 01:11:20 dgp Exp $
 */

#include "tclInt.h"
#include "tclCompile.h"

/*
 * Prototypes for static functions in this file












|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* 
 * tclProc.c --
 *
 *	This file contains routines that implement Tcl procedures,
 *	including the "proc" and "uplevel" commands.
 *
 * Copyright (c) 1987-1993 The Regents of the University of California.
 * Copyright (c) 1994-1998 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: tclProc.c,v 1.55 2004/09/17 22:59:15 dgp Exp $
 */

#include "tclInt.h"
#include "tclCompile.h"

/*
 * Prototypes for static functions in this file
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
	/* Now we've reached the level to return the requested -code */
	Tcl_DictObjGet(NULL, iPtr->returnOpts, iPtr->returnCodeKey, &valuePtr);
	Tcl_GetIntFromObj(NULL, valuePtr, &code);
    }
    if (code == TCL_ERROR) {
	Tcl_DictObjGet(NULL, iPtr->returnOpts,
		iPtr->returnErrorcodeKey, &valuePtr);
	if (valuePtr == NULL) {
	    Tcl_ObjSetVar2((Tcl_Interp *) iPtr, iPtr->execEnvPtr->errorCode,
	            NULL, Tcl_NewStringObj("NONE", -1), TCL_GLOBAL_ONLY);
	} else {
	    Tcl_ObjSetVar2((Tcl_Interp *) iPtr, iPtr->execEnvPtr->errorCode,
	            NULL, valuePtr, TCL_GLOBAL_ONLY);
	}
	iPtr->flags |= ERROR_CODE_SET;

	Tcl_DictObjGet(NULL, iPtr->returnOpts,
		iPtr->returnErrorinfoKey, &valuePtr);
	if (valuePtr != NULL) {
	    Tcl_ObjSetVar2((Tcl_Interp *) iPtr, iPtr->execEnvPtr->errorInfo,
	            NULL, valuePtr, TCL_GLOBAL_ONLY);
	    iPtr->flags |= ERR_IN_PROGRESS;







|
|
<
<
<
<

<







1356
1357
1358
1359
1360
1361
1362
1363
1364




1365

1366
1367
1368
1369
1370
1371
1372
	/* Now we've reached the level to return the requested -code */
	Tcl_DictObjGet(NULL, iPtr->returnOpts, iPtr->returnCodeKey, &valuePtr);
	Tcl_GetIntFromObj(NULL, valuePtr, &code);
    }
    if (code == TCL_ERROR) {
	Tcl_DictObjGet(NULL, iPtr->returnOpts,
		iPtr->returnErrorcodeKey, &valuePtr);
	if (valuePtr != NULL) {
	    Tcl_SetObjErrorCode((Tcl_Interp *)iPtr, valuePtr);




	}


	Tcl_DictObjGet(NULL, iPtr->returnOpts,
		iPtr->returnErrorinfoKey, &valuePtr);
	if (valuePtr != NULL) {
	    Tcl_ObjSetVar2((Tcl_Interp *) iPtr, iPtr->execEnvPtr->errorInfo,
	            NULL, valuePtr, TCL_GLOBAL_ONLY);
	    iPtr->flags |= ERR_IN_PROGRESS;