37 lines
633 B
C
37 lines
633 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 "ctx.h"
|
||
|
|
||
|
|
||
|
aislx_ctx_t
|
||
|
aislx_ctx_new(aislx_module_t mod)
|
||
|
{
|
||
|
aislx_ctx_t ctx;
|
||
|
|
||
|
if ((ctx = calloc(1, mod->ctx_size)) != NULL) {
|
||
|
ctx->mod = mod;
|
||
|
}
|
||
|
|
||
|
return ctx;
|
||
|
}
|
||
|
|
||
|
|
||
|
void
|
||
|
aislx_ctx_free(aislx_ctx_t ctx)
|
||
|
{
|
||
|
free(ctx);
|
||
|
}
|