diff options
| author | Paul Eggert | 2017-04-04 14:06:25 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-04-04 14:07:54 -0700 |
| commit | 82b9efc869dddcbd5677867b84b20ae155b5b9da (patch) | |
| tree | c570068c6e5801726a2ea05474a3779bf5cd4fd6 /doc/lispref | |
| parent | 12317ff4fb53f889a69a858a629df6beffacd051 (diff) | |
| download | emacs-82b9efc869dddcbd5677867b84b20ae155b5b9da.tar.gz emacs-82b9efc869dddcbd5677867b84b20ae155b5b9da.zip | |
Minor simplifications and doc for records
* doc/lispref/records.texi (Records): Mention size limit.
* etc/NEWS: Mention records.
* src/alloc.c (allocate_pseudovector, allocate_record):
Prefer 'PSEUDOVECTOR_SIZE_MASK' to its definiens.
(allocate_record): Check arg range here, not in callers, as this
simplifies the code. Use allocate_vectorlike instead of
allocate_vector, to avoid duplicate runtime tests.
(Fmake_record, record): Don't mention PSEUDOVECTOR_SIZE_BITS in
the doc string, as it is not visible to the user.
(Fmake_record, record, Fcopy_record):
Prefer make_lisp_ptr to XSETVECTOR.
(record): Broaden memcpy to copy the type, too.
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/records.texi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/lispref/records.texi b/doc/lispref/records.texi index 9a5d900cfc9..a6c560cbcb9 100644 --- a/doc/lispref/records.texi +++ b/doc/lispref/records.texi | |||
| @@ -14,8 +14,10 @@ instances. | |||
| 14 | 14 | ||
| 15 | Internally, a record object is much like a vector; its slots can be | 15 | Internally, a record object is much like a vector; its slots can be |
| 16 | accessed using @code{aref}. However, the first slot is used to hold | 16 | accessed using @code{aref}. However, the first slot is used to hold |
| 17 | its type as returned by @code{type-of}. Like arrays, records use | 17 | its type as returned by @code{type-of}. Also, in the current |
| 18 | zero-origin indexing: the first slot has index 0. | 18 | implementation records can have at most 4096 slots, whereas vectors |
| 19 | can be much larger. Like arrays, records use zero-origin indexing: | ||
| 20 | the first slot has index 0. | ||
| 19 | 21 | ||
| 20 | The printed representation of records is @samp{#s} followed by a | 22 | The printed representation of records is @samp{#s} followed by a |
| 21 | list specifying the contents. The first list element must be the | 23 | list specifying the contents. The first list element must be the |