Mercurial > emacs
view lwlib/lwlib-int.h @ 28406:451721e784a8
Stop assuming interval pointers and lisp objects can be distinguished by
inspection. Beginnings of support for expensive internal consistency checks.
* config.in (ENABLE_CHECKING): Undef.
* lisp.h (struct interval): Replace "parent" field with a union of interval
pointer and Lisp_Object; add new bitfield to use as discriminant. Change other
flag fields to bitfields.
(CHECK): New macro for consistency checking. If ENABLE_CHECKING is defined and
the supplied test fails, print a message and abort.
(eassert): New macro. Use CHECK to provide an assert-like facility.
* intervals.h (NULL_INTERVAL_P): Now applies only to real interval pointers;
abort if the value looks like a lisp object.
(NULL_INTERVAL_P, NULL_PARENT, HAS_PARENT, HAS_OBJECT, SET_PARENT, SET_OBJECT,
INTERVAL_PARENT, GET_INTERVAL_OBJECT, COPY_PARENT): Modify for new interval
parent definition.
* alloc.c (mark_interval_tree, MARK_INTERVAL_TREE, UNMARK_BALANCE_INTERVALS):
Update references that need an addressable lisp object in the interval
structure.
(die): New function.
(suppress_checking): New variable.
* intervals.c (interval_start_pos): Just return 0 if there's no parent object.
author | Ken Raeburn <raeburn@raeburn.org> |
---|---|
date | Wed, 29 Mar 2000 22:14:34 +0000 |
parents | 397da07a6912 |
children | 6ed38ee607e9 |
line wrap: on
line source
#ifndef LWLIB_INTERNAL_H #define LWLIB_INTERNAL_H #include "lwlib.h" /* extern char *strdup (const char *); extern int strcasecmp (const char *, const char *); */ extern char *safe_strdup (); typedef struct _widget_instance { Widget widget; Widget parent; Boolean pop_up_p; struct _widget_info* info; struct _widget_instance* next; } widget_instance; typedef struct _widget_info { char* type; char* name; LWLIB_ID id; widget_value* val; Boolean busy; lw_callback pre_activate_cb; lw_callback selection_cb; lw_callback post_activate_cb; lw_callback highlight_cb; struct _widget_instance* instances; struct _widget_info* next; } widget_info; typedef Widget (*widget_creation_function) (); typedef struct _widget_creation_entry { char* type; widget_creation_function function; } widget_creation_entry; /* update all other instances of a widget. Can be used in a callback when a widget has been used by the user */ void lw_internal_update_other_instances (); /* get the widget_value for a widget in a given instance */ widget_value* lw_get_widget_value_for_widget (); widget_info *lw_get_widget_info (); widget_instance * lw_get_widget_instance (); #endif /* LWLIB_INTERNAL_H */