finish_dump_pvec (struct dump_context *ctx,
union vectorlike_header *out_hdr)
{
+ ALLOW_IMPLICIT_CONVERSION;
return dump_object_finish (ctx, out_hdr, vectorlike_nbytes (out_hdr));
+ DISALLOW_IMPLICIT_CONVERSION;
}
static void
/* Write the offset of that exported blob here. */
dump_off value_offset =
- bignum_offset + offsetof (struct Lisp_Bignum, value);
+ bignum_offset +
+ (dump_off) offsetof (struct Lisp_Bignum, value);
dump_push (&ctx->fixups,
list3 (
make_fixnum (DUMP_FIXUP_BIGNUM_DATA),
padding. Instead, use the size through the last non-Lisp
field. */
size_t sz = (char*)&out.min_char + sizeof (out.min_char) - (char*)&out;
- dump_object_start (ctx, &out, sz);
+ eassert (sz < DUMP_OFF_MAX);
+ dump_object_start (ctx, &out, (dump_off) sz);
DUMP_FIELD_COPY (&out, sct, header.size);
DUMP_FIELD_COPY (&out, sct, depth);
DUMP_FIELD_COPY (&out, sct, min_char);
- offset = dump_object_finish (ctx, &out, sz);
+ offset = dump_object_finish (ctx, &out, (dump_off) sz);
skip = SUB_CHAR_TABLE_OFFSET;
}
else
{
Lisp_Object out;
const Lisp_Object *vslot = &v->contents[i];
+ /* In the wide case, we're always misaligned. */
+#ifndef WIDE_EMACS_INT
eassert (ctx->offset % sizeof (out) == 0);
+#endif
dump_object_start (ctx, &out, sizeof (out));
dump_field_lv (ctx, &out, vslot, vslot, WEIGHT_STRONG);
dump_object_finish (ctx, &out, sizeof (out));
#include "bignum.h"
#include "coding.h"
#include "lisp.h"
+#include "pdumper.h"
#include <strftime.h>
return 0;
}
+#if (ULONG_MAX < TRILLION || !FASTER_TIMEFNS) && !defined ztrillion
+# define NEED_ZTRILLION_INIT 1
+#endif
+
+#ifdef NEED_ZTRILLION_INIT
+static void
+syms_of_timefns_for_pdumper (void)
+{
+ mpz_init_set_ui (ztrillion, 1000000);
+ mpz_mul_ui (ztrillion, ztrillion, 1000000);
+}
+#endif
+
void
syms_of_timefns (void)
{
trillion = make_int (1000000000000);
staticpro (&trillion);
#endif
-#if (ULONG_MAX < TRILLION || !FASTER_TIMEFNS) && !defined ztrillion
- mpz_init_set_ui (ztrillion, 1000000);
- mpz_mul_ui (ztrillion, ztrillion, 1000000);
-#endif
DEFSYM (Qencode_time, "encode-time");
defsubr (&Scurrent_time_string);
defsubr (&Scurrent_time_zone);
defsubr (&Sset_time_zone_rule);
+#ifdef NEED_ZTRILLION_INIT
+ pdumper_do_now_and_after_load (syms_of_timefns_for_pdumper);
+#endif
}