aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorDmitry Antipov <[email protected]>2012-07-31 16:36:19 +0400
committerDmitry Antipov <[email protected]>2012-07-31 16:36:19 +0400
commite34f7f79833a23586d32fe522b547a0d9a696c13 (patch)
tree4a2d3927202cb91b474bc9648ca9dee2bffaa54a /src/lisp.h
parentc09bfb2f140b2885af17185634451e2abfd6e91c (diff)
Generalize INTERNAL_FIELD between buffers, keyboards and frames.
* src/lisp.h (INTERNAL_FIELD): New macro. * src/buffer.h (BUFFER_INTERNAL_FIELD): Removed. (BVAR): Change to use INTERNAL_FIELD. * src/keyboard.h (KBOARD_INTERNAL_FIELD): Likewise. (KVAR): Change to use INTERNAL_FIELD. * src/frame.h (FVAR): New macro. (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields. * src/alloc.c, src/buffer.c, src/data.c, src/dispnew.c, src/dosfns.c * src/eval.c, src/frame.c, src/fringe.c, src/gtkutil.c, src/minibuf.c * src/nsfns.m, src/nsterm.m, src/print.c, src/term.c, src/w32fns.c * src/w32menu.c, src/w32term.c, src/window.c, src/window.h, src/xdisp.c * src/xfaces.c, src/xfns.c, src/xmenu.c, src/xterm.c: Users changed. * admin/coccinelle/frame.cocci: Semantic patch to replace direct access to Lisp_Object members of struct frame to FVAR.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 2d9359abac..147a478193 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -622,8 +622,13 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper)
#define CHECK_TYPE(ok, Qxxxp, x) \
do { if (!(ok)) wrong_type_argument (Qxxxp, (x)); } while (0)
+/* Lisp fields are usually hidden from most code and accessed
+ via special macros. Only select pieces of code, like the GC,
+ are allowed to use INTERNAL_FIELD directly. Objects which
+ aren't using this convention should be fixed. */
+
+#define INTERNAL_FIELD(field) field ## _
-
/* See the macros in intervals.h. */
typedef struct interval *INTERVAL;