Changeset 381 in svn for trunk/mem.h


Ignore:
Timestamp:
2007-05-10T03:26:12+02:00 (8 years ago)
Author:
Xuefer
Message:

merged [380] from 1.2: make life easier for debugging

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/mem.h

    r148 r381  
    1 typedef struct _xc_mem_t xc_mem_t;
    2 typedef struct _xc_block_t xc_block_t;
     1typedef struct _xc_mem_handlers_t xc_mem_handlers_t;
     2
     3#ifndef XC_MEM_IMPL
     4struct _xc_mem_t {
     5    const xc_mem_handlers_t *handlers;
     6    xc_shm_t                *shm;
     7};
     8#   define XC_MEM_IMPL _xc_mem_t
     9#endif
     10
     11#ifndef XC_MEMBLOCK_IMPL
     12#   define XC_MEMBLOCK_IMPL _xc_block_t
     13#endif
     14typedef struct XC_MEM_IMPL xc_mem_t;
     15typedef struct XC_MEMBLOCK_IMPL xc_block_t;
    316typedef unsigned int xc_memsize_t;
    417
     
    3851}
    3952
    40 typedef struct {
     53struct _xc_mem_handlers_t {
    4154    XC_MEM_MALLOC((*malloc));
    4255    XC_MEM_FREE((*free));
     
    5467    XC_MEM_INIT((*init));
    5568    XC_MEM_DESTROY((*destroy));
    56 } xc_mem_handlers_t;
    57 
    58 #ifndef XC_MEM_IMPL
    59 struct _xc_mem_t {
    60     const xc_mem_handlers_t *handlers;
    61     xc_shm_t                *shm;
    6269};
    63 #endif
    6470
    6571int xc_mem_scheme_register(const char *name, const xc_mem_handlers_t *handlers);
Note: See TracChangeset for help on using the changeset viewer.