Branch: Tag:

2001-09-04

2001-09-04 19:26:54 by Martin Stjernholm <mast@lysator.liu.se>

Fixed _next() to loop through all strings, not just the following strings
in the same hash bucket.

Rev: src/builtin_functions.c:1.405
Rev: src/stralloc.c:1.132
Rev: src/stralloc.h:1.62

27:   #define HUGE HUGE_VAL   #endif /*!HUGE*/    - RCSID("$Id: stralloc.c,v 1.131 2001/08/29 11:51:59 grubba Exp $"); + RCSID("$Id: stralloc.c,v 1.132 2001/09/04 19:26:54 mast Exp $");      #if PIKE_RUN_UNLOCKED   /* Make this bigger when we get lightweight threads */
1884:    }   }    + struct pike_string *next_pike_string (struct pike_string *s) + { +  struct pike_string *next = s->next; +  if (!next) { +  size_t h = s->hval; +  do { +  h++; +  LOCK_BUCKET(h); +  h %= htable_size; +  next = base_table[h]; +  UNLOCK_BUCKET(h); +  } while (!next); +  } +  return next; + } +    PMOD_EXPORT void init_string_builder(struct string_builder *s, int mag)   {    s->malloced=256;