converted some macros to functions - hcl_getxtn(), hcl_getcmgr(), hcl_setcmgr, hcl_getmmgr()
All checks were successful
continuous-integration/drone/push Build is passing

introduced the same macros unsing upper-case naming convention - HCL_XTN(), HCL_MMGR, HCL_CMGR()
enhanced the pascal wrapper to load an included file based on the parent path
This commit is contained in:
2024-02-20 15:40:39 +09:00
parent d1deecb5d7
commit ee152519a8
8 changed files with 98 additions and 45 deletions

View File

@ -80,12 +80,12 @@ hcl_heap_t* hcl_makeheap (hcl_t* hcl, hcl_oow_t size)
{
/* use the existing memory allocator */
HCL_ASSERT (hcl, alloc_size == 0);
heap->xmmgr = *hcl_getmmgr(hcl);
heap->xmmgr = *HCL_MMGR(hcl);
}
else
{
/* create a new memory allocator over the allocated heap */
heap->xma = hcl_xma_open(hcl_getmmgr(hcl), 0, heap->base, heap->size);
heap->xma = hcl_xma_open(HCL_MMGR(hcl), 0, heap->base, heap->size);
if (HCL_UNLIKELY(!heap->xma))
{
hcl->vmprim.free_heap (hcl, heap);