aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorAndreas Schwab2010-07-11 20:34:43 +0200
committerAndreas Schwab2010-07-11 20:34:43 +0200
commit89887d672aded197a2be95f3d8a6d5bdcb19eb58 (patch)
treefefa168f1ddbc3c0f04f3e891cc20007a65e11a4 /src/buffer.h
parentae96d47a63b32aa752bc65ce08f8b7b7254db3e6 (diff)
downloademacs-89887d672aded197a2be95f3d8a6d5bdcb19eb58.tar.gz
emacs-89887d672aded197a2be95f3d8a6d5bdcb19eb58.zip
Use offsetof instead of own definition
* lisp.h: Include <stddef.h>. (OFFSETOF): Don't define. (VECSIZE): Use offsetof instead of OFFSETOF. (PSEUDOVECSIZE): Likewise. * process.c (conv_sockaddr_to_lisp): Likewise. * alloc.c: Don't include <stddef.h>. * buffer.h (PER_BUFFER_VAR_OFFSET): Use offsetof.
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 8e4e5d569ae..339e7d9bb6d 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -954,7 +954,7 @@ extern int last_per_buffer_idx;
954 from the start of a buffer structure. */ 954 from the start of a buffer structure. */
955 955
956#define PER_BUFFER_VAR_OFFSET(VAR) \ 956#define PER_BUFFER_VAR_OFFSET(VAR) \
957 ((char *) &((struct buffer *)0)->VAR - (char *) ((struct buffer *)0)) 957 offsetof (struct buffer, VAR)
958 958
959/* Return the index of buffer-local variable VAR. Each per-buffer 959/* Return the index of buffer-local variable VAR. Each per-buffer
960 variable has an index > 0 associated with it, except when it always 960 variable has an index > 0 associated with it, except when it always