aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorDan Nicolaescu2005-09-30 22:38:16 +0000
committerDan Nicolaescu2005-09-30 22:38:16 +0000
commitfa8459a34e076cacde3b7c259af9b5dd84b60802 (patch)
treeb3d68a9fe6cdfe631bcecb42b30b087aa566e942 /src/alloc.c
parentb17f937955a92bd8416821ec847d859bc9c3de85 (diff)
downloademacs-fa8459a34e076cacde3b7c259af9b5dd84b60802.tar.gz
emacs-fa8459a34e076cacde3b7c259af9b5dd84b60802.zip
* image.c (slurp_file, xbm_read_bitmap_data): Cast to the correct
type. * xterm.c (handle_one_xevent, handle_one_xevent): Likewise. * unexelf.c (fatal): Fix prototype. * term.c (fatal): Implement using varargs. * regex.c (re_char): Move typedef ... * regex.h (re_char): ... here. (re_iswctype, re_wctype, re_set_whitespace_regexp): New prototypes. * emacs.c (malloc_set_state): Fix return type. (endif): Fix type. * lisp.h (fatal): Add argument types. * dispextern.h (fatal): Delete prototype. * systime.h: (make_time): Prototype moved from ... * editfns.c (make_time): ... here. * editfns.c: Move systime.h include after lisp.h. * dired.c: * xsmfns.c: * process.c: Likewise. * alloc.c (old_malloc_hook, old_realloc_hook, old_realloc_hook): Add parameter types. (__malloc_hook, __realloc_hook, __free_hook): Fix prototypes. (emacs_blocked_free): Change definition to match __free_hook. (emacs_blocked_malloc): Change definition to match __malloc_hook. (emacs_blocked_realloc): Change definition to match __realloc_hook.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 3c9b2199e52..ccf4afff9f8 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1161,20 +1161,21 @@ refill_memory_reserve ()
1161#ifndef SYNC_INPUT 1161#ifndef SYNC_INPUT
1162 1162
1163#ifndef DOUG_LEA_MALLOC 1163#ifndef DOUG_LEA_MALLOC
1164extern void * (*__malloc_hook) P_ ((size_t)); 1164extern void * (*__malloc_hook) P_ ((size_t, const void *));
1165extern void * (*__realloc_hook) P_ ((void *, size_t)); 1165extern void * (*__realloc_hook) P_ ((void *, size_t, const void *));
1166extern void (*__free_hook) P_ ((void *)); 1166extern void (*__free_hook) P_ ((void *, const void *));
1167/* Else declared in malloc.h, perhaps with an extra arg. */ 1167/* Else declared in malloc.h, perhaps with an extra arg. */
1168#endif /* DOUG_LEA_MALLOC */ 1168#endif /* DOUG_LEA_MALLOC */
1169static void * (*old_malloc_hook) (); 1169static void * (*old_malloc_hook) P_ ((size_t, const void *));
1170static void * (*old_realloc_hook) (); 1170static void * (*old_realloc_hook) P_ ((void *, size_t, const void*));
1171static void (*old_free_hook) (); 1171static void (*old_free_hook) P_ ((void*, const void*));
1172 1172
1173/* This function is used as the hook for free to call. */ 1173/* This function is used as the hook for free to call. */
1174 1174
1175static void 1175static void
1176emacs_blocked_free (ptr) 1176emacs_blocked_free (ptr, ptr2)
1177 void *ptr; 1177 void *ptr;
1178 const void *ptr2;
1178{ 1179{
1179 BLOCK_INPUT_ALLOC; 1180 BLOCK_INPUT_ALLOC;
1180 1181
@@ -1221,8 +1222,9 @@ emacs_blocked_free (ptr)
1221/* This function is the malloc hook that Emacs uses. */ 1222/* This function is the malloc hook that Emacs uses. */
1222 1223
1223static void * 1224static void *
1224emacs_blocked_malloc (size) 1225emacs_blocked_malloc (size, ptr)
1225 size_t size; 1226 size_t size;
1227 const void *ptr;
1226{ 1228{
1227 void *value; 1229 void *value;
1228 1230
@@ -1268,9 +1270,10 @@ emacs_blocked_malloc (size)
1268/* This function is the realloc hook that Emacs uses. */ 1270/* This function is the realloc hook that Emacs uses. */
1269 1271
1270static void * 1272static void *
1271emacs_blocked_realloc (ptr, size) 1273emacs_blocked_realloc (ptr, size, ptr2)
1272 void *ptr; 1274 void *ptr;
1273 size_t size; 1275 size_t size;
1276 const void *ptr2;
1274{ 1277{
1275 void *value; 1278 void *value;
1276 1279