1998-04-16
1998-04-16 01:23:03 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
-
636e475c6989cb7f0b699de1d2b835c6c8256a25
(10 lines)
(+8/-2)
[
Show
| Annotate
]
Branch: 7.9
implements() should now work
Rev: src/pike_types.c:1.40
Rev: src/program.c:1.82
4:
||| See the files COPYING and DISCLAIMER for more information.
\*/
#include "global.h"
- RCSID("$Id: program.c,v 1.81 1998/04/15 02:11:24 grubba Exp $");
+ RCSID("$Id: program.c,v 1.82 1998/04/16 01:23:03 hubbe Exp $");
#include "program.h"
#include "object.h"
#include "dynamic_buffer.h"
682: Inside #if defined(DEBUG)
INT32 size,e;
unsigned INT32 checksum;
+ if(p->id > current_program_id)
+ fatal("Program id is out of sync! (p->id=%d, current_program_id=%d)\n",p->id,current_program_id);
+
if(p->refs <=0)
fatal("Program has zero refs.\n");
2490:
unsigned long hval;
if(!a || !b) return -1;
if(a==b) return 1;
+
hval = a->id*9248339 + b->id;
hval %= IMPLEMENTS_CACHE_SIZE;
if(implements_cache[hval].aid==a->id && implements_cache[hval].bid==b->id)
2499:
/* Do it the tedious way */
implements_cache[hval].aid=a->id;
implements_cache[hval].bid=b->id;
- return implements_cache[hval].ret=low_implements(a,b);
+ implements_cache[hval].ret=low_implements(a,b);
+ return implements_cache[hval].ret;
}