aisl-sdk/mods/context.c

38 lines
647 B
C

/******************************************************************************
*
* Copyright (c) 2017-2019 by Löwenware Ltd
* Please, refer LICENSE file for legal information
*
******************************************************************************/
/**
* @file ctx.c
* @author Ilja Kartašov <ik@lowenware.com>
* @brief
*
* @see https://lowenware.com/
*/
#include <stdlib.h>
#include "context.h"
AxContext
ax_context_new(AxModule mod)
{
AxContext ctx;
if ((ctx = calloc(1, mod->ctx_size)) != NULL) {
ctx->mod = mod;
}
return ctx;
}
void
ax_context_free(AxContext ctx)
{
free(ctx);
}