pike.git/
src/
program.c
Branch:
Tag:
Non-build tags
All tags
No tags
1997-09-08
1997-09-08 01:04:54 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
b8048bcd8c67b8d384e54e992294a176821ccbbc (
21
lines) (+
15
/-
6
)
[
Show
|
Annotate
]
Branch:
7.9
function lookup on inherited functions fixed
Rev: src/program.c:1.38
4:
||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h"
-
RCSID("$Id: program.c,v 1.
37
1997/
08
/
30
18
:
35
:
53
grubba
Exp $");
+
RCSID("$Id: program.c,v 1.
38
1997/
09/
08
01
:
04
:
54
hubbe
Exp $");
#include "program.h" #include "object.h" #include "dynamic_buffer.h"
621:
{ if(funp->flags & ID_PRIVATE) continue; fun=ID_FROM_PTR(prog, funp);
-
if(fun->func.offset == -1) continue;
/*
prototype */
+
/*
if(fun->func.offset == -1) continue; prototype */
/* check for multiple definitions */ for(t=0;t>=0 && t<(int)prog->num_identifier_references;t++)
632:
if(t==i) continue; funpb=prog->identifier_references+t; if(funpb->flags & (ID_HIDDEN|ID_STATIC)) continue;
-
if((funpb->flags & ID_INHERITED) && t
<
i) continue;
+
if((funpb->flags & ID_INHERITED) && t
>
i) continue;
funb=ID_FROM_PTR(prog,funpb); if(funb->func.offset == -1) continue; /* prototype */ if(fun->name==funb->name) t=-10;
1315:
if(funp->flags & ID_INHERITED) { if(funp->flags & ID_PRIVATE) continue;
-
for(t=
i+1
; t>=0 && t<(int)prog->num_identifier_references; t++)
+
for(t=
0
; t>=0 && t<(int)prog->num_identifier_references; t++)
{
-
if(
is
_
same
_
string
(
fun
->
name,
ID_FROM_
INT
(prog,
t
)->
name
)
)
-
t=-10;
+
struct reference *funpb;
+
struct identifier *funb;
+
+
if(
t==i) continue;
+
funpb=prog->identifier
_
references+t;
+
if(funpb->flags & (ID
_
HIDDEN|ID_STATIC)) continue;
+
if
(
(funpb
->
flags
&
ID_
INHERITED) && t>i) continue;
+
funb=ID_
FROM_
PTR
(prog,
funpb);
+
/* if(funb
->
func.offset == -1
)
continue; * prototype */
+
if(fun->name==funb->name)
t=-10;
} if(t < 0) continue; }