Mercurial > hg > xemacs-beta
comparison src/lrecord.h @ 4936:94bba904528c
(for main branch) Also reset dynarr->largest value during pdump.
Avoids an assertion failure when working with dynarrs across dumping.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Tue, 19 Jan 2010 05:07:36 -0600 |
parents | 9f04877ce07e |
children | 195ceb7d6229 |
comparison
equal
deleted
inserted
replaced
4935:7ef913bf3c9a | 4936:94bba904528c |
---|---|
1140 | 1140 |
1141 #define XD_IS_INDIRECT(code) ((code) < 0) | 1141 #define XD_IS_INDIRECT(code) ((code) < 0) |
1142 #define XD_INDIRECT_VAL(code) ((-1 - (code)) & 255) | 1142 #define XD_INDIRECT_VAL(code) ((-1 - (code)) & 255) |
1143 #define XD_INDIRECT_DELTA(code) ((-1 - (code)) >> 8) | 1143 #define XD_INDIRECT_DELTA(code) ((-1 - (code)) >> 8) |
1144 | 1144 |
1145 #define XD_DYNARR_DESC(base_type, sub_desc) \ | 1145 #define XD_DYNARR_DESC(base_type, sub_desc) \ |
1146 { XD_BLOCK_PTR, offsetof (base_type, base), XD_INDIRECT(1, 0), {sub_desc} },\ | 1146 { XD_BLOCK_PTR, offsetof (base_type, base), \ |
1147 { XD_INT, offsetof (base_type, len) }, \ | 1147 XD_INDIRECT(1, 0), {sub_desc} }, \ |
1148 { XD_INT_RESET, offsetof (base_type, max), XD_INDIRECT(1, 0) } \ | 1148 { XD_INT, offsetof (base_type, len) }, \ |
1149 { XD_INT_RESET, offsetof (base_type, largest) }, \ | |
1150 { XD_INT_RESET, offsetof (base_type, max), XD_INDIRECT(1, 0) } | |
1149 | 1151 |
1150 #ifdef NEW_GC | 1152 #ifdef NEW_GC |
1151 #define XD_LISP_DYNARR_DESC(base_type, sub_desc) \ | 1153 #define XD_LISP_DYNARR_DESC(base_type, sub_desc) \ |
1152 { XD_LISP_OBJECT_BLOCK_PTR, offsetof (base_type, base), \ | 1154 { XD_LISP_OBJECT_BLOCK_PTR, offsetof (base_type, base), \ |
1153 XD_INDIRECT(1, 0), {sub_desc} }, \ | 1155 XD_INDIRECT(1, 0), {sub_desc} }, \ |
1154 { XD_INT, offsetof (base_type, len) }, \ | 1156 { XD_INT, offsetof (base_type, len) }, \ |
1157 { XD_INT_RESET, offsetof (base_type, largest) }, \ | |
1155 { XD_INT_RESET, offsetof (base_type, max), XD_INDIRECT(1, 0) } | 1158 { XD_INT_RESET, offsetof (base_type, max), XD_INDIRECT(1, 0) } |
1156 #endif /* not NEW_GC */ | 1159 #endif /* NEW_GC */ |
1157 | 1160 |
1158 /* DEFINE_LRECORD_IMPLEMENTATION is for objects with constant size. | 1161 /* DEFINE_LRECORD_IMPLEMENTATION is for objects with constant size. |
1159 DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION is for objects whose size varies. | 1162 DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION is for objects whose size varies. |
1160 */ | 1163 */ |
1161 | 1164 |