[plugin macros] clean up all usage of context; also document a few more things

This commit is contained in:
Allen Webster
2021-03-30 21:23:05 -07:00
parent cc38ed2c96
commit e1c0656e73
4 changed files with 44 additions and 67 deletions
+2 -11
View File
@@ -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