From: Gerd Moellmann Date: Thu, 18 Nov 1999 13:31:04 +0000 (+0000) Subject: (struct buffer_text): Add comment about moving X-Git-Tag: emacs-pretest-21.0.90~6064 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0afdfe3895469bcc7f47d5af46633e7c24c08e3c;p=emacs.git (struct buffer_text): Add comment about moving buffer text if REL_ALLOC is defined. --- diff --git a/src/buffer.h b/src/buffer.h index a3e87c8f205..e37cd91c87e 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -388,7 +388,12 @@ extern int _fetch_multibyte_char_len; struct buffer_text { - unsigned char *beg; /* Actual address of buffer contents. */ + /* Actual address of buffer contents. If REL_ALLOC is defined, + this address might change when blocks are relocated which can + e.g. happen when malloc is called. So, don't pass a pointer + into a buffer's text to functions that malloc. */ + unsigned char *beg; + int gpt; /* Char pos of gap in buffer. */ int z; /* Char pos of end of buffer. */ int gpt_byte; /* Byte pos of gap in buffer. */