[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a better patch for gawk 3.1.3
From: |
Aharon Robbins |
Subject: |
a better patch for gawk 3.1.3 |
Date: |
Sun, 13 Jul 2003 22:00:53 -0700 |
This patch incorporates the fix I posted recently. I think this
should do the trick for some of the problems that have been reported
(privately) to me having to do with function parameters coming from
uninitialized global variables.
GNU/Linux vendors wishing to ship gawk 3.1.3 should (a) keep an eye
on this list in case any more major bugs show up, and (b) incorporate
this fix into what gets shipped.
Thanks
Arnold Robbins
-----------------------------------------
--- ../gawk-3.1.3/awkgram.y 2003-07-04 10:25:23.000000000 -0700
+++ awkgram.y 2003-07-13 18:27:55.000000000 -0700
@@ -3006,10 +3006,10 @@
*/
NODE *n;
- if (type == Node_var)
- n = node(Nnull_string, type, (NODE *) NULL);
- else
+ if (type == Node_var_array)
n = node((NODE *) NULL, type, (NODE *) NULL);
+ else
+ n = node(Nnull_string, type, (NODE *) NULL);
return install(name, n);
}
--- ../gawk-3.1.3/eval.c 2003-06-22 01:56:04.000000000 -0700
+++ eval.c 2003-07-11 09:31:28.000000000 -0700
@@ -848,6 +848,7 @@
fatal(_("attempt to use array `%s' in a scalar
context"),
array_vname(tree));
tree->orig_array->type = Node_var;
+ tree->orig_array->var_value = Nnull_string;
/* fall through */
case Node_var_new:
tree->type = Node_var;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- a better patch for gawk 3.1.3,
Aharon Robbins <=