Project

General

Profile

« Previous | Next » 

Revision 6d1693b9

Added by LĂ©lio Brun 7 months ago

work on spec generation almost done

View differences:

include/arrow.h
1

  
2 1
#ifndef _ARROW
3 2
#define _ARROW
4 3

  
5
struct _arrow_mem {struct _arrow_reg {_Bool _first; } _reg; };
4
struct _arrow_mem {
5
  struct _arrow_reg {_Bool _first; } _reg;
6
};
6 7

  
7 8
extern struct _arrow_mem *_arrow_alloc ();
8 9

  
......
23 24

  
24 25
#define _arrow_clear(self) {}
25 26

  
26
/* #define _arrow_step(x,y,output,self) ((self)->_reg._first?((self)->_reg._first=0,(*output = x)):(*output = y)) */
27

  
28 27
#define _arrow_reset(self) {(self)->_reg._first = 1;}
29 28

  
30
/* Step macro for specialized arrows of the form: (true -> false) */
31

  
32
#define _once_step(output,self) { *output = (self)->_reg._first; if ((self)->_reg._first) { (self)->_reg._first=0; }; }
29
_Bool _arrow_step(struct _arrow_mem *self);
33 30

  
34 31
#endif

Also available in: Unified diff