1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/*
* 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.
* Copyright (c) 2004-2006 Miguel Sofer
*
* 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.90 2006/05/13 17:14:26 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
21
|
/*
* 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.
* Copyright (c) 2004-2006 Miguel Sofer
*
* 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.91 2006/05/15 16:07:47 dgp Exp $
*/
#include "tclInt.h"
#include "tclCompile.h"
/*
* Prototypes for static functions in this file
|
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
|
if (procPtrPtr != NULL && procPtr->refCount > 1) {
Tcl_Command token;
Tcl_CmdInfo info;
Proc *new = (Proc *) ckalloc(sizeof(Proc));
new->iPtr = procPtr->iPtr;
new->refCount = 1;
token = (Tcl_Command) new->cmdPtr = procPtr->cmdPtr;
new->bodyPtr = Tcl_DuplicateObj(bodyPtr);
bodyPtr = new->bodyPtr;
Tcl_IncrRefCount(bodyPtr);
new->numArgs = procPtr->numArgs;
new->numCompiledLocals = new->numArgs;
new->firstLocalPtr = NULL;
|
>
|
|
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
|
if (procPtrPtr != NULL && procPtr->refCount > 1) {
Tcl_Command token;
Tcl_CmdInfo info;
Proc *new = (Proc *) ckalloc(sizeof(Proc));
new->iPtr = procPtr->iPtr;
new->refCount = 1;
new->cmdPtr = procPtr->cmdPtr;
token = (Tcl_Command) new->cmdPtr;
new->bodyPtr = Tcl_DuplicateObj(bodyPtr);
bodyPtr = new->bodyPtr;
Tcl_IncrRefCount(bodyPtr);
new->numArgs = procPtr->numArgs;
new->numCompiledLocals = new->numArgs;
new->firstLocalPtr = NULL;
|