* include/gc_typed.h (GC_make_descriptor): Make bm pointer const
(replace GC_bitmap type with "const GC_word*").
* typd_mlc.c (GC_add_ext_descriptor, GC_make_descriptor): Likewise.
* tests/test.c (bm_huge): Make array const to test updated
GC_make_descriptor declaration.
typedef GC_word GC_descr;
-GC_API GC_descr GC_CALL GC_make_descriptor(GC_bitmap /* bm */,
+GC_API GC_descr GC_CALL GC_make_descriptor(const GC_word * /* GC_bitmap bm */,
size_t /* len */);
/* Return a type descriptor for the object whose layout */
/* is described by the argument. */
unsigned n_tests = 0;
-GC_word bm_huge[10] = {
+const GC_word bm_huge[10] = {
0xffffffff,
0xffffffff,
0xffffffff,
/* starting index. */
/* Returns -1 on failure. */
/* Caller does not hold allocation lock. */
-STATIC signed_word GC_add_ext_descriptor(GC_bitmap bm, word nbits)
+STATIC signed_word GC_add_ext_descriptor(const GC_word * bm, word nbits)
{
size_t nwords = divWORDSZ(nbits + WORDSZ-1);
signed_word result;
return new_mark_stack_ptr;
}
-GC_API GC_descr GC_CALL GC_make_descriptor(GC_bitmap bm, size_t len)
+GC_API GC_descr GC_CALL GC_make_descriptor(const GC_word * bm, size_t len)
{
signed_word last_set_bit = len - 1;
GC_descr result;