aisl-sdk/mods/context.c

37 lines
627 B
C
Raw Normal View History

/******************************************************************************
*
* 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 "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);
}