pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:23:   }      #ifdef DEBUG   void check_string(struct lpc_string *s)   {    if(debug_findstring(s) !=s)    fatal("Shared string not shared.\n");       if(s->str[s->len])    fatal("Shared string is not zero terminated properly.\n"); -  -  checked((void *)s,1); +    }    - void verify_shared_strings_tables(int pass) + void verify_shared_strings_tables()   {    unsigned int e, h;    struct lpc_string *s;       for(e=0;e<HTABLE_SIZE;e++)    {    h=0;    for(s=base_table[e];s;s=s->next)    { -  if(pass) -  { -  if(checked((void *)s,0)!=s->refs) -  { -  fatal("Shared string has wrong number of refs '%s'.\n",s->str); -  } -  continue; -  } +     h++;    if(s->len < 0)    fatal("Shared string shorter than zero bytes.\n");       if(s->refs <= 0)    fatal("Shared string had too few references.\n");       if(s->str[s->len])    fatal("Shared string didn't end with a zero.\n");