view src/insert_verification/akashaCS.c @ 9:e864ede359cc

Add iterator
author Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
date Tue, 15 Mar 2016 16:47:41 +0900
parents 46bc6ea5fa81
children 38ba1606e62d
line wrap: on
line source

#include <stdlib.h>
#include "akashaLLRBContext.h"

extern __code initLLRBContext(struct Context*, enum Code);

__code meta(struct Context* context, enum Code next) {
    goto (context->code[next])(context);
}

__code startCode(enum Code next) {
    struct Context* context = (struct Context*)malloc(sizeof(struct Context));

    goto initLLRBContext(context, next);
}

__code exitCode(struct Context* context) {
    free(context->code);
    free(context->data);
    free(context->heapStart);
    goto exit(0);
}