Mercurial > hg > xemacs-beta
comparison src/symeval.h @ 771:943eaba38521
[xemacs-hg @ 2002-03-13 08:51:24 by ben]
The big ben-mule-21-5 check-in!
Various files were added and deleted. See CHANGES-ben-mule.
There are still some test suite failures. No crashes, though.
Many of the failures have to do with problems in the test suite itself
rather than in the actual code. I'll be addressing these in the next
day or so -- none of the test suite failures are at all critical.
Meanwhile I'll be trying to address the biggest issues -- i.e. build
or run failures, which will almost certainly happen on various platforms.
All comments should be sent to ben@xemacs.org -- use a Cc: if necessary
when sending to mailing lists. There will be pre- and post- tags,
something like
pre-ben-mule-21-5-merge-in, and
post-ben-mule-21-5-merge-in.
author | ben |
---|---|
date | Wed, 13 Mar 2002 08:54:06 +0000 |
parents | 183866b06e0b |
children | e38acbeb1cae |
comparison
equal
deleted
inserted
replaced
770:336a418893b5 | 771:943eaba38521 |
---|---|
1 /* Definitions of symbol-value forwarding for XEmacs Lisp interpreter. | 1 /* Definitions of symbol-value forwarding for XEmacs Lisp interpreter. |
2 Copyright (C) 1985, 1986, 1987, 1992, 1993 Free Software Foundation, Inc. | 2 Copyright (C) 1985, 1986, 1987, 1992, 1993 Free Software Foundation, Inc. |
3 Copyright (C) 2000 Ben Wing. | 3 Copyright (C) 2000, 2001 Ben Wing. |
4 | 4 |
5 This file is part of XEmacs. | 5 This file is part of XEmacs. |
6 | 6 |
7 XEmacs is free software; you can redistribute it and/or modify it | 7 XEmacs is free software; you can redistribute it and/or modify it |
8 under the terms of the GNU General Public License as published by the | 8 under the terms of the GNU General Public License as published by the |
345 deferror_massage_name_and_message (&name, #name, inherits_from) | 345 deferror_massage_name_and_message (&name, #name, inherits_from) |
346 | 346 |
347 /* Macros we use to define forwarded Lisp variables. | 347 /* Macros we use to define forwarded Lisp variables. |
348 These are used in the syms_of_FILENAME functions. */ | 348 These are used in the syms_of_FILENAME functions. */ |
349 | 349 |
350 void defvar_magic (const char *symbol_name, const struct symbol_value_forward *magic); | 350 void defvar_magic (const char *symbol_name, |
351 | 351 const struct symbol_value_forward *magic); |
352 #define DEFVAR_SYMVAL_FWD(lname, c_location, forward_type, magicfun) do { \ | 352 |
353 static const struct symbol_value_forward I_hate_C = \ | 353 #define DEFVAR_SYMVAL_FWD(lname, c_location, forward_type, magicfun) \ |
354 { /* struct symbol_value_forward */ \ | 354 do \ |
355 { /* struct symbol_value_magic */ \ | 355 { \ |
356 { /* struct lcrecord_header */ \ | 356 static const struct symbol_value_forward I_hate_C = \ |
357 { /* struct lrecord_header */ \ | 357 { /* struct symbol_value_forward */ \ |
358 lrecord_type_symbol_value_forward, /* lrecord_type_index */ \ | 358 { /* struct symbol_value_magic */ \ |
359 1, /* mark bit */ \ | 359 { /* struct lcrecord_header */ \ |
360 1, /* c_readonly bit */ \ | 360 { /* struct lrecord_header */ \ |
361 1 /* lisp_readonly bit */ \ | 361 lrecord_type_symbol_value_forward, /* lrecord_type_index */ \ |
362 }, \ | 362 1, /* mark bit */ \ |
363 0, /* next */ \ | 363 1, /* c_readonly bit */ \ |
364 0, /* uid */ \ | 364 1 /* lisp_readonly bit */ \ |
365 0 /* free */ \ | 365 }, \ |
366 }, \ | 366 0, /* next */ \ |
367 c_location, \ | 367 0, /* uid */ \ |
368 forward_type \ | 368 0 /* free */ \ |
369 }, \ | 369 }, \ |
370 magicfun \ | 370 c_location, \ |
371 }; \ | 371 forward_type \ |
372 defvar_magic ((lname), &I_hate_C); \ | 372 }, \ |
373 magicfun \ | |
374 }; \ | |
375 defvar_magic ((lname), &I_hate_C); \ | |
373 } while (0) | 376 } while (0) |
374 | 377 |
375 #define DEFVAR_SYMVAL_FWD_INT(lname, c_location, forward_type, magicfun) do{ \ | 378 #define DEFVAR_SYMVAL_FWD_INT(lname, c_location, forward_type, magicfun) \ |
376 DEFVAR_SYMVAL_FWD (lname, c_location, forward_type, magicfun); \ | 379 do \ |
377 dump_add_opaque_int (c_location); \ | 380 { \ |
381 DEFVAR_SYMVAL_FWD (lname, c_location, forward_type, magicfun); \ | |
382 dump_add_opaque_int (c_location); \ | |
378 } while (0) | 383 } while (0) |
379 | 384 |
380 #define DEFVAR_SYMVAL_FWD_FIXNUM(lname, c_location, forward_type, magicfun) do{ \ | 385 #define DEFVAR_SYMVAL_FWD_FIXNUM(lname, c_location, forward_type, magicfun) \ |
381 DEFVAR_SYMVAL_FWD (lname, c_location, forward_type, magicfun); \ | 386 do \ |
382 dump_add_opaque_fixnum (c_location); \ | 387 { \ |
388 DEFVAR_SYMVAL_FWD (lname, c_location, forward_type, magicfun); \ | |
389 dump_add_opaque_fixnum (c_location); \ | |
383 } while (0) | 390 } while (0) |
384 | 391 |
385 #define DEFVAR_SYMVAL_FWD_OBJECT(lname, c_location, forward_type, magicfun) do{ \ | 392 #define DEFVAR_SYMVAL_FWD_OBJECT(lname, c_location, forward_type, magicfun) \ |
386 DEFVAR_SYMVAL_FWD (lname, c_location, forward_type, magicfun); \ | 393 do \ |
387 { \ | 394 { \ |
388 Lisp_Object *DSF_location = c_location; /* Type check */ \ | 395 DEFVAR_SYMVAL_FWD (lname, c_location, forward_type, magicfun); \ |
389 staticpro (DSF_location); \ | 396 { \ |
390 if (EQ (*DSF_location, Qnull_pointer)) *DSF_location = Qnil; \ | 397 Lisp_Object *DSF_location = c_location; /* Type check */ \ |
391 } \ | 398 staticpro (DSF_location); \ |
399 if (EQ (*DSF_location, Qnull_pointer)) *DSF_location = Qnil; \ | |
400 } \ | |
392 } while (0) | 401 } while (0) |
393 | 402 |
394 #define DEFVAR_LISP(lname, c_location) \ | 403 #define DEFVAR_LISP(lname, c_location) \ |
395 DEFVAR_SYMVAL_FWD_OBJECT (lname, c_location, SYMVAL_OBJECT_FORWARD, 0) | 404 DEFVAR_SYMVAL_FWD_OBJECT (lname, c_location, SYMVAL_OBJECT_FORWARD, 0) |
396 #define DEFVAR_CONST_LISP(lname, c_location) \ | 405 #define DEFVAR_CONST_LISP(lname, c_location) \ |