diff options
| author | Paul Eggert | 2011-04-17 21:41:29 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-17 21:41:29 -0700 |
| commit | 36372bf93fc75b5f85d04007268e98840d1699c5 (patch) | |
| tree | bd15d9623db1c58cbac99a5b3b40590fee8703c9 /src/ChangeLog | |
| parent | c7bda33cad5112de8c093dce0eaf62c84fb32063 (diff) | |
| download | emacs-36372bf93fc75b5f85d04007268e98840d1699c5.tar.gz emacs-36372bf93fc75b5f85d04007268e98840d1699c5.zip | |
* alloc.c: Remove unportable assumptions about struct layout.
(SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
(SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
(allocate_vectorlike, make_pure_vector): Use the new macros,
plus offsetof, to remove unportable assumptions about struct layout.
These assumptions hold on all porting targets that I know of, but
they are not guaranteed, they're easy to remove, and removing them
makes further changes easier.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 81053d74480..b7a4a6701e0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,14 @@ | |||
| 1 | 2011-04-18 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-04-18 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * alloc.c: Remove unportable assumptions about struct layout. | ||
| 4 | (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros. | ||
| 5 | (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data): | ||
| 6 | (allocate_vectorlike, make_pure_vector): Use the new macros, | ||
| 7 | plus offsetof, to remove unportable assumptions about struct layout. | ||
| 8 | These assumptions hold on all porting targets that I know of, but | ||
| 9 | they are not guaranteed, they're easy to remove, and removing them | ||
| 10 | makes further changes easier. | ||
| 11 | |||
| 3 | * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks". | 12 | * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks". |
| 4 | This doesn't fix a bug but makes the code clearer. | 13 | This doesn't fix a bug but makes the code clearer. |
| 5 | (string_overrun_cookie): Now const. Use initializers that | 14 | (string_overrun_cookie): Now const. Use initializers that |