Tcl Source Code

View Ticket
Login
Ticket UUID: 1412695
Title: VAR_IS_ARGS not set in precompiled case
Type: Bug Created on: 2006-01-23 10:40:55
Submitter: traum Assigned to: msofer
Subsystem: 47. Bytecode Compiler Severity:
Priority: 5 Medium Last modified: 2006-01-23 18:02:30
Status: Closed Closed by: msofer
Resolution: Fixed Closed on: 2006-01-23 11:02:30
Version: obsolete: 8.5a4
Description:
I had errors (wrong # of args) while using compiled
code (tclcompiler -> tbcload) which uses procs with
"args" argument.

In generic/tclProc.c line 460 VAR_IS_ARGS is set for
precompiled code but inside the if-statement for the
default-value. I moved this code outside and my
problems went away.


--- tclProc.c   2006-01-23 08:42:05.000000000 +0100
+++ tclProc.c.orig      2006-01-23 08:41:18.000000000 +0100
@@ -457,12 +457,12 @@
                    ckfree((char *) fieldValues);
                    goto procError;
                }
-           }
-           if ((i == numArgs - 1)
-               && (localPtr->nameLength == 4)
-               && (localPtr->name[0] == 'a')
-               && (strcmp(localPtr->name, "args") == 0)) {
-               localPtr->flags |= VAR_IS_ARGS;
+               if ((i == numArgs - 1)
+                       && (localPtr->nameLength == 4)
+                       && (localPtr->name[0] == 'a')
+                       && (strcmp(localPtr->name,
"args") == 0)) {
+                   localPtr->flags |= VAR_IS_ARGS;
+               }
            }

            localPtr = localPtr->nextPtr;
User Comments:
msofer added on 2006-01-23 18:02:29:
Logged In: YES 
user_id=148712

Thank you; fixed in HEAD.