Mercurial > hg > xemacs-beta
comparison src/lisp.h @ 858:2c12fe2da451
[xemacs-hg @ 2002-05-31 09:38:45 by michaels]
2002-05-28 Martin Köbele <mkoebele@mkoebele.de>, Jens Müller <jmueller@informatik.uni-tuebingen.de>
* lrecord.h (lrecord_type): Add lrecord_type_weak_box to
lrecord_type enumeration.
* alloc.c (garbage_collect_1): Call prune_weak_boxes().
* lisp.h (struct weak_box):
* data.c:
(prune_weak_boxes):
(mark_weak_box):
(print_weak_box):
(weak_box_equal):
(weak_box_hash):
(make_weak_box):
(Fmake_weak_box):
(Fweak_box_ref):
(Fweak_boxp):
(syms_of_data):
(vars_of_data): Add implementation of weak boxes.
author | michaels |
---|---|
date | Fri, 31 May 2002 09:38:49 +0000 |
parents | 2b6fa2618f76 |
children | 804517e16990 |
comparison
equal
deleted
inserted
replaced
857:b5278486690c | 858:2c12fe2da451 |
---|---|
2547 Lisp_Object keyword, | 2547 Lisp_Object keyword, |
2548 int (*validate) (Lisp_Object keyword, | 2548 int (*validate) (Lisp_Object keyword, |
2549 Lisp_Object value, | 2549 Lisp_Object value, |
2550 Error_Behavior errb)); | 2550 Error_Behavior errb)); |
2551 | 2551 |
2552 /*---------------------------- weak boxes ------------------------------*/ | |
2553 | |
2554 struct weak_box | |
2555 { | |
2556 struct lcrecord_header header; | |
2557 Lisp_Object value; | |
2558 | |
2559 Lisp_Object next_weak_box; /* don't mark through this! */ | |
2560 }; | |
2561 | |
2562 void prune_weak_boxes (void); | |
2563 Lisp_Object make_weak_box (Lisp_Object value); | |
2564 Lisp_Object weak_box_ref (Lisp_Object value); | |
2565 | |
2566 DECLARE_LRECORD (weak_box, struct weak_box); | |
2567 #define XWEAK_BOX(x) XRECORD (x, weak_box, struct weak_box) | |
2568 #define XSET_WEAK_BOX(x, v) (XWEAK_BOX (x)->value = (v)) | |
2569 #define wrap_weak_box(p) wrap_record (p, weak_box) | |
2570 #define WEAK_BOXP(x) RECORDP (x, weak_box) | |
2571 #define CHECK_WEAK_BOX(x) CHECK_RECORD (x, weak_box) | |
2572 #define CONCHECK_WEAK_BOX(x) CONCHECK_RECORD (x, weak_box) | |
2573 | |
2574 | |
2552 /*---------------------------- weak lists ------------------------------*/ | 2575 /*---------------------------- weak lists ------------------------------*/ |
2553 | 2576 |
2554 enum weak_list_type | 2577 enum weak_list_type |
2555 { | 2578 { |
2556 /* element disappears if it's unmarked. */ | 2579 /* element disappears if it's unmarked. */ |