pike.git/
src/
pike_types.c
Branch:
Tag:
Non-build tags
All tags
No tags
2007-05-07
2007-05-07 12:18:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>
2631f8eec6348c959652db2709b8daade649232a (
19
lines) (+
17
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
Fixed support for implicit zero in lower_or_pike_types().
Rev: src/pike_types.c:1.307
2:
|| This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: pike_types.c,v 1.
306
2007/05/07
10
:
55
:
28
grubba Exp $
+
|| $Id: pike_types.c,v 1.
307
2007/05/07
12
:
18
:
42
grubba Exp $
*/ #include "global.h"
2574:
#endif if (t1 == t2) { t = t1;
+
} else if (zero_implied && (t1->type == T_ZERO)) {
+
t = t2;
+
} else if (zero_implied && (t2->type == T_ZERO)) {
+
t = t1;
} else if (t1->type < t2->type) { t = t1; ret = -1;
2669:
break; } }
-
if (!elem_on_stack
|| ((top = peek_type_stack(
)
)->type
!= t->type))
{
+
if (!elem_on_stack) {
push_finished_type(t);
-
+
} else if ((top = peek_type_stack())->type != t->type) {
+
if (zero_implied && (top->type == T_ZERO)) {
+
Pike_compiler->type_stackp--;
+
free_type(top);
+
push_finished_type(t);
+
} else if (zero_implied && (t->type == T_ZERO)) {
+
/* The zero is implied. */
} else {
-
+
push_finished_type(t);
+
}
+
} else {
switch(t->type) { case T_FLOAT: case T_MIXED: