Changeset 32547 in project


Ignore:
Timestamp:
07/05/15 18:42:11 (5 years ago)
Author:
sjamaan
Message:

numbers: Simplify allocate_tmp_bignum somewhat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/numbers/trunk/numbers-c.c

    r32546 r32547  
    16071607{
    16081608  C_word *mem = malloc(C_wordstobytes(C_SIZEOF_BIGNUM(C_unfix(size)))),
    1609           bigvec = (C_word)(mem + C_SIZEOF_STRUCTURE(2));
     1609          bigvec = (C_word)(mem + C_SIZEOF_STRUCTURE(2)),
     1610          tagvec = CHICKEN_gc_root_ref(tags);
    16101611  if (mem == NULL) abort();     /* TODO: panic */
    16111612 
    1612   C_word tagvec = CHICKEN_gc_root_ref(tags);
    1613 
    16141613  C_block_header_init(bigvec, (C_STRING_TYPE | C_wordstobytes(C_unfix(size)+1)));
    16151614  C_set_block_item(bigvec, 0, C_truep(negp));
     
    16201619  }
    16211620
    1622   return C_structure(&mem, 2, C_block_item(tagvec, BIG_TAG), bigvec);
     1621  return C_a_i_record2(&mem, 2, C_block_item(tagvec, BIG_TAG), bigvec);
    16231622}
    16241623
Note: See TracChangeset for help on using the changeset viewer.