diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2012-01-20 13:41:10 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2012-01-20 13:41:10 +0000 |
| commit | 2eee382a62a909d5a3f2f5eda94f30fe68fd5335 (patch) | |
| tree | b0b0d513535895f244214aebf6358e172b8dce6d /src/runtime/c/gu/choice.h | |
| parent | b9728357126f8b9a6311cca17d9f0dcc2a7bfb9b (diff) | |
initial import of the C runtime
Diffstat (limited to 'src/runtime/c/gu/choice.h')
| -rw-r--r-- | src/runtime/c/gu/choice.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/runtime/c/gu/choice.h b/src/runtime/c/gu/choice.h new file mode 100644 index 000000000..aea76dde8 --- /dev/null +++ b/src/runtime/c/gu/choice.h @@ -0,0 +1,37 @@ +#ifndef GU_CHOICE_H_ +#define GU_CHOICE_H_ + +#include <gu/mem.h> + +typedef struct GuChoice GuChoice; + +typedef struct GuChoiceMark GuChoiceMark; + +GuChoice* +gu_new_choice(GuPool* pool); + +int +gu_choice_next(GuChoice* ch, int n_choices); + +GuChoiceMark +gu_choice_mark(GuChoice* ch); + +void +gu_choice_reset(GuChoice* ch, GuChoiceMark mark); + +bool +gu_choice_advance(GuChoice* ch); + + +// private + +struct GuChoiceMark { + size_t path_idx; +}; + + + + + + +#endif // GU_CHOICE_H_ |
