mirror of
https://github.com/Ed94/metadesk.git
synced 2026-07-26 01:13:46 +00:00
[plugin macros] clean up all usage of context; also document a few more things
This commit is contained in:
+2
-11
@@ -3,23 +3,14 @@
|
||||
////////////////////////////////
|
||||
// TODO(allen): Write commentary for all of this.
|
||||
|
||||
#define MD_IMPL_Alloc(ctx,size) MD_MALLOC_Alloc(ctx,size)
|
||||
#define MD_IMPL_Alloc(size) MD_MALLOC_Alloc(size)
|
||||
|
||||
static void*
|
||||
MD_MALLOC_Alloc(void *ctx, MD_u64 size)
|
||||
MD_MALLOC_Alloc(MD_u64 size)
|
||||
{
|
||||
MD_Assert(ctx == MD_MALLOC_Alloc);
|
||||
return(malloc(size));
|
||||
}
|
||||
|
||||
#define MD_IMPL_GetCtx() MD_MALLOC_GetCtx()
|
||||
|
||||
static void*
|
||||
MD_MALLOC_GetCtx(void)
|
||||
{
|
||||
return((void *)MD_MALLOC_Alloc);
|
||||
}
|
||||
|
||||
/*
|
||||
Copyright 2021 Dion Systems LLC
|
||||
|
||||
|
||||
Reference in New Issue
Block a user