Project

General

Profile

« Previous | Next » 

Revision fa090c4e

Added by Xavier Thirioux over 10 years ago

corrected bug in arrow macros names, added storage attribute for static alloc macros, option -d now creates the destination directory if needed, with current dir as file permissions

git-svn-id: https://cavale.enseeiht.fr/svn/lustrec/lustre_compiler/trunk@181 041b043f-8d7c-46b2-b46e-ef0dd855326e

View differences:

include/arrow.h
4 4

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

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

  
9
#define _arrow_DECLARE(inst)\
10
  struct _arrow_mem inst;
9
#define _arrow_DECLARE(attr, inst)\
10
  attr struct _arrow_mem inst;
11 11
  
12 12
#define _arrow_LINK(inst) do {\
13 13
  ;\
14 14
} while (0)
15 15

  
16
#define _arrow_ALLOC(attr, inst)\
17
  _arrow_DECLARE(attr, inst);\
18
  _arrow_LINK(inst)
19

  
16 20
#define _arrow_step(x,y,output,self) ((self)->_reg._first?((self)->_reg._first=0,(*output = x)):(*output = y))
17 21

  
18 22
#define _arrow_reset(self) {(self)->_reg._first = 1;}

Also available in: Unified diff