diff options
| author | Paul Eggert | 2011-04-08 14:53:30 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-08 14:53:30 -0700 |
| commit | 7ec98caf7757bbf462d91a5cebd440cf12cc5816 (patch) | |
| tree | a06f12700c55c0a932163ff80c6c3d01883a9c36 /lib/allocator.h | |
| parent | 70476b54414db1be5261c71073fc991eab5cd34a (diff) | |
| download | emacs-7ec98caf7757bbf462d91a5cebd440cf12cc5816.tar.gz emacs-7ec98caf7757bbf462d91a5cebd440cf12cc5816.zip | |
Update from gnulib.
Diffstat (limited to 'lib/allocator.h')
| -rw-r--r-- | lib/allocator.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/allocator.h b/lib/allocator.h index 4ac863b224c..a89ba32b09b 100644 --- a/lib/allocator.h +++ b/lib/allocator.h | |||
| @@ -30,16 +30,16 @@ struct allocator | |||
| 30 | attributes do not work with pointers to functions. See | 30 | attributes do not work with pointers to functions. See |
| 31 | <http://lists.gnu.org/archive/html/bug-gnulib/2011-04/msg00007.html>. */ | 31 | <http://lists.gnu.org/archive/html/bug-gnulib/2011-04/msg00007.html>. */ |
| 32 | 32 | ||
| 33 | /* Call MALLOC to allocate memory, like 'malloc'. On failure MALLOC | 33 | /* Call ALLOCATE to allocate memory, like 'malloc'. On failure ALLOCATE |
| 34 | should return NULL, though not necessarily set errno. When given | 34 | should return NULL, though not necessarily set errno. When given |
| 35 | a zero size it may return NULL even if successful. */ | 35 | a zero size it may return NULL even if successful. */ |
| 36 | void *(*malloc) (size_t); | 36 | void *(*allocate) (size_t); |
| 37 | 37 | ||
| 38 | /* If nonnull, call REALLOC to reallocate memory, like 'realloc'. | 38 | /* If nonnull, call REALLOCATE to reallocate memory, like 'realloc'. |
| 39 | On failure REALLOC should return NULL, though not necessarily set | 39 | On failure REALLOCATE should return NULL, though not necessarily set |
| 40 | errno. When given a zero size it may return NULL even if | 40 | errno. When given a zero size it may return NULL even if |
| 41 | successful. */ | 41 | successful. */ |
| 42 | void *(*realloc) (void *, size_t); | 42 | void *(*reallocate) (void *, size_t); |
| 43 | 43 | ||
| 44 | /* Call FREE to free memory, like 'free'. */ | 44 | /* Call FREE to free memory, like 'free'. */ |
| 45 | void (*free) (void *); | 45 | void (*free) (void *); |
| @@ -50,4 +50,7 @@ struct allocator | |||
| 50 | void (*die) (void); | 50 | void (*die) (void); |
| 51 | }; | 51 | }; |
| 52 | 52 | ||
| 53 | /* An allocator using the stdlib functions and a null DIE function. */ | ||
| 54 | extern struct allocator const stdlib_allocator; | ||
| 55 | |||
| 53 | #endif | 56 | #endif |