Add include guards
This commit is contained in:
parent
3ba365f113
commit
15eda1ea7b
1 changed files with 5 additions and 0 deletions
5
cmaybe.h
5
cmaybe.h
|
@ -1,3 +1,6 @@
|
|||
#ifndef __CMAYBE_H__
|
||||
#define __CMAYBE_H__
|
||||
|
||||
#define MAYBE_TYPE(name, type) struct maybe_##name {type value; char is_value;}
|
||||
#define MAYBE(name) struct maybe_##name
|
||||
|
||||
|
@ -15,3 +18,5 @@
|
|||
#define IS_VALUE(x) if((x).is_value)
|
||||
#define IS_NOT_VALUE(x) if(!(x).is_value)
|
||||
#define VALUE(x) (x).value
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue