X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fspecifier.h;h=918d06d8a55fc96a207760cd8fc0f78f7fde1397;hb=14ac73276fa152e8f0b74602792afc0b9c3236c9;hp=575863704a29889518694af52005032a1d36aee0;hpb=76759ab036458c54499a454399e19602b8ae6ce3;p=chise%2Fxemacs-chise.git.1 diff --git a/src/specifier.h b/src/specifier.h index 5758637..918d06d 100644 --- a/src/specifier.h +++ b/src/specifier.h @@ -152,9 +152,9 @@ struct specifier_methods name specifier_instance) to avoid creating "external" specification loops. - This method must presume that both INSTANTIATOR and MATCSPEC are + This method must presume that both INSTANTIATOR and MATCHSPEC are already validated by the corresponding validate_* methods, and - may abort if they are invalid. + may ABORT if they are invalid. Return value is an instance, which is returned immediately to the caller, or Qunbound to continue instantiation lookup chain. @@ -235,7 +235,7 @@ struct Lisp_Specifier Lisp_Object fallback; /* type-specific extra data attached to a specifier */ - char data[1]; + max_align_t data[1]; }; typedef struct Lisp_Specifier Lisp_Specifier; @@ -261,7 +261,7 @@ DECLARE_LRECORD (specifier, Lisp_Specifier); /***** Defining new specifier types *****/ -#define specifier_data_offset (offsetof (Lisp_Specifier, data)) +#define specifier_data_offset offsetof (Lisp_Specifier, data) extern const struct lrecord_description specifier_empty_extra_description[]; #ifdef ERROR_CHECK_TYPECHECK @@ -300,14 +300,15 @@ extern struct specifier_methods * type##_specifier_methods #define DEFINE_SPECIFIER_TYPE(type) \ struct specifier_methods * type##_specifier_methods -#define INITIALIZE_SPECIFIER_TYPE(type, obj_name, pred_sym) do { \ - type##_specifier_methods = xnew_and_zero (struct specifier_methods); \ - type##_specifier_methods->name = obj_name; \ - type##_specifier_methods->extra_description = \ - specifier_empty_extra_description; \ - defsymbol_nodump (&type##_specifier_methods->predicate_symbol, pred_sym); \ - add_entry_to_specifier_type_list (Q##type, type##_specifier_methods); \ - dumpstruct (&type##_specifier_methods, &specifier_methods_description); \ +#define INITIALIZE_SPECIFIER_TYPE(type, obj_name, pred_sym) do { \ + type##_specifier_methods = xnew_and_zero (struct specifier_methods); \ + type##_specifier_methods->name = obj_name; \ + type##_specifier_methods->extra_description = \ + specifier_empty_extra_description; \ + defsymbol_nodump (&type##_specifier_methods->predicate_symbol, pred_sym); \ + add_entry_to_specifier_type_list (Q##type, type##_specifier_methods); \ + dump_add_root_struct_ptr (&type##_specifier_methods, \ + &specifier_methods_description); \ } while (0) #define REINITIALIZE_SPECIFIER_TYPE(type) do { \ @@ -411,11 +412,12 @@ struct specifier_caching int offset_into_struct_frame; void (*value_changed_in_frame) (Lisp_Object specifier, struct frame *f, Lisp_Object oldval); + int always_recompute; }; /* #### get image instances out of domains! */ -/* #### I think the following should abort() rather than return nil +/* #### I think the following should ABORT() rather than return nil when an invalid domain is given; much more likely we'll catch design errors early. --ben */ @@ -480,7 +482,8 @@ void set_specifier_caching (Lisp_Object specifier, int struct_frame_offset, void (*value_changed_in_frame) (Lisp_Object specifier, struct frame *f, - Lisp_Object oldval)); + Lisp_Object oldval), + int always_recompute); void set_specifier_fallback (Lisp_Object specifier, Lisp_Object fallback); void recompute_all_cached_specifiers_in_window (struct window *w);