projects
/
chise
/
xemacs-chise.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(find_charsets_in_charc_string): New function; delete
[chise/xemacs-chise.git-]
/
src
/
free-hook.c
diff --git
a/src/free-hook.c
b/src/free-hook.c
index
cac4a86
..
5022b57
100644
(file)
--- a/
src/free-hook.c
+++ b/
src/free-hook.c
@@
-85,14
+85,14
@@
void *malloc (size_t);
/* System function prototypes don't belong in C source files */
/* extern void free (void *); */
/* System function prototypes don't belong in C source files */
/* extern void free (void *); */
-struct hash_table *pointer_table;
+static struct hash_table *pointer_table;
extern void (*__free_hook) (void *);
extern void *(*__malloc_hook) (size_t);
static void *check_malloc (size_t);
extern void (*__free_hook) (void *);
extern void *(*__malloc_hook) (size_t);
static void *check_malloc (size_t);
-typedef void (*fun_ptr) ();
+typedef void (*fun_ptr) (void);
/* free_queue is not too useful without backtrace logging */
#define FREE_QUEUE_LIMIT 1
/* free_queue is not too useful without backtrace logging */
#define FREE_QUEUE_LIMIT 1
@@
-110,11
+110,11
@@
typedef struct {
unsigned long length;
} free_queue_entry;
unsigned long length;
} free_queue_entry;
-free_queue_entry free_queue[FREE_QUEUE_LIMIT];
+static free_queue_entry free_queue[FREE_QUEUE_LIMIT];
-int current_free;
+static int current_free;
-int strict_free_check;
+static int strict_free_check;
static void
check_free (void *ptr)
static void
check_free (void *ptr)
@@
-131,7
+131,7
@@
check_free (void *ptr)
#endif
EMACS_INT present = (EMACS_INT) gethash (ptr, pointer_table,
#endif
EMACS_INT present = (EMACS_INT) gethash (ptr, pointer_table,
- (CONST void **) &size);
+ (const void **) &size);
if (!present)
{
if (!present)
{
@@
-257,7
+257,7
@@
check_realloc (void * ptr, size_t size)
void *result = malloc (size);
if (!ptr) return result;
void *result = malloc (size);
if (!ptr) return result;
- present = (EMACS_INT) gethash (ptr, pointer_table, (CONST void **) &old_size);
+ present = (EMACS_INT) gethash (ptr, pointer_table, (const void **) &old_size);
if (!present)
{
/* This can only happen by reallocing a pointer that didn't
if (!present)
{
/* This can only happen by reallocing a pointer that didn't