Ignore:
Timestamp:
Feb 7, 2007, 11:55:11 PM (12 years ago)
Author:
bruno
Message:

merge -r1082:1105 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/src/include/mr_mem.h

    r1074 r1106  
    1313#endif
    1414#include <stdarg.h>
     15#include <stdio.h>
    1516
    1617/* functions (public methods) */
    1718
    18 extern inline void mr_free(char *allocated);
    19 extern inline void mr_allocstr(char *alloc, const char *orig);
    20 extern inline void mr_asprintf(char **alloc, const char *fmt, ...);
    21 extern inline void mr_getline(char **lineptr, size_t *n, FILE *stream);
    22 extern inline void *mr_malloc(size_t size);
     19#define mr_free(x) mr_free_int((void **)&x,__LINE__,__FILE__)
     20#define mr_allocstr(x,y) mr_allocstr_int(x, y,__LINE__,__FILE__)
     21#define mr_asprintf(x,y,args...) mr_asprintf_int(x,__LINE__,__FILE__, y, ## args)
     22#define mr_getline(x,y,z) mr_getline_int(x, y,z,__LINE__,__FILE__)
     23#define mr_malloc(x) mr_malloc_int((size_t)x,__LINE__,__FILE__)
     24
     25/* Internal function bringing debuging info
     26 * called indirectly through macros */
     27extern inline void mr_free_int(void **allocated, int line, char *file);
     28extern inline void mr_allocstr_int(char *alloc, const char *orig, int line, char *file);
     29extern inline void mr_asprintf_int(char **alloc, int line, char *file, const char *fmt, ...);
     30extern inline void mr_getline_int(char **lineptr, size_t *n, FILE *stream, int line, char *file);
     31extern inline void *mr_malloc_int(size_t size, int line, char *file);
    2332
    2433#endif                          /* MR_MEM_H */
Note: See TracChangeset for help on using the changeset viewer.