made context statically allocated
This commit is contained in:
parent
b2a5ede334
commit
d41e801aeb
3 changed files with 10 additions and 14 deletions
|
|
@ -18,22 +18,17 @@
|
|||
|
||||
#include "kubo_context.h"
|
||||
|
||||
struct kubo_context *kubo_context_init() {
|
||||
struct kubo_context *context = malloc(sizeof(struct kubo_context));
|
||||
void kubo_context_init(struct kubo_context *context) {
|
||||
if (!context) {
|
||||
return NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
kubo_wall_arr_init(&context->walls);
|
||||
|
||||
context->wall_select_index = 0;
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
void kubo_context_cleanup(struct kubo_context *context) {
|
||||
kubo_wall_arr_free(&context->walls);
|
||||
free(context);
|
||||
}
|
||||
|
||||
void kubo_context_set_state(struct kubo_context *context,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue