pike.git / src / rbtree.c

version» Context lines:

pike.git/src/rbtree.c:1:   /*   || 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: rbtree.c,v 1.15 2002/12/07 13:34:28 grubba Exp $ + || $Id: rbtree.c,v 1.16 2002/12/07 20:12:58 grubba Exp $   */      /* An implementation of a threaded red/black balanced binary tree.    *    * Created 2001-04-27 by Martin Stjernholm <mast@lysator.liu.se>    */      #include "global.h"    - RCSID("$Id: rbtree.c,v 1.15 2002/12/07 13:34:28 grubba Exp $"); + RCSID("$Id: rbtree.c,v 1.16 2002/12/07 20:12:58 grubba Exp $");      #include "interpret.h"   #include "pike_error.h"   #include "rbtree_low.h"      #include <assert.h>   #include <stdlib.h>      #if defined (PIKE_DEBUG) || defined (TEST_MULTISET)   
pike.git/src/rbtree.c:1502:    if (top_idx[idx] == top_idx[idx + 1])    top_idx[idx] = idx + 1;    else {    top_idx[idx] = top_idx[idx + 1];    stack[idx + 1]->next = list;    }       list = next;    }    +  /* FIXME: What if root is still NULL here? */ +  assert(root); +     next_src->next = NULL;    root->flags &= ~RB_RED;    if (stack_malloced) xfree (stack);    }    else if (length) {    root = list;   #ifdef PIKE_DEBUG    list = list->next;   #endif    low_rb_init_root (root);