Mercurial > hg > xemacs-beta
comparison src/specifier.h @ 438:84b14dcb0985 r21-2-27
Import from CVS: tag r21-2-27
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:32:25 +0200 |
parents | 9d177e8d4150 |
children | 8de8e3f6228a |
comparison
equal
deleted
inserted
replaced
437:e2a4e8b94b82 | 438:84b14dcb0985 |
---|---|
279 else \ | 279 else \ |
280 assert (NILP (sp->magic_parent) || EQ (sp->magic_parent, Qt)); \ | 280 assert (NILP (sp->magic_parent) || EQ (sp->magic_parent, Qt)); \ |
281 assert (SPECIFIER_TYPE_P (sp, type)); \ | 281 assert (SPECIFIER_TYPE_P (sp, type)); \ |
282 return (struct type##_specifier *) sp->data; \ | 282 return (struct type##_specifier *) sp->data; \ |
283 } \ | 283 } \ |
284 INLINE struct Lisp_Specifier * \ | |
285 error_check_##type##_specifier_type (Lisp_Object obj); \ | |
286 INLINE struct Lisp_Specifier * \ | |
287 error_check_##type##_specifier_type (Lisp_Object obj) \ | |
288 { \ | |
289 struct Lisp_Specifier *sp = XSPECIFIER (obj); \ | |
290 assert (SPECIFIER_TYPE_P (sp, type)); \ | |
291 return sp; \ | |
292 } \ | |
284 DECLARE_NOTHING | 293 DECLARE_NOTHING |
285 #else | 294 #else |
286 #define DECLARE_SPECIFIER_TYPE(type) \ | 295 #define DECLARE_SPECIFIER_TYPE(type) \ |
287 extern struct specifier_methods * type##_specifier_methods | 296 extern struct specifier_methods * type##_specifier_methods |
288 #endif /* ERROR_CHECK_TYPECHECK */ | 297 #endif /* ERROR_CHECK_TYPECHECK */ |
341 (GHOST_SPECIFIER_P(sp) \ | 350 (GHOST_SPECIFIER_P(sp) \ |
342 ? XSPECIFIER((sp)->magic_parent)->data \ | 351 ? XSPECIFIER((sp)->magic_parent)->data \ |
343 : (sp)->data)) | 352 : (sp)->data)) |
344 #endif | 353 #endif |
345 | 354 |
346 /* #### Need to create ERROR_CHECKING versions of these. */ | 355 #ifdef ERROR_CHECK_TYPECHECK |
347 | 356 # define XSPECIFIER_TYPE(x, type) \ |
348 #define XSPECIFIER_TYPE(x, type) XSPECIFIER (x) | 357 error_check_##type##_specifier_type (x) |
349 #define XSETSPECIFIER_TYPE(x, p, type) XSETSPECIFIER (x, p) | 358 # define XSETSPECIFIER_TYPE(x, p, type) do \ |
359 { \ | |
360 XSETSPECIFIER (x, p); \ | |
361 assert (SPECIFIER_TYPEP (XSPECIFIER(x), type)); \ | |
362 } while (0) | |
363 #else | |
364 # define XSPECIFIER_TYPE(x, type) XSPECIFIER (x) | |
365 # define XSETSPECIFIER_TYPE(x, p, type) XSETSPECIFIER (x, p) | |
366 #endif /* ERROR_CHECK_TYPE_CHECK */ | |
367 | |
350 #define SPECIFIER_TYPEP(x, type) \ | 368 #define SPECIFIER_TYPEP(x, type) \ |
351 (SPECIFIERP (x) && SPECIFIER_TYPE_P (XSPECIFIER (x), type)) | 369 (SPECIFIERP (x) && SPECIFIER_TYPE_P (XSPECIFIER (x), type)) |
352 #define CHECK_SPECIFIER_TYPE(x, type) do { \ | 370 #define CHECK_SPECIFIER_TYPE(x, type) do { \ |
353 CHECK_SPECIFIER (x); \ | 371 CHECK_SPECIFIER (x); \ |
354 if (!SPECIFIER_TYPE_P (XSPECIFIER (x), type)) \ | 372 if (!SPECIFIER_TYPE_P (XSPECIFIER (x), type)) \ |