comparison src/lrecord.h @ 404:2f8bb876ab1d r21-2-32

Import from CVS: tag r21-2-32
author cvs
date Mon, 13 Aug 2007 11:16:07 +0200
parents a86b2b5e0111
children b8cc9ab3f761
comparison
equal deleted inserted replaced
403:9f011ab08d48 404:2f8bb876ab1d
182 lrecord_type_face, 182 lrecord_type_face,
183 lrecord_type_database, 183 lrecord_type_database,
184 lrecord_type_tooltalk_message, 184 lrecord_type_tooltalk_message,
185 lrecord_type_tooltalk_pattern, 185 lrecord_type_tooltalk_pattern,
186 lrecord_type_ldap, 186 lrecord_type_ldap,
187 lrecord_type_count 187 lrecord_type_pgconn,
188 lrecord_type_pgresult,
189 lrecord_type_pgsetenv,
190 lrecord_type_count /* must be last */
188 }; 191 };
189 192
190 struct lrecord_implementation 193 struct lrecord_implementation
191 { 194 {
192 const char *name; 195 const char *name;
477 480
478 #ifdef ERROR_CHECK_TYPECHECK 481 #ifdef ERROR_CHECK_TYPECHECK
479 482
480 # define DECLARE_LRECORD(c_name, structtype) \ 483 # define DECLARE_LRECORD(c_name, structtype) \
481 extern const struct lrecord_implementation lrecord_##c_name; \ 484 extern const struct lrecord_implementation lrecord_##c_name; \
482 INLINE structtype *error_check_##c_name (Lisp_Object obj); \ 485 INLINE_HEADER structtype * \
483 INLINE structtype * \ 486 error_check_##c_name (Lisp_Object obj); \
487 INLINE_HEADER structtype * \
484 error_check_##c_name (Lisp_Object obj) \ 488 error_check_##c_name (Lisp_Object obj) \
485 { \ 489 { \
486 assert (RECORD_TYPEP (obj, lrecord_type_##c_name)); \ 490 assert (RECORD_TYPEP (obj, lrecord_type_##c_name)); \
487 return (structtype *) XPNTR (obj); \ 491 return (structtype *) XPNTR (obj); \
488 } \ 492 } \
489 extern Lisp_Object Q##c_name##p 493 extern Lisp_Object Q##c_name##p
490 494
491 # define DECLARE_NONRECORD(c_name, type_enum, structtype) \ 495 # define DECLARE_NONRECORD(c_name, type_enum, structtype) \
492 INLINE structtype *error_check_##c_name (Lisp_Object obj); \ 496 INLINE_HEADER structtype * \
493 INLINE structtype * \ 497 error_check_##c_name (Lisp_Object obj); \
498 INLINE_HEADER structtype * \
494 error_check_##c_name (Lisp_Object obj) \ 499 error_check_##c_name (Lisp_Object obj) \
495 { \ 500 { \
496 assert (XTYPE (obj) == type_enum); \ 501 assert (XTYPE (obj) == type_enum); \
497 return (structtype *) XPNTR (obj); \ 502 return (structtype *) XPNTR (obj); \
498 } \ 503 } \