Branch: Tag:

2001-06-06

2001-06-06 02:22:39 by Martin Stjernholm <mast@lysator.liu.se>

Fixed [bug 1728 (#1728)] where setting the weak flag on an empty array or multiset
caused multisets created later to also be weak.

Rev: src/array.c:1.106
Rev: src/array.h:1.35
Rev: src/builtin_functions.c:1.373
Rev: src/gc.c:1.152

5:   \*/      /* -  * $Id: array.h,v 1.34 2001/04/30 17:31:29 mast Exp $ +  * $Id: array.h,v 1.35 2001/06/06 02:22:39 mast Exp $    */   #ifndef ARRAY_H   #define ARRAY_H
34:   #define ARRAY_LVALUE 4   #define ARRAY_WEAK_SHRINK 8    - PMOD_EXPORT extern struct array empty_array; + PMOD_EXPORT extern struct array empty_array, weak_empty_array, weak_shrink_empty_array;   extern struct array *gc_internal_array;      #if defined(DEBUG_MALLOC) && defined(PIKE_DEBUG)
90:   PMOD_EXPORT struct array *low_allocate_array(ptrdiff_t size, ptrdiff_t extra_space);   PMOD_EXPORT void really_free_array(struct array *v);   PMOD_EXPORT void do_free_array(struct array *a); + PMOD_EXPORT struct array *array_set_flags(struct array *a, int flags);   PMOD_EXPORT void array_index_no_free(struct svalue *s,struct array *v,INT32 index);   PMOD_EXPORT void array_index(struct svalue *s,struct array *v,INT32 index);   PMOD_EXPORT void simple_array_index_no_free(struct svalue *s,
180:   PMOD_EXPORT struct array *implode_array(struct array *a, struct array *b);   /* Prototypes end here */    + #define array_get_flags(a) ((a)->flags) +    #define gc_cycle_check_array(X, WEAK) \    gc_cycle_enqueue((gc_cycle_check_cb *) real_gc_cycle_check_array, (X), (WEAK))