Branch: Tag:

2001-04-15

2001-04-15 16:13:18 by Martin Stjernholm <mast@lysator.liu.se>

Fixed constant struct inits so that they don't get wrong when
PIKE_MEMORY_OBJECT_MEMBERS expands to more than one member.

Rev: src/array.c:1.104
Rev: src/mapping.c:1.121
Rev: src/svalue.h:1.88

5:   \*/   /**/   #include "global.h" - RCSID("$Id: mapping.c,v 1.120 2001/04/14 11:22:33 jhs Exp $"); + RCSID("$Id: mapping.c,v 1.121 2001/04/15 16:13:18 mast Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"
105:   }   #endif    - static struct mapping_data empty_data = { 1, 1, 0,0,0,0,0,0 }; - static struct mapping_data weak_empty_data = { 1, 1, 0,0,0,0,0,0,1 }; + static struct mapping_data empty_data = +  { PIKE_CONSTANT_MEMOBJ_INIT(1), 1, 0,0,0,0,0,0,0 }; + static struct mapping_data weak_empty_data = +  { PIKE_CONSTANT_MEMOBJ_INIT(1), 1, 0,0,0,0,0,0,1 };      /* This function allocates the hash table and svalue space for a mapping    * struct. The size is the max number of indices that can fit in the