pike.git/
src/
pike_types.c
Branch:
Tag:
Non-build tags
All tags
No tags
2004-03-12
2004-03-12 21:18:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>
526100899ac6e3f7b2e7e74d742279179ed7315f (
26
lines) (+
17
/-
9
)
[
Show
|
Annotate
]
Branch:
7.9
Fixed spurious "Must return a value for a non-void function.".
Rev: src/pike_types.c:1.233
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.
232
2004/03/
11
12:
55
:
47
grubba Exp $
+
|| $Id: pike_types.c,v 1.
233
2004/03/
12
21
:
18
:
54
grubba Exp $
*/ #include "global.h"
-
RCSID("$Id: pike_types.c,v 1.
232
2004/03/
11
12:
55
:
47
grubba Exp $");
+
RCSID("$Id: pike_types.c,v 1.
233
2004/03/
12
21
:
18
:
54
grubba Exp $");
#include <ctype.h> #include "svalue.h" #include "pike_types.h"
125:
TYPE_STACK_DEBUG("compiler_pop_type"); if(Pike_compiler->num_parse_error) {
-
/*
This
could
be
fixed
to
check
if
the
type
-
*
is
correct
and
then
return
it,
I
just
didn't
feel
-
*
like
writing
the
checking
code
today.
/
Hubbe
-
*/
-
type_
stack
_
pop
_
to
_
mark
();
+
ptrdiff_t
len
=
pop_stack_mark();
+
struct
pike_type
*res;
+
+
TYPE_STACK_DEBUG("paranoid_pop_
type
");
+
if
(len
>
0)
{
+
for
(;len > 1; len--) {
+
/
*
Get
rid
of
excess
junk
.
*
/
+
free_type(
*
(Pike_compiler->type_stackp--));
+
}
+
res = *(Pike_compiler->
type_
stackp--);
+
} else {
+
add
_
ref(res = mixed
_
type
_
string
);
+
}
type_stack_mark();
-
add_ref(mixed_type_string);
-
return
mixed_type_string
;
+
return
res
;
}else{ return debug_pop_type(); }