@@ -24,7 +24,7 @@ void error(char *, ...);
24
24
void debug_msg (char * , ...);
25
25
void int_error (char * , ...);
26
26
extern int errline ;
27
- extern unsigned char * errfile ;
27
+ extern char * errfile ;
28
28
29
29
#ifdef HAVE_CALLOC
30
30
#define x_calloc (x ) calloc((x), 1)
@@ -43,11 +43,11 @@ static inline void *x_calloc(size_t x)
43
43
44
44
#ifdef LEAK_DEBUG
45
45
46
- void * debug_mem_alloc (unsigned char * , int , size_t );
47
- void * debug_mem_calloc (unsigned char * , int , size_t );
48
- void debug_mem_free (unsigned char * , int , void * );
49
- void * debug_mem_realloc (unsigned char * , int , void * , size_t );
50
- void set_mem_comment (void * , unsigned char * , int );
46
+ extern void * debug_mem_alloc (char * , int , size_t );
47
+ extern void * debug_mem_calloc (char * , int , size_t );
48
+ extern void debug_mem_free (char * , int , void * );
49
+ extern void * debug_mem_realloc (char * , int , void * , size_t );
50
+ extern void set_mem_comment (void * , char * , int );
51
51
52
52
#define mem_alloc (x ) debug_mem_alloc(__FILE__, __LINE__, x)
53
53
#define mem_calloc (x ) debug_mem_calloc(__FILE__, __LINE__, x)
@@ -82,7 +82,7 @@ static inline void mem_free(void *p)
82
82
{
83
83
if (p == DUMMY ) return ;
84
84
if (!p ) {
85
- // internal((unsigned char *) "mem_free(NULL)");
85
+ // internal("mem_free(NULL)");
86
86
return ;
87
87
}
88
88
free (p );
@@ -92,7 +92,7 @@ static inline void *mem_realloc(void *p, size_t size)
92
92
{
93
93
if (p == DUMMY ) return mem_alloc (size );
94
94
if (!p ) {
95
- // internal((unsigned char *) "mem_realloc(NULL, %d)", size);
95
+ // internal("mem_realloc(NULL, %d)", size);
96
96
return NULL ;
97
97
}
98
98
if (!size ) {
@@ -106,11 +106,11 @@ static inline void *mem_realloc(void *p, size_t size)
106
106
return p ;
107
107
}
108
108
109
- static inline void * debug_mem_alloc (unsigned char * f , int l , size_t s ) { f = f ; l = l ; return mem_alloc (s ); }
110
- static inline void * debug_mem_calloc (unsigned char * f , int l , size_t s ) { f = f ; l = l ; return mem_calloc (s ); }
111
- static inline void debug_mem_free (unsigned char * f , int l , void * p ) { f = f ; l = l ; mem_free (p ); }
112
- static inline void * debug_mem_realloc (unsigned char * f , int l , void * p , size_t s ) { f = f ; l = l ; return mem_realloc (p , s ); }
113
- static inline void set_mem_comment (void * p , unsigned char * c , int l ) {p = p ; c = c ; l = l ;}
109
+ static inline void * debug_mem_alloc (char * f , int l , size_t s ) { f = f ; l = l ; return mem_alloc (s ); }
110
+ static inline void * debug_mem_calloc (char * f , int l , size_t s ) { f = f ; l = l ; return mem_calloc (s ); }
111
+ static inline void debug_mem_free (char * f , int l , void * p ) { f = f ; l = l ; mem_free (p ); }
112
+ static inline void * debug_mem_realloc (char * f , int l , void * p , size_t s ) { f = f ; l = l ; return mem_realloc (p , s ); }
113
+ static inline void set_mem_comment (void * p , char * c , int l ) {p = p ; c = c ; l = l ;}
114
114
115
115
#endif
116
116
0 commit comments