ui/common/document.c

changeset 594
fc854e0ab924
parent 471
063a9f29098c
child 625
1726c5109ccd
equal deleted inserted replaced
593:7061c9cf3b52 594:fc854e0ab924
81 // TODO 81 // TODO
82 return NULL; 82 return NULL;
83 } 83 }
84 84
85 void* ui_document_new(size_t size) { 85 void* ui_document_new(size_t size) {
86 CxMempool *mp = cxMempoolCreate(256, NULL); 86 CxMempool *mp = cxMempoolCreateSimple(256);
87 const CxAllocator *a = mp->allocator; 87 const CxAllocator *a = mp->allocator;
88 UiContext *ctx = uic_context(NULL, mp); 88 UiContext *ctx = uic_context(NULL, mp);
89 89
90 void *document = cxCalloc(a, size, 1); 90 void *document = cxCalloc(a, size, 1);
91 cxMapPut(documents, cx_hash_key(&document, sizeof(void*)), ctx); 91 cxMapPut(documents, cx_hash_key(&document, sizeof(void*)), ctx);

mercurial