comparison src/console.c @ 3263:d674024a8674

[xemacs-hg @ 2006-02-27 16:29:00 by crestani] - Introduce a fancy asynchronous finalization strategy on C level. - Merge the code conditioned on MC_ALLOC into the code conditioned on NEW_GC. - Remove the possibility to free objects manually outside garbage collections when the new collector is enabled.
author crestani
date Mon, 27 Feb 2006 16:29:29 +0000
parents 7c45a748ff54
children a98ca4640147 e0db3c197671
comparison
equal deleted inserted replaced
3262:79d41cfd8e6b 3263:d674024a8674
1200 #ifdef NEW_GC 1200 #ifdef NEW_GC
1201 #ifdef HAVE_TTY 1201 #ifdef HAVE_TTY
1202 INIT_LRECORD_IMPLEMENTATION (tty_console); 1202 INIT_LRECORD_IMPLEMENTATION (tty_console);
1203 #endif 1203 #endif
1204 INIT_LRECORD_IMPLEMENTATION (stream_console); 1204 INIT_LRECORD_IMPLEMENTATION (stream_console);
1205 #endif /* not NEW_GC */ 1205 #endif /* NEW_GC */
1206 1206
1207 DEFSUBR (Fvalid_console_type_p); 1207 DEFSUBR (Fvalid_console_type_p);
1208 DEFSUBR (Fconsole_type_list); 1208 DEFSUBR (Fconsole_type_list);
1209 DEFSUBR (Fcdfw_console); 1209 DEFSUBR (Fcdfw_console);
1210 DEFSUBR (Fselected_console); 1210 DEFSUBR (Fselected_console);
1323 Fprovide (intern ("window-system")); 1323 Fprovide (intern ("window-system"));
1324 #endif 1324 #endif
1325 } 1325 }
1326 1326
1327 /* The docstrings for DEFVAR_* are recorded externally by make-docfile. */ 1327 /* The docstrings for DEFVAR_* are recorded externally by make-docfile. */
1328 #ifdef MC_ALLOC 1328 #ifdef NEW_GC
1329 #define DEFVAR_CONSOLE_LOCAL_1(lname, field_name, forward_type, magic_fun) \ 1329 #define DEFVAR_CONSOLE_LOCAL_1(lname, field_name, forward_type, magic_fun) \
1330 do { \ 1330 do { \
1331 struct symbol_value_forward *I_hate_C = \ 1331 struct symbol_value_forward *I_hate_C = \
1332 alloc_lrecord_type (struct symbol_value_forward, \ 1332 alloc_lrecord_type (struct symbol_value_forward, \
1333 &lrecord_symbol_value_forward); \ 1333 &lrecord_symbol_value_forward); \
1347 \ 1347 \
1348 *((Lisp_Object *)(offset + (char *)XCONSOLE (Vconsole_local_symbols))) \ 1348 *((Lisp_Object *)(offset + (char *)XCONSOLE (Vconsole_local_symbols))) \
1349 = intern (lname); \ 1349 = intern (lname); \
1350 } \ 1350 } \
1351 } while (0) 1351 } while (0)
1352 #else /* not MC_ALLOC */ 1352 #else /* not NEW_GC */
1353 #define DEFVAR_CONSOLE_LOCAL_1(lname, field_name, forward_type, magicfun) \ 1353 #define DEFVAR_CONSOLE_LOCAL_1(lname, field_name, forward_type, magicfun) \
1354 do { \ 1354 do { \
1355 static const struct symbol_value_forward I_hate_C = \ 1355 static const struct symbol_value_forward I_hate_C = \
1356 { /* struct symbol_value_forward */ \ 1356 { /* struct symbol_value_forward */ \
1357 { /* struct symbol_value_magic */ \ 1357 { /* struct symbol_value_magic */ \
1380 \ 1380 \
1381 *((Lisp_Object *)(offset + (char *)XCONSOLE (Vconsole_local_symbols))) \ 1381 *((Lisp_Object *)(offset + (char *)XCONSOLE (Vconsole_local_symbols))) \
1382 = intern (lname); \ 1382 = intern (lname); \
1383 } \ 1383 } \
1384 } while (0) 1384 } while (0)
1385 #endif /* not MC_ALLOC */ 1385 #endif /* not NEW_GC */
1386 1386
1387 #define DEFVAR_CONSOLE_LOCAL_MAGIC(lname, field_name, magicfun) \ 1387 #define DEFVAR_CONSOLE_LOCAL_MAGIC(lname, field_name, magicfun) \
1388 DEFVAR_CONSOLE_LOCAL_1 (lname, field_name, \ 1388 DEFVAR_CONSOLE_LOCAL_1 (lname, field_name, \
1389 SYMVAL_SELECTED_CONSOLE_FORWARD, magicfun) 1389 SYMVAL_SELECTED_CONSOLE_FORWARD, magicfun)
1390 #define DEFVAR_CONSOLE_LOCAL(lname, field_name) \ 1390 #define DEFVAR_CONSOLE_LOCAL(lname, field_name) \