Branch: Tag:

2004-03-10

2004-03-10 18:08:12 by Henrik Grubbström (Grubba) <grubba@grubba.org>

yyexplain_*() now return void and are protected against circularities. Fixes [bug 3618 (#3618)].

Rev: src/pike_types.c:1.231
Rev: src/program.c:1.556
Rev: src/program.h:1.199

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.230 2004/01/28 13:59:10 grubba Exp $ + || $Id: pike_types.c,v 1.231 2004/03/10 18:08:12 grubba Exp $   */      #include "global.h" - RCSID("$Id: pike_types.c,v 1.230 2004/01/28 13:59:10 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.231 2004/03/10 18:08:12 grubba Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"
27:   #include "bignum.h"   #include "main.h"   #include "opcodes.h" + #include "cyclic.h"   #include "block_alloc.h"      #ifdef PIKE_DEBUG
4456:    struct pike_type *type_b,    int flags)   { +  DECLARE_CYCLIC(); +     implements_a=0;    implements_b=0;    implements_mode=0;
4483:    free_string(s2);    }    +  /* Protect against circularities. */ +  if (BEGIN_CYCLIC(type_a, type_b)) { +  END_CYCLIC(); +  return; +  } +  SET_CYCLIC_RET(1); +     if(implements_a && implements_b) {    if (implements_mode) {    yyexplain_not_implements(implements_a, implements_b, flags);
4490:    yyexplain_not_compatible(implements_a, implements_b, flags);    }    } +  END_CYCLIC();   }