unicode-internal-commit: latest work on lisp-object workspace;
Ben Wing
ben at xemacs.org
Tue Mar 23 08:20:46 EDT 2010
changeset: 5270:d1247f3cc363
branch: ben-lisp-object
user: Ben Wing <ben at xemacs.org>
date: Mon Dec 28 01:15:52 2009 -0600
files: modules/ldap/eldap.c modules/ldap/eldap.h modules/postgresql/postgresql.c modules/postgresql/postgresql.h src/alloc.c src/buffer.c src/buffer.h src/bytecode.h src/casetab.h src/charset.h src/chartab.c src/chartab.h src/console-gtk-impl.h src/console-impl.h src/console-msw-impl.h src/console-stream-impl.h src/console-stream.c src/console-tty-impl.h src/console-tty.c src/console-x-impl.h src/console.c src/database.c src/device-gtk.c src/device-impl.h src/device-msw.c src/device-tty.c src/device-x.c src/device.c src/dynarr.c src/elhash.c src/elhash.h src/event-stream.c src/events.h src/extents-impl.h src/extents.c src/faces.h src/file-coding.c src/file-coding.h src/font-mgr.h src/frame-gtk.c src/frame-impl.h src/frame-msw.c src/frame-x.c src/frame.c src/glyphs.c src/glyphs.h src/gui.h src/inline.c src/keymap.c src/lisp.h src/lrecord.h src/lstream.h src/mule-charset.c src/number.h src/objects-impl.h src/objects-tty-impl.h src/objects-tty.c src/opaque.h src/print.c s!
rc/procimpl.h src/rangetab.h src/scrollbar.c src/scrollbar.h src/specifier.c src/specifier.h src/symeval.h src/syntax.c src/syntax.h src/toolbar.h src/tooltalk.c src/ui-gtk.h src/window-impl.h src/window.c src/xemacs.def.in.in
description:
latest work on lisp-object workspace;
more changes eliminating LCRECORD in place of LISP_OBJECT;
now compiles and runs.
diff -r d877c14318b3 -r d1247f3cc363 modules/ldap/eldap.c
--- a/modules/ldap/eldap.c Sat Dec 26 21:22:48 2009 -0600
+++ b/modules/ldap/eldap.c Mon Dec 28 01:15:52 2009 -0600
@@ -876,7 +876,7 @@
unload_eldap (void)
{
/* Remove defined types */
- UNDEF_LRECORD_IMPLEMENTATION (ldap);
+ UNDEF_LISP_OBJECT (ldap);
/* Remove staticpro'ing of symbols */
unstaticpro_nodump (&Qeldap);
diff -r d877c14318b3 -r d1247f3cc363 modules/ldap/eldap.h
--- a/modules/ldap/eldap.h Sat Dec 26 21:22:48 2009 -0600
+++ b/modules/ldap/eldap.h Mon Dec 28 01:15:52 2009 -0600
@@ -38,7 +38,7 @@
struct Lisp_LDAP
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
/* The LDAP connection handle used by the LDAP API */
LDAP *ld;
/* Name of the host we connected to */
diff -r d877c14318b3 -r d1247f3cc363 modules/postgresql/postgresql.c
--- a/modules/postgresql/postgresql.c Sat Dec 26 21:22:48 2009 -0600
+++ b/modules/postgresql/postgresql.c Mon Dec 28 01:15:52 2009 -0600
@@ -90,8 +90,10 @@
interface to lcrecord handling has changed with 21.2, so unfortunately
we will need a few snippets of backwards compatibility code.
*/
-#if (EMACS_MAJOR_VERSION == 21) && (EMACS_MINOR_VERSION < 2)
+#if (EMACS_MAJOR_VERSION == 21) && (EMACS_MINOR_VERSION <= 1)
#define RUNNING_XEMACS_21_1 1
+#elif (EMACS_MAJOR_VERSION == 21) && (EMACS_MINOR_VERSION <= 4)
+#define RUNNING_XEMACS_21_4 1
#endif
/* #define POSTGRES_LO_IMPORT_IS_VOID 1 */
@@ -240,7 +242,7 @@
#ifdef RUNNING_XEMACS_21_1
Lisp_PGconn *pgconn = ALLOC_LCRECORD_TYPE (Lisp_PGconn,
lrecord_pgconn);
-#elif RUNNING_XEMACS_21_4
+#elif defined (RUNNING_XEMACS_21_4)
Lisp_PGconn *pgconn = ALLOC_LCRECORD_TYPE (Lisp_PGconn,
&lrecord_pgconn);
#else
@@ -374,7 +376,7 @@
#ifdef RUNNING_XEMACS_21_1
Lisp_PGresult *pgresult = ALLOC_LCRECORD_TYPE (Lisp_PGresult,
lrecord_pgresult);
-#elif RUNNING_XEMACS_21_4
+#elif defined (RUNNING_XEMACS_21_4)
Lisp_PGresult *pgresult = ALLOC_LCRECORD_TYPE (Lisp_PGresult,
&lrecord_pgresult);
#else
@@ -1889,8 +1891,8 @@
{
#ifndef RUNNING_XEMACS_21_1
/* Remove defined types */
- UNDEF_LRECORD_IMPLEMENTATION (pgconn);
- UNDEF_LRECORD_IMPLEMENTATION (pgresult);
+ UNDEF_LISP_OBJECT (pgconn);
+ UNDEF_LISP_OBJECT (pgresult);
#endif
/* Remove staticpro'ing of symbols */
diff -r d877c14318b3 -r d1247f3cc363 modules/postgresql/postgresql.h
--- a/modules/postgresql/postgresql.h Sat Dec 26 21:22:48 2009 -0600
+++ b/modules/postgresql/postgresql.h Mon Dec 28 01:15:52 2009 -0600
@@ -28,7 +28,7 @@
*/
struct Lisp_PGconn
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
PGconn *pgconn;
};
typedef struct Lisp_PGconn Lisp_PGconn;
@@ -48,7 +48,7 @@
*/
struct Lisp_PGresult
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
PGresult *pgresult;
};
typedef struct Lisp_PGresult Lisp_PGresult;
diff -r d877c14318b3 -r d1247f3cc363 src/alloc.c
--- a/src/alloc.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/alloc.c Mon Dec 28 01:15:52 2009 -0600
@@ -1200,14 +1200,14 @@
#endif /* NEW_GC */
#ifdef NEW_GC
-#define ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var, lrec_ptr) \
+#define ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var, lrec_ptr)\
do { \
- (var) = alloc_lrecord_type (lisp_type, lrec_ptr); \
+ (var) = (lisp_type *) XPNTR (ALLOC_LISP_OBJECT (type)); \
} while (0)
#define NOSEEUM_ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var, \
lrec_ptr) \
do { \
- (var) = noseeum_alloc_lrecord_type (lisp_type, lrec_ptr); \
+ (var) = (lisp_type *) XPNTR (noseeum_alloc_lrecord (lrec_ptr)); \
} while (0)
#else /* not NEW_GC */
#define ALLOCATE_FIXED_TYPE_AND_SET_IMPL(type, lisp_type, var, lrec_ptr) \
@@ -2538,7 +2538,7 @@
assert (length >= 0 && fullsize > 0);
#ifdef NEW_GC
- s = alloc_lrecord_type (Lisp_String, &lrecord_string);
+ s = XSTRING (ALLOC_LISP_OBJECT (string));
#else /* not NEW_GC */
/* Allocate the string header */
ALLOCATE_FIXED_TYPE (string, Lisp_String, s);
@@ -2946,7 +2946,7 @@
#endif
#ifdef NEW_GC
- s = alloc_lrecord_type (Lisp_String, &lrecord_string);
+ s = XSTRING (ALLOC_LISP_OBJECT (string));
mcpro (wrap_pointer_1 (s)); /* otherwise nocopy_strings get
collected and static data is tried to
be freed. */
@@ -2961,10 +2961,7 @@
s->plist = Qnil;
#ifdef NEW_GC
set_lispstringp_indirect (s);
- STRING_DATA_OBJECT (s) =
- wrap_string_indirect_data
- (alloc_lrecord_type (Lisp_String_Indirect_Data,
- &lrecord_string_indirect_data));
+ STRING_DATA_OBJECT (s) = ALLOC_LISP_OBJECT (string_indirect_data);
XSTRING_INDIRECT_DATA_DATA (STRING_DATA_OBJECT (s)) = (Ibyte *) contents;
XSTRING_INDIRECT_DATA_SIZE (STRING_DATA_OBJECT (s)) = length;
#else /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/buffer.c
--- a/src/buffer.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/buffer.c Mon Dec 28 01:15:52 2009 -0600
@@ -601,7 +601,7 @@
Lisp_Object obj = ALLOC_LISP_OBJECT (buffer);
struct buffer *b = XBUFFER (obj);
- COPY_LCRECORD (b, XBUFFER (Vbuffer_defaults));
+ COPY_LISP_OBJECT (b, XBUFFER (Vbuffer_defaults));
return b;
}
@@ -1775,7 +1775,7 @@
struct overhead_stats *ovstats)
{
xzero (*stats);
- stats->other += LISPOBJ_STORAGE_SIZE (b, sizeof (*b), ovstats);
+ stats->other += LISP_OBJECT_STORAGE_SIZE (b, sizeof (*b), ovstats);
stats->text += compute_buffer_text_usage (b, ovstats);
stats->markers += compute_buffer_marker_usage (b, ovstats);
stats->extents += compute_buffer_extent_usage (b, ovstats);
@@ -2139,8 +2139,7 @@
do \
{ \
struct symbol_value_forward *I_hate_C = \
- alloc_lrecord_type (struct symbol_value_forward, \
- &lrecord_symbol_value_forward); \
+ XSYMBOL_VALUE_FORWARD (ALLOC_LISP_OBJECT (symbol_value_forward)); \
/*mcpro ((Lisp_Object) I_hate_C);*/ \
\
I_hate_C->magic.value = &(buffer_local_flags.field_name); \
@@ -2215,7 +2214,7 @@
static void
nuke_all_buffer_slots (struct buffer *b, Lisp_Object zap)
{
- ZERO_LCRECORD (b);
+ ZERO_LISP_OBJECT (b);
b->extent_info = Qnil;
b->indirect_children = Qnil;
diff -r d877c14318b3 -r d1247f3cc363 src/buffer.h
--- a/src/buffer.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/buffer.h Mon Dec 28 01:15:52 2009 -0600
@@ -80,7 +80,7 @@
struct buffer_text
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
Ibyte *beg; /* Actual address of buffer contents. */
Bytebpos gpt; /* Index of gap in buffer. */
@@ -157,7 +157,7 @@
struct buffer
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
/* This structure holds the coordinates of the buffer contents
in ordinary buffers. In indirect buffers, this is not used. */
diff -r d877c14318b3 -r d1247f3cc363 src/bytecode.h
--- a/src/bytecode.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/bytecode.h Mon Dec 28 01:15:52 2009 -0600
@@ -34,7 +34,7 @@
#ifdef NEW_GC
struct compiled_function_args
{
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
long size;
Lisp_Object args[1];
};
@@ -72,7 +72,7 @@
struct Lisp_Compiled_Function
{
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
unsigned short stack_depth;
unsigned short specpdl_depth;
struct
diff -r d877c14318b3 -r d1247f3cc363 src/casetab.h
--- a/src/casetab.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/casetab.h Mon Dec 28 01:15:52 2009 -0600
@@ -25,7 +25,7 @@
struct Lisp_Case_Table
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object downcase_table;
Lisp_Object upcase_table;
Lisp_Object case_canon_table;
diff -r d877c14318b3 -r d1247f3cc363 src/charset.h
--- a/src/charset.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/charset.h Mon Dec 28 01:15:52 2009 -0600
@@ -183,7 +183,7 @@
struct Lisp_Charset
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
int id;
Lisp_Object name;
diff -r d877c14318b3 -r d1247f3cc363 src/chartab.c
--- a/src/chartab.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/chartab.c Mon Dec 28 01:15:52 2009 -0600
@@ -474,7 +474,7 @@
if (!EQ (ct->level1[i], Qnull_pointer) &&
CHAR_TABLE_ENTRYP (ct->level1[i]) &&
!OBJECT_DUMPED_P (ct->level1[1]))
- FREE_LCRECORD (ct->level1[i]);
+ FREE_LISP_OBJECT (ct->level1[i]);
ct->level1[i] = value;
}
#endif /* MULE */
@@ -1068,7 +1068,7 @@
int lb = XCHARSET_LEADING_BYTE (range->charset) - MIN_LEADING_BYTE;
if (CHAR_TABLE_ENTRYP (ct->level1[lb]) &&
!OBJECT_DUMPED_P (ct->level1[lb]))
- FREE_LCRECORD (ct->level1[lb]);
+ FREE_LISP_OBJECT (ct->level1[lb]);
ct->level1[lb] = val;
}
break;
diff -r d877c14318b3 -r d1247f3cc363 src/chartab.h
--- a/src/chartab.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/chartab.h Mon Dec 28 01:15:52 2009 -0600
@@ -42,7 +42,7 @@
struct Lisp_Char_Table_Entry
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
/* In the interests of simplicity, we just use a fixed 96-entry
table. If we felt like being smarter, we could make this
@@ -80,7 +80,7 @@
struct Lisp_Char_Table
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object ascii[NUM_ASCII_CHARS];
Lisp_Object default_;
diff -r d877c14318b3 -r d1247f3cc363 src/console-gtk-impl.h
--- a/src/console-gtk-impl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/console-gtk-impl.h Mon Dec 28 01:15:52 2009 -0600
@@ -50,7 +50,7 @@
struct gtk_device
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
/* Gtk application info. */
GtkWidget *gtk_app_shell;
@@ -144,7 +144,7 @@
struct gtk_frame
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
/* The widget of this frame. */
diff -r d877c14318b3 -r d1247f3cc363 src/console-impl.h
--- a/src/console-impl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/console-impl.h Mon Dec 28 01:15:52 2009 -0600
@@ -409,7 +409,7 @@
struct console
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
/* Description of this console's methods. */
struct console_methods *conmeths;
diff -r d877c14318b3 -r d1247f3cc363 src/console-msw-impl.h
--- a/src/console-msw-impl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/console-msw-impl.h Mon Dec 28 01:15:52 2009 -0600
@@ -57,7 +57,7 @@
struct Lisp_Devmode
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
/* Pointer to the DEVMODE structure */
DEVMODEW *devmode;
@@ -82,7 +82,7 @@
struct mswindows_device
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
Lisp_Object fontlist; /* List of (STRING . FIXED-P), device fonts */
HDC hcdc; /* Compatible DC */
@@ -110,7 +110,7 @@
struct msprinter_device
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
HDC hdc, hcdc; /* Printer and the comp. DCs */
HANDLE hprinter;
@@ -168,7 +168,7 @@
struct mswindows_frame
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
/* win32 window handle */
@@ -318,7 +318,7 @@
struct mswindows_dialog_id
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object frame;
Lisp_Object callbacks;
diff -r d877c14318b3 -r d1247f3cc363 src/console-stream-impl.h
--- a/src/console-stream-impl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/console-stream-impl.h Mon Dec 28 01:15:52 2009 -0600
@@ -35,7 +35,7 @@
struct stream_console
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
FILE *in;
FILE *out;
diff -r d877c14318b3 -r d1247f3cc363 src/console-stream.c
--- a/src/console-stream.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/console-stream.c Mon Dec 28 01:15:52 2009 -0600
@@ -71,8 +71,8 @@
#ifdef NEW_GC
if (CONSOLE_STREAM_DATA (con) == NULL)
- CONSOLE_STREAM_DATA (con) = alloc_lrecord_type (struct stream_console,
- &lrecord_stream_console);
+ CONSOLE_STREAM_DATA (con) =
+ XSTREAM_CONSOLE (ALLOC_LISP_OBJECT (stream_console));
#else /* not NEW_GC */
if (CONSOLE_STREAM_DATA (con) == NULL)
CONSOLE_STREAM_DATA (con) = xnew_and_zero (struct stream_console);
diff -r d877c14318b3 -r d1247f3cc363 src/console-tty-impl.h
--- a/src/console-tty-impl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/console-tty-impl.h Mon Dec 28 01:15:52 2009 -0600
@@ -40,7 +40,7 @@
struct tty_console
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
int infd, outfd;
Lisp_Object instream, outstream;
@@ -256,7 +256,7 @@
struct tty_device
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
#ifdef HAVE_TERMIOS
speed_t ospeed; /* Output speed (from sg_ospeed) */
diff -r d877c14318b3 -r d1247f3cc363 src/console-tty.c
--- a/src/console-tty.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/console-tty.c Mon Dec 28 01:15:52 2009 -0600
@@ -75,8 +75,7 @@
{
/* zero out all slots except the lisp ones ... */
#ifdef NEW_GC
- CONSOLE_TTY_DATA (con) = alloc_lrecord_type (struct tty_console,
- &lrecord_tty_console);
+ CONSOLE_TTY_DATA (con) = XTTY_CONSOLE (ALLOC_LISP_OBJECT (tty_console));
#else /* not NEW_GC */
CONSOLE_TTY_DATA (con) = xnew_and_zero (struct tty_console);
#endif /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/console-x-impl.h
--- a/src/console-x-impl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/console-x-impl.h Mon Dec 28 01:15:52 2009 -0600
@@ -45,7 +45,7 @@
struct x_device
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
/* The X connection of this device. */
Display *display;
@@ -243,7 +243,7 @@
struct x_frame
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
/* The widget of this frame.
diff -r d877c14318b3 -r d1247f3cc363 src/console.c
--- a/src/console.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/console.c Mon Dec 28 01:15:52 2009 -0600
@@ -204,7 +204,7 @@
struct console *con = XCONSOLE (console);
struct gcpro gcpro1;
- COPY_LCRECORD (con, XCONSOLE (Vconsole_defaults));
+ COPY_LISP_OBJECT (con, XCONSOLE (Vconsole_defaults));
GCPRO1 (console);
@@ -668,7 +668,7 @@
static void
nuke_all_console_slots (struct console *con, Lisp_Object zap)
{
- ZERO_LCRECORD (con);
+ ZERO_LISP_OBJECT (con);
#define MARKED_SLOT(x) con->x = zap;
#include "conslots.h"
@@ -1327,8 +1327,7 @@
#define DEFVAR_CONSOLE_LOCAL_1(lname, field_name, forward_type, magic_fun) \
do { \
struct symbol_value_forward *I_hate_C = \
- alloc_lrecord_type (struct symbol_value_forward, \
- &lrecord_symbol_value_forward); \
+ XSYMBOL_VALUE_FORWARD (ALLOC_LISP_OBJECT (symbol_value_forward)); \
/*mcpro ((Lisp_Object) I_hate_C);*/ \
\
I_hate_C->magic.value = &(console_local_flags.field_name); \
diff -r d877c14318b3 -r d1247f3cc363 src/database.c
--- a/src/database.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/database.c Mon Dec 28 01:15:52 2009 -0600
@@ -147,7 +147,7 @@
struct Lisp_Database
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object fname;
int mode;
int access_;
diff -r d877c14318b3 -r d1247f3cc363 src/device-gtk.c
--- a/src/device-gtk.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/device-gtk.c Mon Dec 28 01:15:52 2009 -0600
@@ -115,7 +115,7 @@
allocate_gtk_device_struct (struct device *d)
{
#ifdef NEW_GC
- d->device_data = alloc_lrecord_type (struct gtk_device, &lrecord_gtk_device);
+ d->device_data = XGTK_DEVICE (ALLOC_LISP_OBJECT (gtk_device));
#else /* not NEW_GC */
d->device_data = xnew_and_zero (struct gtk_device);
#endif /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/device-impl.h
--- a/src/device-impl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/device-impl.h Mon Dec 28 01:15:52 2009 -0600
@@ -71,7 +71,7 @@
struct device
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
/* Methods for this device's console. This can also be retrieved
through device->console, but it's faster this way. */
diff -r d877c14318b3 -r d1247f3cc363 src/device-msw.c
--- a/src/device-msw.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/device-msw.c Mon Dec 28 01:15:52 2009 -0600
@@ -162,8 +162,7 @@
init_one_device (d);
#ifdef NEW_GC
- d->device_data = alloc_lrecord_type (struct mswindows_device,
- &lrecord_mswindows_device);
+ d->device_data = XMSWINDOWS_DEVICE (ALLOC_LISP_OBJECT (mswindows_device));
#else /* not NEW_GC */
d->device_data = xnew_and_zero (struct mswindows_device);
#endif /* not NEW_GC */
@@ -519,8 +518,7 @@
Extbyte *printer_name;
#ifdef NEW_GC
- d->device_data = alloc_lrecord_type (struct msprinter_device,
- &lrecord_msprinter_device);
+ d->device_data = XMSPRINTER_DEVICE (ALLOC_LISP_OBJECT (msprinter_device));
#else /* not NEW_GC */
d->device_data = xnew_and_zero (struct msprinter_device);
#endif /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/device-tty.c
--- a/src/device-tty.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/device-tty.c Mon Dec 28 01:15:52 2009 -0600
@@ -58,7 +58,7 @@
allocate_tty_device_struct (struct device *d)
{
#ifdef NEW_GC
- d->device_data = alloc_lrecord_type (struct tty_device, &lrecord_tty_device);
+ d->device_data = XTTY_DEVICE (ALLOC_LISP_OBJECT (tty_device));
#else /* not NEW_GC */
d->device_data = xnew_and_zero (struct tty_device);
#endif /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/device-x.c
--- a/src/device-x.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/device-x.c Mon Dec 28 01:15:52 2009 -0600
@@ -228,7 +228,7 @@
allocate_x_device_struct (struct device *d)
{
#ifdef NEW_GC
- d->device_data = alloc_lrecord_type (struct x_device, &lrecord_x_device);
+ d->device_data = XX_DEVICE (ALLOC_LISP_OBJECT (x_device));
#else /* not NEW_GC */
d->device_data = xnew_and_zero (struct x_device);
#endif /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/device.c
--- a/src/device.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/device.c Mon Dec 28 01:15:52 2009 -0600
@@ -201,7 +201,7 @@
static void
nuke_all_device_slots (struct device *d, Lisp_Object zap)
{
- ZERO_LCRECORD (d);
+ ZERO_LISP_OBJECT (d);
#define MARKED_SLOT(x) d->x = zap;
#include "devslots.h"
diff -r d877c14318b3 -r d1247f3cc363 src/dynarr.c
--- a/src/dynarr.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/dynarr.c Mon Dec 28 01:15:52 2009 -0600
@@ -172,7 +172,8 @@
const struct lrecord_implementation *dynarr_imp,
const struct lrecord_implementation *imp)
{
- Dynarr *d = (Dynarr *) XPNTR (ALLOC_LISP_OBJECT (dynarr));
+ Dynarr *d = (Dynarr *) XPNTR (alloc_sized_lrecord (sizeof (Dynarr),
+ dynarr_imp));
d->elsize = elsize;
d->lisp_imp = imp;
diff -r d877c14318b3 -r d1247f3cc363 src/elhash.c
--- a/src/elhash.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/elhash.c Mon Dec 28 01:15:52 2009 -0600
@@ -96,7 +96,7 @@
struct Lisp_Hash_Table
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Elemcount size;
Elemcount count;
Elemcount rehash_count;
@@ -1026,7 +1026,7 @@
const Lisp_Hash_Table *ht_old = xhash_table (hash_table);
Lisp_Object obj = ALLOC_LISP_OBJECT (hash_table);
Lisp_Hash_Table *ht = XHASH_TABLE (obj);
- COPY_LCRECORD (ht, ht_old);
+ COPY_LISP_OBJECT (ht, ht_old);
/* We leave room for one never-occupied sentinel htentry at the end. */
ht->hentries = allocate_hash_table_entries (ht_old->size + 1);
diff -r d877c14318b3 -r d1247f3cc363 src/elhash.h
--- a/src/elhash.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/elhash.h Mon Dec 28 01:15:52 2009 -0600
@@ -36,7 +36,7 @@
typedef struct htentry
{
#ifdef NEW_GC
- struct lrecord_header lheader;
+ LISP_OBJECT_HEADER lheader;
#endif /* NEW_GC */
Lisp_Object key;
Lisp_Object value;
diff -r d877c14318b3 -r d1247f3cc363 src/event-stream.c
--- a/src/event-stream.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/event-stream.c Mon Dec 28 01:15:52 2009 -0600
@@ -455,7 +455,7 @@
xfree (builder->echo_buf, Ibyte *);
builder->echo_buf = NULL;
}
- FREE_LCRECORD (wrap_command_builder (builder));
+ FREE_LISP_OBJECT (wrap_command_builder (builder));
}
static void
@@ -1163,7 +1163,7 @@
*timeout_list = noseeum_cons (op, *timeout_list);
}
else
- FREE_LCRECORD (op);
+ FREE_LISP_OBJECT (op);
UNGCPRO;
return id;
@@ -1200,7 +1200,7 @@
signal_remove_async_interval_timeout (timeout->interval_id);
else
event_stream_remove_timeout (timeout->interval_id);
- FREE_LCRECORD (op);
+ FREE_LISP_OBJECT (op);
}
}
diff -r d877c14318b3 -r d1247f3cc363 src/events.h
--- a/src/events.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/events.h Mon Dec 28 01:15:52 2009 -0600
@@ -123,7 +123,7 @@
struct Lisp_Key_Data
{
#ifdef EVENT_DATA_AS_OBJECTS
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
#endif /* EVENT_DATA_AS_OBJECTS */
/* What keysym this is; a character or a symbol. */
Lisp_Object keysym;
@@ -219,7 +219,7 @@
struct Lisp_Button_Data
{
#ifdef EVENT_DATA_AS_OBJECTS
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
#endif /* EVENT_DATA_AS_OBJECTS */
/* What button went down or up. */
int button;
@@ -271,7 +271,7 @@
struct Lisp_Motion_Data
{
#ifdef EVENT_DATA_AS_OBJECTS
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
#endif /* EVENT_DATA_AS_OBJECTS */
/* Where it was after it moved (in pixels). */
int x, y;
@@ -313,7 +313,7 @@
struct Lisp_Process_Data
{
#ifdef EVENT_DATA_AS_OBJECTS
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
#endif /* EVENT_DATA_AS_OBJECTS */
/* the XEmacs "process" object in question */
Lisp_Object process;
@@ -352,7 +352,7 @@
object The object passed to that function.
*/
#ifdef EVENT_DATA_AS_OBJECTS
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
#endif /* EVENT_DATA_AS_OBJECTS */
int interval_id;
int id_number;
@@ -411,7 +411,7 @@
object Argument of function.
*/
#ifdef EVENT_DATA_AS_OBJECTS
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
#endif /* EVENT_DATA_AS_OBJECTS */
Lisp_Object function;
Lisp_Object object;
@@ -464,7 +464,7 @@
values for other types of misc_user_events.
*/
#ifdef EVENT_DATA_AS_OBJECTS
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
#endif /* EVENT_DATA_AS_OBJECTS */
Lisp_Object function;
Lisp_Object object;
@@ -541,7 +541,7 @@
*/
#ifdef EVENT_DATA_AS_OBJECTS
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
#endif /* EVENT_DATA_AS_OBJECTS */
void (*internal_function) (Lisp_Object);
Lisp_Object object;
@@ -597,7 +597,7 @@
*/
#ifdef EVENT_DATA_AS_OBJECTS
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
#endif /* EVENT_DATA_AS_OBJECTS */
union {
@@ -660,7 +660,7 @@
struct Lisp_Timeout
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
int id; /* Id we use to identify the timeout over its lifetime */
int interval_id; /* Id for this particular interval; this may
be different each time the timeout is
@@ -690,7 +690,7 @@
- Likewise for events chained in the command builder.
- Otherwise it's Qnil.
*/
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
Lisp_Object next;
emacs_event_type event_type;
@@ -1137,7 +1137,7 @@
*/
struct command_builder
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object console; /* back pointer to the console this command
builder is for */
#if 0
diff -r d877c14318b3 -r d1247f3cc363 src/extents-impl.h
--- a/src/extents-impl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/extents-impl.h Mon Dec 28 01:15:52 2009 -0600
@@ -27,7 +27,7 @@
struct extent
{
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
Memxpos start;
Memxpos end;
@@ -103,7 +103,7 @@
typedef struct extent_auxiliary extent_auxiliary;
struct extent_auxiliary
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object begin_glyph;
Lisp_Object end_glyph;
@@ -129,7 +129,7 @@
struct extent_info
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
struct extent_list *extents;
struct stack_of_extents *soe;
diff -r d877c14318b3 -r d1247f3cc363 src/extents.c
--- a/src/extents.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/extents.c Mon Dec 28 01:15:52 2009 -0600
@@ -243,7 +243,7 @@
typedef struct gap_array_marker
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
int pos;
struct gap_array_marker *next;
@@ -273,7 +273,7 @@
typedef struct gap_array
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
Elemcount gap;
Elemcount gapsize;
@@ -319,7 +319,7 @@
typedef struct extent_list_marker
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
Gap_Array_Marker *m;
int endp;
@@ -329,7 +329,7 @@
typedef struct extent_list
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
Gap_Array *start;
Gap_Array *end;
@@ -394,7 +394,7 @@
typedef struct stack_of_extents
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
Extent_List *extents;
Memxpos pos; /* Position of stack of extents. EXTENTS is the list of
@@ -691,7 +691,7 @@
assert (pos >= 0 && pos <= ga->numels);
#ifdef NEW_GC
- m = alloc_lrecord_type (Gap_Array_Marker, &lrecord_gap_array_marker);
+ m = XGAP_ARRAY_MARKER (ALLOC_LISP_OBJECT (gap_array_marker));
#else /* not NEW_GC */
if (gap_array_marker_freelist)
{
@@ -757,7 +757,8 @@
make_gap_array (Elemcount elsize)
{
#ifdef NEW_GC
- Gap_Array *ga = alloc_lrecord_type (Gap_Array, &lrecord_gap_array);
+ Gap_Array *ga = XGAP_ARRAY (ALLOC_SIZED_LISP_OBJECT (sizeof (Gap_Array),
+ gap_array));
#else /* not NEW_GC */
Gap_Array *ga = xnew_and_zero (Gap_Array);
#endif /* not NEW_GC */
@@ -928,7 +929,7 @@
Extent_List_Marker *m;
#ifdef NEW_GC
- m = alloc_lrecord_type (Extent_List_Marker, &lrecord_extent_list_marker);
+ m = XEXTENT_LIST_MARKER (ALLOC_LISP_OBJECT (extent_list_marker));
#else /* not NEW_GC */
if (extent_list_marker_freelist)
{
@@ -977,7 +978,7 @@
allocate_extent_list (void)
{
#ifdef NEW_GC
- Extent_List *el = alloc_lrecord_type (Extent_List, &lrecord_extent_list);
+ Extent_List *el = XEXTENT_LIST (ALLOC_LISP_OBJECT (extent_list));
#else /* not NEW_GC */
Extent_List *el = xnew (Extent_List);
#endif /* not NEW_GC */
@@ -1042,7 +1043,7 @@
Lisp_Object obj = ALLOC_LISP_OBJECT (extent_auxiliary);
struct extent_auxiliary *data = XEXTENT_AUXILIARY (obj);
- COPY_LCRECORD (data, &extent_auxiliary_defaults);
+ COPY_LISP_OBJECT (data, &extent_auxiliary_defaults);
ext->plist = Fcons (obj, ext->plist);
ext->flags.has_aux = 1;
}
@@ -1786,8 +1787,8 @@
allocate_soe (void)
{
#ifdef NEW_GC
- struct stack_of_extents *soe =
- alloc_lrecord_type (struct stack_of_extents, &lrecord_stack_of_extents);
+ struct stack_of_extents *soe =
+ XSTACK_OF_EXTENTS (ALLOC_LISP_OBJECT (stack_of_extents));
#else /* not NEW_GC */
struct stack_of_extents *soe = xnew_and_zero (struct stack_of_extents);
#endif /* not NEW_GC */
@@ -4042,7 +4043,7 @@
Lisp_Object ea = ALLOC_LISP_OBJECT (extent_auxiliary);
struct extent_auxiliary *data = XEXTENT_AUXILIARY (ea);
- COPY_LCRECORD (data, XEXTENT_AUXILIARY (XCAR (original->plist)));
+ COPY_LISP_OBJECT (data, XEXTENT_AUXILIARY (XCAR (original->plist)));
XCAR (e->plist) = ea;
}
diff -r d877c14318b3 -r d1247f3cc363 src/faces.h
--- a/src/faces.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/faces.h Mon Dec 28 01:15:52 2009 -0600
@@ -34,7 +34,7 @@
struct Lisp_Face
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object name;
Lisp_Object doc_string;
@@ -119,7 +119,7 @@
struct face_cachel
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
/* There are two kinds of cachels; those created from a single face
and those created by merging more than one face. In the former
diff -r d877c14318b3 -r d1247f3cc363 src/file-coding.c
--- a/src/file-coding.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/file-coding.c Mon Dec 28 01:15:52 2009 -0600
@@ -1459,7 +1459,7 @@
{
Lisp_Coding_System *to = XCODING_SYSTEM (new_coding_system);
Lisp_Coding_System *from = XCODING_SYSTEM (old_coding_system);
- COPY_SIZED_LCRECORD (to, from, sizeof_coding_system (from));
+ COPY_SIZED_LISP_OBJECT (to, from, sizeof_coding_system (from));
to->name = new_name;
}
return new_coding_system;
diff -r d877c14318b3 -r d1247f3cc363 src/file-coding.h
--- a/src/file-coding.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/file-coding.h Mon Dec 28 01:15:52 2009 -0600
@@ -188,7 +188,7 @@
struct Lisp_Coding_System
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
struct coding_system_methods *methods;
#define CODING_SYSTEM_SLOT_DECLARATION
diff -r d877c14318b3 -r d1247f3cc363 src/font-mgr.h
--- a/src/font-mgr.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/font-mgr.h Mon Dec 28 01:15:52 2009 -0600
@@ -54,7 +54,7 @@
struct fc_pattern
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
FcPattern *fcpatPtr;
};
@@ -73,7 +73,7 @@
struct fc_config
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
FcConfig *fccfgPtr;
};
diff -r d877c14318b3 -r d1247f3cc363 src/frame-gtk.c
--- a/src/frame-gtk.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/frame-gtk.c Mon Dec 28 01:15:52 2009 -0600
@@ -973,7 +973,7 @@
/* zero out all slots. */
#ifdef NEW_GC
- f->frame_data = alloc_lrecord_type (struct gtk_frame, &lrecord_gtk_frame);
+ f->frame_data = XGTK_FRAME (ALLOC_LISP_OBJECT (gtk_frame));
#else /* not NEW_GC */
f->frame_data = xnew_and_zero (struct gtk_frame);
#endif /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/frame-impl.h
--- a/src/frame-impl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/frame-impl.h Mon Dec 28 01:15:52 2009 -0600
@@ -41,7 +41,7 @@
struct frame
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
/* Methods for this frame's console. This can also be retrieved
through frame->device->console, but it's faster this way. */
diff -r d877c14318b3 -r d1247f3cc363 src/frame-msw.c
--- a/src/frame-msw.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/frame-msw.c Mon Dec 28 01:15:52 2009 -0600
@@ -172,8 +172,7 @@
CHECK_INT (height);
#ifdef NEW_GC
- f->frame_data = alloc_lrecord_type (struct mswindows_frame,
- &lrecord_mswindows_frame);
+ f->frame_data = XMSWINDOWS_FRAME (ALLOC_LISP_OBJECT (mswindows_frame));
#else /* not NEW_GC */
f->frame_data = xnew_and_zero (struct mswindows_frame);
#endif /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/frame-x.c
--- a/src/frame-x.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/frame-x.c Mon Dec 28 01:15:52 2009 -0600
@@ -2042,7 +2042,7 @@
{
/* zero out all slots. */
#ifdef NEW_GC
- f->frame_data = alloc_lrecord_type (struct x_frame, &lrecord_x_frame);
+ f->frame_data = XX_FRAME (ALLOC_LISP_OBJECT (x_frame));
#else /* not NEW_GC */
f->frame_data = xnew_and_zero (struct x_frame);
#endif /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/frame.c
--- a/src/frame.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/frame.c Mon Dec 28 01:15:52 2009 -0600
@@ -288,7 +288,7 @@
static void
nuke_all_frame_slots (struct frame *f)
{
- ZERO_LCRECORD (f);
+ ZERO_LISP_OBJECT (f);
#define MARKED_SLOT(x) f->x = Qnil;
#include "frameslots.h"
diff -r d877c14318b3 -r d1247f3cc363 src/glyphs.c
--- a/src/glyphs.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/glyphs.c Mon Dec 28 01:15:52 2009 -0600
@@ -1991,7 +1991,7 @@
device-specific method to copy the window-system subobject. */
new_ = allocate_image_instance (XIMAGE_INSTANCE_DOMAIN (image_instance),
Qnil, Qnil);
- COPY_LCRECORD (XIMAGE_INSTANCE (new_), XIMAGE_INSTANCE (image_instance));
+ COPY_LISP_OBJECT (XIMAGE_INSTANCE (new_), XIMAGE_INSTANCE (image_instance));
/* note that if this method returns non-zero, this method MUST
copy any window-system resources, so that when one image instance is
freed, the other one is not hosed. */
@@ -4612,7 +4612,7 @@
struct expose_ignore *ei;
#ifdef NEW_GC
- ei = alloc_lrecord_type (struct expose_ignore, &lrecord_expose_ignore);
+ ei = XEXPOSE_IGNORE (ALLOC_LISP_OBJECT (expose_ignore));
#else /* not NEW_GC */
ei = Blocktype_alloc (the_expose_ignore_blocktype);
#endif /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/glyphs.h
--- a/src/glyphs.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/glyphs.h Mon Dec 28 01:15:52 2009 -0600
@@ -594,7 +594,7 @@
struct Lisp_Image_Instance
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object domain; /* The domain in which we were cached. */
Lisp_Object device; /* The device of the domain. Recorded
since the domain may get deleted
@@ -946,7 +946,7 @@
struct Lisp_Glyph
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
enum glyph_type type;
@@ -1068,7 +1068,7 @@
struct glyph_cachel
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
Lisp_Object glyph;
@@ -1196,7 +1196,7 @@
struct expose_ignore
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
int x, y;
int width, height;
diff -r d877c14318b3 -r d1247f3cc363 src/gui.h
--- a/src/gui.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/gui.h Mon Dec 28 01:15:52 2009 -0600
@@ -44,7 +44,7 @@
menu item or submenu properties */
struct Lisp_Gui_Item
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object name; /* String */
Lisp_Object callback; /* Symbol or form */
Lisp_Object callback_ex; /* Form taking context arguments */
diff -r d877c14318b3 -r d1247f3cc363 src/inline.c
--- a/src/inline.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/inline.c Mon Dec 28 01:15:52 2009 -0600
@@ -99,19 +99,26 @@
#include "database.h"
#endif
+#include "console-stream-impl.h"
+
#ifdef HAVE_X_WINDOWS
-#include "glyphs-x.h"
+#include "console-x-impl.h"
#ifdef USE_XFT
#include "font-mgr.h"
#endif
#endif
#ifdef HAVE_MS_WINDOWS
-#include "console-msw.h"
+#include "console-msw-impl.h"
+#endif
+
+#ifdef HAVE_TTY
+#include "console-tty-impl.h"
+#include "objects-tty-impl.h"
#endif
#ifdef HAVE_GTK
-#include "console-gtk.h"
+#include "console-gtk-impl.h"
#include "ui-gtk.h"
#endif
diff -r d877c14318b3 -r d1247f3cc363 src/keymap.c
--- a/src/keymap.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/keymap.c Mon Dec 28 01:15:52 2009 -0600
@@ -148,7 +148,7 @@
struct Lisp_Keymap
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object parents; /* Keymaps to be searched after this one.
An ordered list */
Lisp_Object prompt; /* Qnil or a string to print in the minibuffer
diff -r d877c14318b3 -r d1247f3cc363 src/lisp.h
--- a/src/lisp.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/lisp.h Mon Dec 28 01:15:52 2009 -0600
@@ -1818,7 +1818,7 @@
struct Lisp_Cons
{
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
Lisp_Object car_, cdr_;
};
typedef struct Lisp_Cons Lisp_Cons;
@@ -1835,7 +1835,7 @@
};
#endif
-DECLARE_MODULE_API_LRECORD (cons, Lisp_Cons);
+DECLARE_MODULE_API_LISP_OBJECT (cons, Lisp_Cons);
#define XCONS(x) XRECORD (x, cons, Lisp_Cons)
#define wrap_cons(p) wrap_record (p, cons)
#define CONSP(x) RECORDP (x, cons)
@@ -2373,13 +2373,13 @@
#ifdef NEW_GC
struct Lisp_String_Direct_Data
{
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
Bytecount size;
Ibyte data[1];
};
typedef struct Lisp_String_Direct_Data Lisp_String_Direct_Data;
-DECLARE_MODULE_API_LRECORD (string_direct_data, Lisp_String_Direct_Data);
+DECLARE_MODULE_API_LISP_OBJECT (string_direct_data, Lisp_String_Direct_Data);
#define XSTRING_DIRECT_DATA(x) \
XRECORD (x, string_direct_data, Lisp_String_Direct_Data)
#define wrap_string_direct_data(p) wrap_record (p, string_direct_data)
@@ -2393,13 +2393,13 @@
struct Lisp_String_Indirect_Data
{
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
Bytecount size;
Ibyte *data;
};
typedef struct Lisp_String_Indirect_Data Lisp_String_Indirect_Data;
-DECLARE_MODULE_API_LRECORD (string_indirect_data, Lisp_String_Indirect_Data);
+DECLARE_MODULE_API_LISP_OBJECT (string_indirect_data, Lisp_String_Indirect_Data);
#define XSTRING_INDIRECT_DATA(x) \
XRECORD (x, string_indirect_data, Lisp_String_Indirect_Data)
#define wrap_string_indirect_data(p) wrap_record (p, string_indirect_data)
@@ -2474,7 +2474,7 @@
#define MAX_STRING_ASCII_BEGIN ((1 << 21) - 1)
#endif /* not NEW_GC */
-DECLARE_MODULE_API_LRECORD (string, Lisp_String);
+DECLARE_MODULE_API_LISP_OBJECT (string, Lisp_String);
#define XSTRING(x) XRECORD (x, string, Lisp_String)
#define wrap_string(p) wrap_record (p, string)
#define STRINGP(x) RECORDP (x, string)
@@ -2547,7 +2547,7 @@
struct Lisp_Vector
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
long size;
Lisp_Object contents[1];
};
@@ -2584,7 +2584,7 @@
struct Lisp_Bit_Vector
{
- struct LCRECORD_HEADER lheader;
+ LISP_OBJECT_HEADER lheader;
Elemcount size;
unsigned long bits[1];
};
@@ -2638,7 +2638,7 @@
/* For when we want to include a bit vector in another structure, and we
know it's of a fixed size. */
#define DECLARE_INLINE_LISP_BIT_VECTOR(numbits) struct { \
- struct LCRECORD_HEADER lheader; \
+ LISP_OBJECT_HEADER lheader; \
Elemcount size; \
unsigned long bits[BIT_VECTOR_LONG_STORAGE(numbits)]; \
}
@@ -2648,7 +2648,7 @@
typedef struct Lisp_Symbol Lisp_Symbol;
struct Lisp_Symbol
{
- struct lrecord_header lheader;
+ LISP_OBJECT_HEADER lheader;
/* next symbol in this obarray bucket */
Lisp_Symbol *next;
Lisp_Object name;
@@ -2664,7 +2664,7 @@
XSTRING_LENGTH (symbol_name (XSYMBOL (sym))))))
#define KEYWORDP(obj) (SYMBOLP (obj) && SYMBOL_IS_KEYWORD (obj))
-DECLARE_MODULE_API_LRECORD (symbol, Lisp_Symbol);
+DECLARE_MODULE_API_LISP_OBJECT (symbol, Lisp_Symbol);
#define XSYMBOL(x) XRECORD (x, symbol, Lisp_Symbol)
#define wrap_symbol(p) wrap_record (p, symbol)
#define SYMBOLP(x) RECORDP (x, symbol)
@@ -2692,7 +2692,7 @@
struct Lisp_Subr
{
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
short min_args;
short max_args;
/* #### We should make these const Ascbyte * or const Ibyte *, not const
@@ -2722,7 +2722,7 @@
typedef struct Lisp_Marker Lisp_Marker;
struct Lisp_Marker
{
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
Lisp_Marker *next;
Lisp_Marker *prev;
struct buffer *buffer;
@@ -2730,7 +2730,7 @@
char insertion_type;
};
-DECLARE_MODULE_API_LRECORD (marker, Lisp_Marker);
+DECLARE_MODULE_API_LISP_OBJECT (marker, Lisp_Marker);
#define XMARKER(x) XRECORD (x, marker, Lisp_Marker)
#define wrap_marker(p) wrap_record (p, marker)
#define MARKERP(x) RECORDP (x, marker)
@@ -2976,7 +2976,7 @@
struct Lisp_Float
{
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
union { double d; struct Lisp_Float *unused_next_; } data;
};
typedef struct Lisp_Float Lisp_Float;
@@ -3064,7 +3064,7 @@
struct weak_box
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object value;
Lisp_Object next_weak_box; /* don't mark through this! */
@@ -3086,7 +3086,7 @@
struct ephemeron
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object key;
@@ -3145,7 +3145,7 @@
struct weak_list
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object list; /* don't mark through this! */
enum weak_list_type type;
Lisp_Object next_weak; /* don't mark through this! */
diff -r d877c14318b3 -r d1247f3cc363 src/lrecord.h
--- a/src/lrecord.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/lrecord.h Mon Dec 28 01:15:52 2009 -0600
@@ -26,36 +26,16 @@
#ifndef INCLUDED_lrecord_h_
#define INCLUDED_lrecord_h_
-#ifdef NEW_GC
-/* The "lrecord" type of Lisp object is used for all object types
- other than a few simple ones (like char and int). This allows many
- types to be implemented but only a few bits required in a Lisp
- object for type information. (The tradeoff is that each object has
- its type marked in it, thereby increasing its size.) All lrecords
- begin with a `struct lrecord_header', which identifies the lisp
- object type, by providing an index into a table of `struct
- lrecord_implementation', which describes the behavior of the lisp
- object. It also contains some other data bits.
+/* The "lrecord" type of Lisp object is used for all object types other
+ than a few simple ones (like char and int). This allows many types to be
+ implemented but only a few bits required in a Lisp object for type
+ information. (The tradeoff is that each object has its type marked in
+ it, thereby increasing its size.) All lrecords begin with a `struct
+ lrecord_header', which identifies the lisp object type, by providing an
+ index into a table of `struct lrecord_implementation', which describes
+ the behavior of the lisp object. It also contains some other data bits.
- Creating a new lrecord type is fairly easy; just follow the
- lead of some existing type (e.g. hash tables). Note that you
- do not need to supply all the methods (see below); reasonable
- defaults are provided for many of them. Alternatively, if you're
- just looking for a way of encapsulating data (which possibly
- could contain Lisp_Objects in it), you may well be able to use
- the opaque type.
-*/
-#else /* not NEW_GC */
-/* The "lrecord" type of Lisp object is used for all object types
- other than a few simple ones. This allows many types to be
- implemented but only a few bits required in a Lisp object for type
- information. (The tradeoff is that each object has its type marked
- in it, thereby increasing its size.) All lrecords begin with a
- `struct lrecord_header', which identifies the lisp object type, by
- providing an index into a table of `struct lrecord_implementation',
- which describes the behavior of the lisp object. It also contains
- some other data bits.
-
+#ifndef NEW_GC
Lrecords are of two types: straight lrecords, and lcrecords.
Straight lrecords are used for those types of objects that have
their own allocation routines (typically allocated out of 2K chunks
@@ -70,38 +50,45 @@
Lcrecords have a `struct old_lcrecord_header' at the top, which
contains a `struct lrecord_header' and a `next' pointer, and are
allocated using old_alloc_lcrecord_type() or its variants.
+#endif
- Creating a new lcrecord type is fairly easy; just follow the
+ Creating a new Lisp object type is fairly easy; just follow the
lead of some existing type (e.g. hash tables). Note that you
do not need to supply all the methods (see below); reasonable
defaults are provided for many of them. Alternatively, if you're
just looking for a way of encapsulating data (which possibly
could contain Lisp_Objects in it), you may well be able to use
- the opaque type. --ben
+ the opaque type.
+
+ The "public API's" meant for use by regular Lisp objects are macros
+ in capital letters, involving the word "LISP_OBJECT". Underlyingly,
+ the functions and structures use "lrecord" or "lcrecord", but most
+ code shouldn't have to worry about this.
*/
-#endif /* not NEW_GC */
#ifdef NEW_GC
#define ALLOC_LISP_OBJECT(type) alloc_lrecord (&lrecord_##type)
#define ALLOC_SIZED_LISP_OBJECT(size, type) \
alloc_sized_lrecord (size, &lrecord_##type)
-#define COPY_SIZED_LCRECORD copy_sized_lrecord
-#define COPY_LCRECORD copy_lrecord
-#define LISPOBJ_STORAGE_SIZE(ptr, size, stats) \
+#define COPY_SIZED_LISP_OBJECT copy_sized_lrecord
+#define COPY_LISP_OBJECT copy_lrecord
+#define LISP_OBJECT_STORAGE_SIZE(ptr, size, stats) \
mc_alloced_storage_size (size, stats)
-#define ZERO_LCRECORD zero_lrecord
-#define LCRECORD_HEADER lrecord_header
-#define FREE_LCRECORD free_lrecord
+#define ZERO_LISP_OBJECT zero_lrecord
+#define LISP_OBJECT_HEADER struct lrecord_header
+#define FROB_BLOCK_LISP_OBJECT_HEADER struct lrecord_header
+#define FREE_LISP_OBJECT free_lrecord
#else /* not NEW_GC */
#define ALLOC_LISP_OBJECT(type) alloc_automanaged_lcrecord (&lrecord_##type)
#define ALLOC_SIZED_LISP_OBJECT(size, type) \
old_alloc_sized_lcrecord (size, &lrecord_##type)
-#define COPY_SIZED_LCRECORD old_copy_sized_lcrecord
-#define COPY_LCRECORD old_copy_lcrecord
-#define LISPOBJ_STORAGE_SIZE malloced_storage_size
-#define ZERO_LCRECORD old_zero_lcrecord
-#define LCRECORD_HEADER old_lcrecord_header
-#define FREE_LCRECORD old_free_lcrecord
+#define COPY_SIZED_LISP_OBJECT old_copy_sized_lcrecord
+#define COPY_LISP_OBJECT old_copy_lcrecord
+#define LISP_OBJECT_STORAGE_SIZE malloced_storage_size
+#define ZERO_LISP_OBJECT old_zero_lcrecord
+#define LISP_OBJECT_HEADER struct old_lcrecord_header
+#define FROB_BLOCK_LISP_OBJECT_HEADER struct lrecord_header
+#define FREE_LISP_OBJECT old_free_lcrecord
#endif /* not NEW_GC */
BEGIN_C_DECLS
@@ -730,7 +717,7 @@
struct Lisp_Hash_Table
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Elemcount size;
Elemcount count;
Elemcount rehash_count;
@@ -795,7 +782,7 @@
struct Lisp_Specifier
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
struct specifier_methods *methods;
...
@@ -1155,6 +1142,16 @@
objects need special handling in alloc.c. This does not apply to
NEW_GC, because it does this automatically.
+ DEFINE_*_INTERNAL_LISP_OBJECT is for "internal" objects that should
+ never be visible on the Lisp level. This is a shorthand for the
+ most common type of internal objects, which have no equal or hash
+ method (since they generally won't appear in hash tables), no
+ finalizer and internal_object_printer() as their print method
+ (which prints that the object is internal and shouldn't be visible
+ externally). For internal objects needing a finalizer, equal or
+ hash method, use the normal DEFINE_*_LISP_OBJECT mechanism for
+ defining these objects.
+
DEFINE_*_WITH_PROPS is for objects which support the unified property
interface using `get', `put', `remprop' and `object-plist'.
@@ -1357,9 +1354,9 @@
1. Declare the struct for your object in a header file somewhere.
Remember that it must begin with
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
- 2. Put the "standard junk" (DECLARE_RECORD()/XFOO/etc.) below the
+ 2. Put the "standard junk" (DECLARE_LISP_OBJECT()/XFOO/etc.) below the
struct definition -- see below.
3. Add this header file to inline.c.
@@ -1372,8 +1369,13 @@
describing the purpose of the descriptions; and comments elsewhere in
this file describing the exact syntax of the description structures.
- 6. Define your object with DEFINE_LISP_OBJECT() or some
- variant.
+ 6. Define your object with DEFINE_*_LISP_OBJECT() or some
+ variant. At the minimum, you need to decide whether your object can
+ be dumped. Objects that are created as part of the loadup process and
+ need to be persistent across dumping should be created dumpable.
+ Nondumpable objects are generally those associated with display,
+ particularly those containing a pointer to an external library object
+ (e.g. a window-system window).
7. Include the header file in the .c file where you defined the object.
@@ -1391,7 +1393,7 @@
struct toolbar_button
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object next;
Lisp_Object frame;
@@ -1506,9 +1508,9 @@
/*
Note: Object types defined in external dynamically-loaded modules (not
-part of the XEmacs main source code) should use DECLARE_MODULE_LRECORD
-and DEFINE_MODULE_LISP_OBJECT rather than DECLARE_LISP_OBJECT
-and DEFINE_LISP_OBJECT. The MODULE versions declare and
+part of the XEmacs main source code) should use DECLARE_*_MODULE_LISP_OBJECT
+and DEFINE_*_MODULE_LISP_OBJECT rather than DECLARE_*_LISP_OBJECT
+and DEFINE_*_LISP_OBJECT. The MODULE versions declare and
allocate an enumerator for the type being defined.
*/
@@ -1516,7 +1518,7 @@
#ifdef ERROR_CHECK_TYPES
-# define DECLARE_LISP_OBJECT(c_name, structtype) \
+# define DECLARE_LISP_OBJECT(c_name, structtype) \
extern const struct lrecord_implementation lrecord_##c_name; \
DECLARE_INLINE_HEADER ( \
structtype * \
@@ -1528,7 +1530,7 @@
} \
extern Lisp_Object Q##c_name##p
-# define DECLARE_MODULE_API_LRECORD(c_name, structtype) \
+# define DECLARE_MODULE_API_LISP_OBJECT(c_name, structtype) \
extern MODULE_API const struct lrecord_implementation lrecord_##c_name; \
DECLARE_INLINE_HEADER ( \
structtype * \
@@ -1540,7 +1542,7 @@
} \
extern MODULE_API Lisp_Object Q##c_name##p
-# define DECLARE_MODULE_LRECORD(c_name, structtype) \
+# define DECLARE_MODULE_LISP_OBJECT(c_name, structtype) \
extern int lrecord_type_##c_name; \
extern struct lrecord_implementation lrecord_##c_name; \
DECLARE_INLINE_HEADER ( \
@@ -1553,20 +1555,7 @@
} \
extern Lisp_Object Q##c_name##p
-# define DECLARE_NONRECORD(c_name, type_enum, structtype) \
-DECLARE_INLINE_HEADER ( \
-structtype * \
-error_check_##c_name (Lisp_Object obj, const Ascbyte *file, int line) \
-) \
-{ \
- assert_at_line (XTYPE (obj) == type_enum, file, line); \
- return (structtype *) XPNTR (obj); \
-} \
-extern Lisp_Object Q##c_name##p
-
# define XRECORD(x, c_name, structtype) \
- error_check_##c_name (x, __FILE__, __LINE__)
-# define XNONRECORD(x, c_name, type_enum, structtype) \
error_check_##c_name (x, __FILE__, __LINE__)
DECLARE_INLINE_HEADER (
@@ -1586,21 +1575,17 @@
#else /* not ERROR_CHECK_TYPES */
-# define DECLARE_LISP_OBJECT(c_name, structtype) \
+# define DECLARE_LISP_OBJECT(c_name, structtype) \
extern Lisp_Object Q##c_name##p; \
extern const struct lrecord_implementation lrecord_##c_name
-# define DECLARE_MODULE_API_LRECORD(c_name, structtype) \
-extern MODULE_API Lisp_Object Q##c_name##p; \
+# define DECLARE_MODULE_API_LISP_OBJECT(c_name, structtype) \
+extern MODULE_API Lisp_Object Q##c_name##p; \
extern MODULE_API const struct lrecord_implementation lrecord_##c_name
-# define DECLARE_MODULE_LRECORD(c_name, structtype) \
+# define DECLARE_MODULE_LISP_OBJECT(c_name, structtype) \
extern Lisp_Object Q##c_name##p; \
extern int lrecord_type_##c_name; \
extern struct lrecord_implementation lrecord_##c_name
-# define DECLARE_NONRECORD(c_name, type_enum, structtype) \
-extern Lisp_Object Q##c_name##p
# define XRECORD(x, c_name, structtype) ((structtype *) XPNTR (x))
-# define XNONRECORD(x, c_name, type_enum, structtype) \
- ((structtype *) XPNTR (x))
/* wrap_pointer_1 is so named as a suggestion not to use it unless you
know what you're doing. */
#define wrap_record(ptr, ty) wrap_pointer_1 (ptr)
@@ -1653,12 +1638,12 @@
- For most objects, simply call ALLOC_LISP_OBJECT (type), where TYPE is
the name of the type (e.g. toolbar_button). Such objects can be freed
- manually using FREE_LCRECORD.
+ manually using FREE_LISP_OBJECT.
- For objects whose size can vary (and hence which have a
size_in_bytes_method rather than a static_size), call
ALLOC_SIZED_LISP_OBJECT (size, type), where TYPE is the
- name of the type. NOTE: You cannot call FREE_LCRECORD() on such
+ name of the type. NOTE: You cannot call FREE_LISP_OBJECT() on such
on object! (At least when not NEW_GC)
- Basic lrecords (of which there are a limited number, which exist only
@@ -1674,7 +1659,7 @@
struct lcrecord_list
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object free;
Elemcount size;
const struct lrecord_implementation *implementation;
@@ -1695,7 +1680,7 @@
lrecords. lcrecords themselves are divided into three types: (1)
auto-managed, (2) hand-managed, and (3) unmanaged. "Managed" refers to
using a special object called an lcrecord-list to keep track of freed
- lcrecords, which can freed with FREE_LCRECORD() or the like and later be
+ lcrecords, which can freed with FREE_LISP_OBJECT() or the like and later be
recycled when a new lcrecord is required, rather than requiring new
malloc(). Thus, allocation of lcrecords can be very
cheap. (Technically, the lcrecord-list manager could divide up large
@@ -1711,7 +1696,7 @@
-- "Auto-managed" means that you just go ahead and allocate the lcrecord
whenever you want, using ALLOC_LISP_OBJECT(), and the appropriate
lcrecord-list manager is automatically created. To free, you just call
- "FREE_LCRECORD()" and the appropriate lcrecord-list manager is
+ "FREE_LISP_OBJECT()" and the appropriate lcrecord-list manager is
automatically located and called. The limitation here of course is that
all your objects are of the same size. (#### Eventually we should have a
more sophisticated system that tracks the sizes seen and creates one
@@ -1809,23 +1794,18 @@
#else /* NEW_GC */
-Lisp_Object alloc_sized_lrecord (Bytecount size,
- const struct lrecord_implementation *imp);
+MODULE_API Lisp_Object alloc_sized_lrecord (Bytecount size,
+ const struct lrecord_implementation *imp);
Lisp_Object noseeum_alloc_sized_lrecord (Bytecount size,
- const struct lrecord_implementation *);
-Lisp_Object alloc_lrecord (const struct lrecord_implementation *imp);
+ const struct lrecord_implementation *imp);
+MODULE_API Lisp_Object alloc_lrecord (const struct lrecord_implementation *imp);
Lisp_Object noseeum_alloc_lrecord (const struct lrecord_implementation *imp);
-Lisp_Object alloc_lrecord_array (int elemcount,
+MODULE_API Lisp_Object alloc_lrecord_array (int elemcount,
const struct lrecord_implementation *imp);
-Lisp_Object alloc_sized_lrecord_array (Bytecount size, int elemcount,
- const struct lrecord_implementation *imp);
-
-#define alloc_lrecord_type(type, imp) \
- ((type *) XPNTR (alloc_sized_lrecord (sizeof (type), imp)))
-
-#define noseeum_alloc_lrecord_type(type, imp) \
- ((type *) XPNTR (noseeum_alloc_sized_lrecord (sizeof (type), imp)))
+MODULE_API Lisp_Object alloc_sized_lrecord_array (Bytecount size,
+ int elemcount,
+ const struct lrecord_implementation *imp);
void free_lrecord (Lisp_Object rec);
diff -r d877c14318b3 -r d1247f3cc363 src/lstream.h
--- a/src/lstream.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/lstream.h Mon Dec 28 01:15:52 2009 -0600
@@ -230,7 +230,7 @@
struct lstream
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
const Lstream_implementation *imp; /* methods for this stream */
Lstream_buffering buffering; /* type of buffering in use */
Bytecount buffering_size; /* number of bytes buffered */
diff -r d877c14318b3 -r d1247f3cc363 src/mule-charset.c
--- a/src/mule-charset.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/mule-charset.c Mon Dec 28 01:15:52 2009 -0600
@@ -1001,7 +1001,7 @@
{
struct Lisp_Charset *c = XCHARSET (charset);
xzero (*stats);
- stats->other += LISPOBJ_STORAGE_SIZE (c, sizeof (*c), ovstats);
+ stats->other += LISP_OBJECT_STORAGE_SIZE (c, sizeof (*c), ovstats);
stats->from_unicode += compute_from_unicode_table_size (charset, ovstats);
stats->to_unicode += compute_to_unicode_table_size (charset, ovstats);
}
diff -r d877c14318b3 -r d1247f3cc363 src/number.h
--- a/src/number.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/number.h Mon Dec 28 01:15:52 2009 -0600
@@ -71,7 +71,7 @@
struct Lisp_Bignum
{
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
bignum data;
};
typedef struct Lisp_Bignum Lisp_Bignum;
@@ -160,7 +160,7 @@
struct Lisp_Ratio
{
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
ratio data;
};
typedef struct Lisp_Ratio Lisp_Ratio;
@@ -234,7 +234,7 @@
#ifdef HAVE_BIGFLOAT
struct Lisp_Bigfloat
{
- struct lrecord_header lheader;
+ FROB_BLOCK_LISP_OBJECT_HEADER lheader;
bigfloat bf;
};
typedef struct Lisp_Bigfloat Lisp_Bigfloat;
diff -r d877c14318b3 -r d1247f3cc363 src/objects-impl.h
--- a/src/objects-impl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/objects-impl.h Mon Dec 28 01:15:52 2009 -0600
@@ -99,7 +99,7 @@
struct Lisp_Color_Instance
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object name;
Lisp_Object device;
@@ -119,7 +119,7 @@
struct Lisp_Font_Instance
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object name; /* the instantiator used to create the font instance */
Lisp_Object truename; /* used by the device-specific methods; we need to
call them to get the truename (#### in reality,
diff -r d877c14318b3 -r d1247f3cc363 src/objects-tty-impl.h
--- a/src/objects-tty-impl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/objects-tty-impl.h Mon Dec 28 01:15:52 2009 -0600
@@ -30,7 +30,7 @@
struct tty_color_instance_data
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
Lisp_Object symbol; /* so we don't have to constantly call Fintern() */
};
@@ -56,7 +56,7 @@
struct tty_font_instance_data
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
Lisp_Object charset;
};
diff -r d877c14318b3 -r d1247f3cc363 src/objects-tty.c
--- a/src/objects-tty.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/objects-tty.c Mon Dec 28 01:15:52 2009 -0600
@@ -197,8 +197,8 @@
/* Don't allocate the data until we're sure that we will succeed. */
#ifdef NEW_GC
- c->data = alloc_lrecord_type (struct tty_color_instance_data,
- &lrecord_tty_color_instance_data);
+ c->data =
+ XTTY_COLOR_INSTANCE_DATA (ALLOC_LISP_OBJECT (tty_color_instance_data));
#else /* not NEW_GC */
c->data = xnew (struct tty_color_instance_data);
#endif /* not NEW_GC */
@@ -282,8 +282,8 @@
/* Don't allocate the data until we're sure that we will succeed. */
#ifdef NEW_GC
- f->data = alloc_lrecord_type (struct tty_font_instance_data,
- &lrecord_tty_font_instance_data);
+ f->data =
+ XTTY_FONT_INSTANCE_DATA (ALLOC_LISP_OBJECT (tty_font_instance_data));
#else /* not NEW_GC */
f->data = xnew (struct tty_font_instance_data);
#endif /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/opaque.h
--- a/src/opaque.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/opaque.h Mon Dec 28 01:15:52 2009 -0600
@@ -28,7 +28,7 @@
typedef struct Lisp_Opaque
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Bytecount size;
max_align_t data[1];
} Lisp_Opaque;
@@ -54,7 +54,7 @@
typedef struct Lisp_Opaque_Ptr
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
void *ptr;
} Lisp_Opaque_Ptr;
diff -r d877c14318b3 -r d1247f3cc363 src/print.c
--- a/src/print.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/print.c Mon Dec 28 01:15:52 2009 -0600
@@ -1489,7 +1489,7 @@
external_object_printer (Lisp_Object obj, Lisp_Object printcharfun,
int UNUSED (escapeflag))
{
- struct LCRECORD_HEADER *header = (struct LCRECORD_HEADER *) XPNTR (obj);
+ LISP_OBJECT_HEADER *header = (LISP_OBJECT_HEADER *) XPNTR (obj);
if (print_readably)
printing_unreadable_object
diff -r d877c14318b3 -r d1247f3cc363 src/procimpl.h
--- a/src/procimpl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/procimpl.h Mon Dec 28 01:15:52 2009 -0600
@@ -94,7 +94,7 @@
struct Lisp_Process
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
/* Exit code if process has terminated,
signal which stopped/interrupted process
diff -r d877c14318b3 -r d1247f3cc363 src/rangetab.h
--- a/src/rangetab.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/rangetab.h Mon Dec 28 01:15:52 2009 -0600
@@ -49,7 +49,7 @@
struct Lisp_Range_Table
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
range_table_entry_dynarr *entries;
enum range_table_type type;
};
diff -r d877c14318b3 -r d1247f3cc363 src/scrollbar.c
--- a/src/scrollbar.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/scrollbar.c Mon Dec 28 01:15:52 2009 -0600
@@ -270,7 +270,7 @@
while (inst)
{
- total += LISPOBJ_STORAGE_SIZE (inst, sizeof (*inst), ovstats);
+ total += LISP_OBJECT_STORAGE_SIZE (inst, sizeof (*inst), ovstats);
inst = inst->next;
}
diff -r d877c14318b3 -r d1247f3cc363 src/scrollbar.h
--- a/src/scrollbar.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/scrollbar.h Mon Dec 28 01:15:52 2009 -0600
@@ -27,7 +27,7 @@
struct scrollbar_instance
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
/* Used by the frame caches. */
struct scrollbar_instance *next;
diff -r d877c14318b3 -r d1247f3cc363 src/specifier.c
--- a/src/specifier.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/specifier.c Mon Dec 28 01:15:52 2009 -0600
@@ -3427,8 +3427,7 @@
if (!sp->caching)
#ifdef NEW_GC
- sp->caching = alloc_lrecord_type (struct specifier_caching,
- &lrecord_specifier_caching);
+ sp->caching = XSPECIFIER_CACHING (ALLOC_LISP_OBJECT (specifier_caching));
#else /* not NEW_GC */
sp->caching = xnew_and_zero (struct specifier_caching);
#endif /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/specifier.h
--- a/src/specifier.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/specifier.h Mon Dec 28 01:15:52 2009 -0600
@@ -220,7 +220,7 @@
struct Lisp_Specifier
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
struct specifier_methods *methods;
/* we keep a chained list of all current specifiers, for GC cleanup
@@ -428,7 +428,7 @@
struct specifier_caching
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
int offset_into_struct_window;
void (*value_changed_in_window) (Lisp_Object specifier, struct window *w,
diff -r d877c14318b3 -r d1247f3cc363 src/symeval.h
--- a/src/symeval.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/symeval.h Mon Dec 28 01:15:52 2009 -0600
@@ -77,7 +77,7 @@
struct symbol_value_magic
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
void *value;
enum symbol_value_type type;
};
@@ -401,8 +401,7 @@
do \
{ \
struct symbol_value_forward *I_hate_C = \
- alloc_lrecord_type (struct symbol_value_forward, \
- &lrecord_symbol_value_forward); \
+ XSYMBOL_VALUE_FORWARD (ALLOC_LISP_OBJECT (symbol_value_forward)); \
/* mcpro ((Lisp_Object) I_hate_C);*/ \
\
MARK_LRECORD_AS_LISP_READONLY (I_hate_C); \
@@ -489,7 +488,7 @@
void flush_all_buffer_local_cache (void);
struct multiple_value {
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Elemcount count;
Elemcount allocated_count;
Elemcount first_desired;
diff -r d877c14318b3 -r d1247f3cc363 src/syntax.c
--- a/src/syntax.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/syntax.c Mon Dec 28 01:15:52 2009 -0600
@@ -525,8 +525,7 @@
{
struct syntax_cache *cache;
#ifdef NEW_GC
- buf->syntax_cache = alloc_lrecord_type (struct syntax_cache,
- &lrecord_syntax_cache);
+ buf->syntax_cache = XSYNTAX_CACHE (ALLOC_LISP_OBJECT (syntax_cache));
#else /* not NEW_GC */
buf->syntax_cache = xnew_and_zero (struct syntax_cache);
#endif /* not NEW_GC */
diff -r d877c14318b3 -r d1247f3cc363 src/syntax.h
--- a/src/syntax.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/syntax.h Mon Dec 28 01:15:52 2009 -0600
@@ -296,7 +296,7 @@
struct syntax_cache
{
#ifdef NEW_GC
- struct lrecord_header header;
+ LISP_OBJECT_HEADER header;
#endif /* NEW_GC */
int use_code; /* Whether to use syntax_code or
syntax_table. This is set
diff -r d877c14318b3 -r d1247f3cc363 src/toolbar.h
--- a/src/toolbar.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/toolbar.h Mon Dec 28 01:15:52 2009 -0600
@@ -38,7 +38,7 @@
struct toolbar_button
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object next;
Lisp_Object frame;
diff -r d877c14318b3 -r d1247f3cc363 src/tooltalk.c
--- a/src/tooltalk.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/tooltalk.c Mon Dec 28 01:15:52 2009 -0600
@@ -147,7 +147,7 @@
struct Lisp_Tooltalk_Message
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object plist_sym, callback;
Tt_message m;
};
@@ -223,7 +223,7 @@
struct Lisp_Tooltalk_Pattern
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
Lisp_Object plist_sym, callback;
Tt_pattern p;
};
diff -r d877c14318b3 -r d1247f3cc363 src/ui-gtk.h
--- a/src/ui-gtk.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/ui-gtk.h Mon Dec 28 01:15:52 2009 -0600
@@ -37,7 +37,7 @@
#define MAX_GTK_ARGS 100
typedef struct {
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
GtkType return_type;
GtkType args[MAX_GTK_ARGS];
gint n_args;
@@ -55,7 +55,7 @@
/* Encapsulate a GtkObject in Lisp */
typedef struct {
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
gboolean alive_p;
GtkObject *object;
Lisp_Object plist;
@@ -72,7 +72,7 @@
/* Encapsulate a GTK_TYPE_BOXED in lisp */
typedef struct {
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
GtkType object_type;
void *object;
} emacs_gtk_boxed_data;
diff -r d877c14318b3 -r d1247f3cc363 src/window-impl.h
--- a/src/window-impl.h Sat Dec 26 21:22:48 2009 -0600
+++ b/src/window-impl.h Mon Dec 28 01:15:52 2009 -0600
@@ -84,7 +84,7 @@
struct window
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
/* The upper left corner coordinates of this window,
as integers (pixels) relative to upper left corner of frame = 0, 0 */
@@ -168,7 +168,7 @@
struct window_mirror
{
- struct LCRECORD_HEADER header;
+ LISP_OBJECT_HEADER header;
/* Frame this mirror is on. */
struct frame *frame;
diff -r d877c14318b3 -r d1247f3cc363 src/window.c
--- a/src/window.c Sat Dec 26 21:22:48 2009 -0600
+++ b/src/window.c Mon Dec 28 01:15:52 2009 -0600
@@ -3857,7 +3857,7 @@
Lisp_Object obj = ALLOC_LISP_OBJECT (window);
struct window *p = XWINDOW (obj);
- COPY_LCRECORD (p, o);
+ COPY_LISP_OBJECT (p, o);
/* Don't copy the pointers to the line start cache or the face
instances. */
@@ -5165,7 +5165,7 @@
{
if (!mir)
return;
- stats->other += LISPOBJ_STORAGE_SIZE (mir, sizeof (*mir), ovstats);
+ stats->other += LISP_OBJECT_STORAGE_SIZE (mir, sizeof (*mir), ovstats);
#ifdef HAVE_SCROLLBARS
{
struct device *d = XDEVICE (FRAME_DEVICE (mir->frame));
@@ -5189,7 +5189,7 @@
struct overhead_stats *ovstats)
{
xzero (*stats);
- stats->other += LISPOBJ_STORAGE_SIZE (w, sizeof (*w), ovstats);
+ stats->other += LISP_OBJECT_STORAGE_SIZE (w, sizeof (*w), ovstats);
stats->face += compute_face_cachel_usage (w->face_cachels, ovstats);
stats->glyph += compute_glyph_cachel_usage (w->glyph_cachels, ovstats);
stats->line_start +=
diff -r d877c14318b3 -r d1247f3cc363 src/xemacs.def.in.in
--- a/src/xemacs.def.in.in Sat Dec 26 21:22:48 2009 -0600
+++ b/src/xemacs.def.in.in Mon Dec 28 01:15:52 2009 -0600
@@ -29,7 +29,8 @@
/* Exported functions */
acons
#ifdef NEW_GC
-alloc_lrecord /* alloc_lrecord_type */
+alloc_lrecord /* ALLOC_LISP_OBJECT */
+alloc_sized_lrecord /* ALLOC_SIZED_LISP_OBJECT */
lrecord_subr /* DEFSUBR */
lrecord_symbol_value_forward /* DEFVAR_SYMVAL_FWD */
#ifdef DEBUG_XEMACS
@@ -37,7 +38,8 @@
#endif
mc_alloc /* DEFSUBR */
#else /* not NEW_GC */
-alloc_automanaged_lcrecord /* old_alloc_lcrecord_type */
+alloc_automanaged_lcrecord /* ALLOC_LISP_OBJECT */
+old_alloc_sized_lcrecord /* ALLOC_SIZED_LISP_OBJECT */
#endif /* not NEW_GC */
apply1
#ifdef USE_ASSERTIONS
@@ -117,6 +119,7 @@
error_check_string_direct_data
error_check_string_indirect_data
#endif
+error_check_symbol_value_forward
#endif
free_opaque_ptr
get_coding_system_for_text_file
More information about the XEmacs-Patches
mailing list