[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Quesition about Lisp_Vector
From: |
Qiang Guo |
Subject: |
Quesition about Lisp_Vector |
Date: |
Thu, 10 Nov 2011 23:29:16 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (darwin) |
Hi, I'm new to devel aspect of Emacs. And I'm having a problem reading
Emacs source code: in the definition of Lisp_Vector
struct Lisp_Vector
{
EMACS_UINT size;
struct Lisp_Vector *next;
Lisp_Object contents[1];
};
why contents's size is fixed ? And later when actually allocating space
nbytes = sizeof *p + (len - 1) * sizeof p->contents[0];
I don't understand how this nbytes is calculated. why only (len-1)
contents[0] ? and how can the size of an array be changed ?
Thanks
Qiang
- Quesition about Lisp_Vector,
Qiang Guo <=