comparison src/lisp.h @ 1650:34abfb24e891

[xemacs-hg @ 2003-08-28 15:44:04 by james] Fix the C++ build, with many module-specific fixes.
author james
date Thu, 28 Aug 2003 15:44:30 +0000
parents 64eaceca611d
children 9fc738581a9d
comparison
equal deleted inserted replaced
1649:9afdad50eaf7 1650:34abfb24e891
1003 1003
1004 /* ALIGN_PTR returns the smallest pointer >= PTR which is aligned for 1004 /* ALIGN_PTR returns the smallest pointer >= PTR which is aligned for
1005 data of TYPE. */ 1005 data of TYPE. */
1006 #define ALIGN_PTR(ptr, type) ((void *) ALIGN_FOR_TYPE ((size_t) (ptr), type)) 1006 #define ALIGN_PTR(ptr, type) ((void *) ALIGN_FOR_TYPE ((size_t) (ptr), type))
1007 1007
1008 #ifdef __cplusplus
1009 extern "C" {
1010 #endif
1011
1008 /* ------------------------ assertions ------------------- */ 1012 /* ------------------------ assertions ------------------- */
1009 1013
1010 /* We define assert iff USE_ASSERTIONS or DEBUG_XEMACS is defined. 1014 /* We define assert iff USE_ASSERTIONS or DEBUG_XEMACS is defined.
1011 Otherwise we define it to be empty. Quantify has shown that the 1015 Otherwise we define it to be empty. Quantify has shown that the
1012 time the assert checks take is measurable so let's not include them 1016 time the assert checks take is measurable so let's not include them
1670 #define EQ_WITH_EBOLA_NOTICE(obj1, obj2) EQ (obj1, obj2) 1674 #define EQ_WITH_EBOLA_NOTICE(obj1, obj2) EQ (obj1, obj2)
1671 #endif 1675 #endif
1672 1676
1673 /* OK, you can open them again */ 1677 /* OK, you can open them again */
1674 1678
1679 #ifdef __cplusplus
1680 }
1681 #endif
1682
1675 /************************************************************************/ 1683 /************************************************************************/
1676 /** Definitions of basic Lisp objects **/ 1684 /** Definitions of basic Lisp objects **/
1677 /************************************************************************/ 1685 /************************************************************************/
1678 1686
1679 #include "lrecord.h" 1687 #include "lrecord.h"
1688
1689 #ifdef __cplusplus
1690 extern "C" {
1691 #endif
1680 1692
1681 /*------------------------------ unbound -------------------------------*/ 1693 /*------------------------------ unbound -------------------------------*/
1682 1694
1683 /* Qunbound is a special Lisp_Object (actually of type 1695 /* Qunbound is a special Lisp_Object (actually of type
1684 symbol-value-forward), that can never be visible to 1696 symbol-value-forward), that can never be visible to
2825 Lisp_Object make_weak_list (enum weak_list_type type); 2837 Lisp_Object make_weak_list (enum weak_list_type type);
2826 /* The following two are only called by the garbage collector */ 2838 /* The following two are only called by the garbage collector */
2827 int finish_marking_weak_lists (void); 2839 int finish_marking_weak_lists (void);
2828 void prune_weak_lists (void); 2840 void prune_weak_lists (void);
2829 2841
2842 #ifdef __cplusplus
2843 }
2844 #endif
2830 2845
2831 /************************************************************************/ 2846 /************************************************************************/
2832 /* Definitions related to the format of text and of characters */ 2847 /* Definitions related to the format of text and of characters */
2833 /************************************************************************/ 2848 /************************************************************************/
2834 2849
2952 make sure to also fix the clauses in PRIMITIVE_FUNCALL(), 2967 make sure to also fix the clauses in PRIMITIVE_FUNCALL(),
2953 and change the define of SUBR_MAX_ARGS above. */ 2968 and change the define of SUBR_MAX_ARGS above. */
2954 2969
2955 #include "symeval.h" 2970 #include "symeval.h"
2956 2971
2972 #ifdef __cplusplus
2973 extern "C" {
2974 #endif
2975
2957 /* `specpdl' is the special binding/unwind-protect stack. 2976 /* `specpdl' is the special binding/unwind-protect stack.
2958 2977
2959 Knuth says (see the Jargon File): 2978 Knuth says (see the Jargon File):
2960 At MIT, `pdl' [abbreviation for `Push Down List'] used to 2979 At MIT, `pdl' [abbreviation for `Push Down List'] used to
2961 be a more common synonym for `stack'. 2980 be a more common synonym for `stack'.
3136 Every function that can call Feval must protect in this fashion all 3155 Every function that can call Feval must protect in this fashion all
3137 Lisp_Object variables whose contents will be used again. */ 3156 Lisp_Object variables whose contents will be used again. */
3138 3157
3139 extern MODULE_API struct gcpro *gcprolist; 3158 extern MODULE_API struct gcpro *gcprolist;
3140 3159
3160 #ifdef __cplusplus
3161 }
3162 #endif
3163
3141 /* #### Catching insufficient gcpro: 3164 /* #### Catching insufficient gcpro:
3142 3165
3143 The C++ code below catches GCPRO without UNGCPRO or vice-versa. 3166 The C++ code below catches GCPRO without UNGCPRO or vice-versa.
3144 Catching cases where there's no GCPRO or UNGCPRO but should be, however, 3167 Catching cases where there's no GCPRO or UNGCPRO but should be, however,
3145 is much harder, but could be done: 3168 is much harder, but could be done:
3201 error, the debugger may be invoked, and could GC). For GCPRO purposes, 3224 error, the debugger may be invoked, and could GC). For GCPRO purposes,
3202 you only have to worry about functions that can GC and then return. 3225 you only have to worry about functions that can GC and then return.
3203 The QUIT macro cannot GC any more, although this wasn't true at some point, 3226 The QUIT macro cannot GC any more, although this wasn't true at some point,
3204 and so some "This function can GC" comments may be inaccurate. 3227 and so some "This function can GC" comments may be inaccurate.
3205 */ 3228 */
3229
3230 #ifdef __cplusplus
3231 extern "C" {
3232 #endif
3206 3233
3207 #ifdef DEBUG_GCPRO 3234 #ifdef DEBUG_GCPRO
3208 3235
3209 MODULE_API void debug_gcpro1 (char *, int, struct gcpro *, Lisp_Object *); 3236 MODULE_API void debug_gcpro1 (char *, int, struct gcpro *, Lisp_Object *);
3210 MODULE_API void debug_gcpro2 (char *, int, struct gcpro *, struct gcpro *, 3237 MODULE_API void debug_gcpro2 (char *, int, struct gcpro *, struct gcpro *,
3497 3524
3498 void register_post_gc_action (void (*fun) (void *), void *arg); 3525 void register_post_gc_action (void (*fun) (void *), void *arg);
3499 int begin_gc_forbidden (void); 3526 int begin_gc_forbidden (void);
3500 void end_gc_forbidden (int count); 3527 void end_gc_forbidden (int count);
3501 3528
3529 #ifdef __cplusplus
3530 }
3531 #endif
3532
3502 3533
3503 /************************************************************************/ 3534 /************************************************************************/
3504 /* Misc definitions */ 3535 /* Misc definitions */
3505 /************************************************************************/ 3536 /************************************************************************/
3506 3537
3520 3551
3521 /*--------------- prototypes for various public c functions ------------*/ 3552 /*--------------- prototypes for various public c functions ------------*/
3522 3553
3523 /* Prototypes for all init/syms_of/vars_of initialization functions. */ 3554 /* Prototypes for all init/syms_of/vars_of initialization functions. */
3524 #include "symsinit.h" 3555 #include "symsinit.h"
3556
3557 #ifdef __cplusplus
3558 extern "C" {
3559 #endif
3525 3560
3526 /* Defined in abbrev.c */ 3561 /* Defined in abbrev.c */
3527 MODULE_API EXFUN (Fexpand_abbrev, 0); 3562 MODULE_API EXFUN (Fexpand_abbrev, 0);
3528 3563
3529 /* Defined in alloc.c */ 3564 /* Defined in alloc.c */
5261 extern Lisp_Object Vstandard_input, Vstandard_output, Vstdio_str; 5296 extern Lisp_Object Vstandard_input, Vstandard_output, Vstdio_str;
5262 extern Lisp_Object Vsynchronous_sounds, Vsystem_name; 5297 extern Lisp_Object Vsynchronous_sounds, Vsystem_name;
5263 extern Lisp_Object Vthis_command_keys, Vunread_command_event; 5298 extern Lisp_Object Vthis_command_keys, Vunread_command_event;
5264 extern Lisp_Object Vx_initial_argv_list; 5299 extern Lisp_Object Vx_initial_argv_list;
5265 5300
5301 #ifdef __cplusplus
5302 }
5303 #endif
5304
5266 #endif /* INCLUDED_lisp_h_ */ 5305 #endif /* INCLUDED_lisp_h_ */