summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2001-09-04 22:45:52 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2001-09-04 22:45:52 (GMT)
commit3cb4a6379d2d1327bbe201c9ef0733e6fd980134 (patch)
tree90b715ced160ef0200a6451efb6a332175827cab /generic/tclProc.c
parent6fca271a5115b8b8e94f10dce8efb41fcedb53a9 (diff)
downloadtcl-3cb4a6379d2d1327bbe201c9ef0733e6fd980134.zip
tcl-3cb4a6379d2d1327bbe201c9ef0733e6fd980134.tar.gz
tcl-3cb4a6379d2d1327bbe201c9ef0733e6fd980134.tar.bz2
made [proc] check that formal args have simple names [Bug: 458548]
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r--generic/tclProc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 4ae489d..df0f1e9 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -10,7 +10,7 @@
* 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.25 2001/04/27 22:11:51 kennykb Exp $
+ * RCS: @(#) $Id: tclProc.c,v 1.26 2001/09/04 22:45:52 msofer Exp $
*/
#include "tclInt.h"
@@ -336,6 +336,14 @@ TclCreateProc(interp, nsPtr, procName, argsPtr, bodyPtr, procPtrPtr)
ckfree((char *) fieldValues);
goto procError;
}
+ } else if ((*p == ':') && (*(p+1) == ':')) {
+ Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
+ "procedure \"", procName,
+ "\" has formal parameter \"", fieldValues[0],
+ "\" that is not a simple name",
+ (char *) NULL);
+ ckfree((char *) fieldValues);
+ goto procError;
}
p++;
}