chore: update stage0

This commit is contained in:
Leonardo de Moura 2021-12-01 13:48:10 -08:00
parent 5e9ebf044a
commit c54caa1a1f
2 changed files with 5 additions and 5 deletions

View file

@ -274,11 +274,11 @@ void object_compactor::insert_mpz(object * o) {
size_t data_sz = sizeof(mpn_digit) * to_mpz(o)->m_value.m_size;
size_t sz = sizeof(mpz_object) + data_sz;
mpz_object * new_o = (mpz_object *)alloc(sz);
memcpy(new_o, to_mpz(o), sizeof(mpz_object));
lean_set_non_heap_header((lean_object*)new_o, sz, LeanMPZ, 0);
new_o->m_value.m_size = to_mpz(o)->m_value.m_size;
new_o->m_value.m_sign = to_mpz(o)->m_value.m_sign;
new_o->m_value.m_digits = reinterpret_cast<mpn_digit*>(reinterpret_cast<char*>(new_o) + sizeof(mpz_object));
memcpy(new_o->m_value.m_digits, to_mpz(o)->m_value.m_digits, data_sz);
void * data = reinterpret_cast<char*>(new_o) + sizeof(mpz_object);
memcpy(data, to_mpz(o)->m_value.m_digits, data_sz);
new_o->m_value.m_digits = reinterpret_cast<mpn_digit *>(reinterpret_cast<char *>(data) - reinterpret_cast<char *>(m_begin) + reinterpret_cast<ptrdiff_t>(m_base_addr));
save(o, (lean_object*)new_o);
#endif
}

View file

@ -64,7 +64,7 @@ Author: Leonardo de Moura
enum arg_opt { no_argument, required_argument, optional_argument };
struct option {
const char name[12];
const char name[20];
arg_opt has_arg;
int *flag;
char val;