Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
4b75ffab
Commit
4b75ffab
authored
Feb 10, 2008
by
Stefan Monnier
Browse files
(ASET): Check bounds.
parent
250962b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
src/ChangeLog
src/ChangeLog
+4
-0
src/lisp.h
src/lisp.h
+5
-1
No files found.
src/ChangeLog
View file @
4b75ffab
2008-02-10 Stefan Monnier <monnier@iro.umontreal.ca>
* lisp.h (ASET): Check bounds.
2008-02-10 Glenn Morris <rgm@gnu.org>
* buffer.c (mode-name): Doc fix.
...
...
src/lisp.h
View file @
4b75ffab
...
...
@@ -589,8 +589,12 @@ extern size_t pure_size;
/* Convenience macros for dealing with Lisp arrays. */
#define AREF(ARRAY, IDX) XVECTOR ((ARRAY))->contents[IDX]
#define ASET(ARRAY, IDX, VAL) (AREF ((ARRAY), (IDX)) = (VAL))
#define ASIZE(ARRAY) XVECTOR ((ARRAY))->size
/* The IDX==IDX tries to detect when the macro argument is side-effecting. */
#define ASET(ARRAY, IDX, VAL) \
(eassert ((IDX) == (IDX)), \
eassert ((IDX) >= 0 && (IDX) < ASIZE (ARRAY)), \
ASLOT ((ARRAY), (IDX)) = (VAL))
/* Convenience macros for dealing with Lisp strings. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment