Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svnmerge-integrated changed
/branches/1.2 merged: 380
- Property svnmerge-integrated changed
-
trunk/mem.c
r306 r381 9 9 #include <stdlib.h> 10 10 #include <string.h> 11 #define XC_ SHM_IMPL12 #define XC_MEM_IMPL 11 #define XC_MEMBLOCK_IMPL _xc_mem_block_t 12 #define XC_MEM_IMPL _xc_mem_mem_t 13 13 #include "xc_shm.h" 14 14 #include "align.h" … … 31 31 32 32 /* {{{ mem */ 33 struct _xc_ block_t {33 struct _xc_mem_block_t { 34 34 #ifdef ALLOC_DEBUG_BLOCK_CHECK 35 35 unsigned int magic; … … 39 39 }; 40 40 41 struct _xc_mem_ t {41 struct _xc_mem_mem_t { 42 42 const xc_mem_handlers_t *handlers; 43 43 xc_shm_t *shm; -
trunk/mem.h
r148 r381 1 typedef struct _xc_mem_t xc_mem_t; 2 typedef struct _xc_block_t xc_block_t; 1 typedef struct _xc_mem_handlers_t xc_mem_handlers_t; 2 3 #ifndef XC_MEM_IMPL 4 struct _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 14 typedef struct XC_MEM_IMPL xc_mem_t; 15 typedef struct XC_MEMBLOCK_IMPL xc_block_t; 3 16 typedef unsigned int xc_memsize_t; 4 17 … … 38 51 } 39 52 40 typedef struct {53 struct _xc_mem_handlers_t { 41 54 XC_MEM_MALLOC((*malloc)); 42 55 XC_MEM_FREE((*free)); … … 54 67 XC_MEM_INIT((*init)); 55 68 XC_MEM_DESTROY((*destroy)); 56 } xc_mem_handlers_t;57 58 #ifndef XC_MEM_IMPL59 struct _xc_mem_t {60 const xc_mem_handlers_t *handlers;61 xc_shm_t *shm;62 69 }; 63 #endif64 70 65 71 int xc_mem_scheme_register(const char *name, const xc_mem_handlers_t *handlers); -
trunk/mmap.c
r337 r381 30 30 31 31 #include "php.h" 32 #define XC_SHM_IMPL 32 #define XC_SHM_IMPL _xc_mmap_shm_t 33 33 #include "xc_shm.h" 34 34 #include "utils.h" … … 39 39 40 40 /* {{{ xc_shm_t */ 41 struct _xc_ shm_t {41 struct _xc_mmap_shm_t { 42 42 xc_shm_handlers_t *handlers; 43 43 void *ptr; -
trunk/xc_malloc.c
r305 r381 1 #define XC_SHM_IMPL 2 #define XC_MEM_IMPL 1 #define XC_SHM_IMPL _xc_malloc_shm_t 2 #define XC_MEM_IMPL _xc_malloc_mem_t 3 3 #include <stdlib.h> 4 4 #include <stdio.h> … … 9 9 #include "utils.h" 10 10 11 struct _xc_m em_t {11 struct _xc_malloc_mem_t { 12 12 const xc_mem_handlers_t *handlers; 13 13 xc_shm_t *shm; … … 107 107 /* }}} */ 108 108 109 /* {{{ xc_shm_t */110 struct _xc_ shm_t {109 /* {{{ _xc_malloc_shm_t */ 110 struct _xc_malloc_shm_t { 111 111 xc_shm_handlers_t *handlers; 112 112 xc_shmsize_t size; -
trunk/xc_shm.h
r305 r381 1 1 #ifndef XC_SHM_H 2 2 #define XC_SHM_H 3 typedef struct _xc_shm_t xc_shm_t; 3 typedef struct _xc_shm_handlers_t xc_shm_handlers_t; 4 5 #ifndef XC_SHM_IMPL 6 struct _xc_shm_t { 7 const xc_shm_handlers_t *handlers; 8 }; 9 #define XC_SHM_IMPL _xc_shm_t 10 #endif 11 12 typedef struct XC_SHM_IMPL xc_shm_t; 4 13 typedef size_t xc_shmsize_t; 5 14 … … 34 43 } 35 44 36 typedef struct {45 struct _xc_shm_handlers_t { 37 46 const xc_mem_handlers_t *memhandlers; 38 47 XC_SHM_CAN_READONLY((*can_readonly)); … … 46 55 XC_SHM_MEMINIT((*meminit)); 47 56 XC_SHM_MEMDESTROY((*memdestroy)); 48 } xc_shm_handlers_t;57 }; 49 58 50 51 #ifndef XC_SHM_IMPL52 struct _xc_shm_t {53 const xc_shm_handlers_t *handlers;54 };55 #endif56 59 typedef struct _xc_shm_scheme_t xc_shm_scheme_t; 57 60
Note: See TracChangeset
for help on using the changeset viewer.

