internal_hash (s->buffer_specs, depth + 1));
}
+inline static size_t
+aligned_sizeof_specifier (size_t specifier_type_specific_size)
+{
+ return ALIGN_SIZE (offsetof (Lisp_Specifier, data)
+ + specifier_type_specific_size,
+ ALIGNOF (max_align_t));
+}
+
static size_t
sizeof_specifier (const void *header)
{
- if (GHOST_SPECIFIER_P ((Lisp_Specifier *) header))
- return offsetof (Lisp_Specifier, data);
- else
- {
- const Lisp_Specifier *p = (const Lisp_Specifier *) header;
- return offsetof (Lisp_Specifier, data) + p->methods->extra_data_size;
- }
+ const Lisp_Specifier *p = (const Lisp_Specifier *) header;
+ return aligned_sizeof_specifier (GHOST_SPECIFIER_P (p)
+ ? 0
+ : p->methods->extra_data_size);
}
static const struct lrecord_description specifier_methods_description_1[] = {
DEFUN ("valid-specifier-type-p", Fvalid_specifier_type_p, 1, 1, 0, /*
Given a SPECIFIER-TYPE, return non-nil if it is valid.
-Valid types are 'generic, 'integer, boolean, 'color, 'font, 'image,
+Valid types are 'generic, 'integer, 'boolean, 'color, 'font, 'image,
'face-boolean, and 'toolbar.
*/
(specifier_type))
{
Lisp_Object specifier;
Lisp_Specifier *sp = (Lisp_Specifier *)
- alloc_lcrecord (offsetof (Lisp_Specifier, data) + data_size,
- &lrecord_specifier);
+ alloc_lcrecord (aligned_sizeof_specifier (data_size), &lrecord_specifier);
sp->methods = spec_meths;
sp->global_specs = Qnil;
tem = nconc2 (*orig_inst_list, list_to_build_up);
else
{
- abort ();
+ ABORT ();
tem = Qnil;
}
/* The instantiate method is allowed to call eval. Since it
is quite common for this function to get called from somewhere in
redisplay we need to make sure that quits are ignored. Otherwise
- Fsignal will abort. */
+ Fsignal will ABORT. */
specbind (Qinhibit_quit, Qt);
LIST_LOOP (rest, inst_list)
No. Errors are handled in Lisp primitives implementation.
Invalid domain is a design error here - kkm. */
- abort ();
+ ABORT ();
if (NILP (buffer) && !NILP (window))
buffer = WINDOW_BUFFER (XWINDOW (window));
really went wrong. */
device = FRAME_DEVICE (XFRAME (frame));
- /* device had better be determined by now; abort if not. */
+ /* device had better be determined by now; ABORT if not. */
tag = DEVICE_CLASS (XDEVICE (device));
depth = make_int (1 + XINT (depth));
specifier_type_create (void)
{
the_specifier_type_entry_dynarr = Dynarr_new (specifier_type_entry);
- dumpstruct (&the_specifier_type_entry_dynarr, &sted_description);
+ dump_add_root_struct_ptr (&the_specifier_type_entry_dynarr, &sted_description);
Vspecifier_type_list = Qnil;
staticpro (&Vspecifier_type_list);
/* Do NOT mark through this, or specifiers will never be GC'd.
This is the same deal as for weak hash tables. */
Vall_specifiers = Qnil;
- pdump_wire_list (&Vall_specifiers);
+ dump_add_weak_object_chain (&Vall_specifiers);
Vuser_defined_tags = Qnil;
staticpro (&Vuser_defined_tags);