git.droids-corp.org
/
protos
/
libecoli.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add first documentation draft and framework
[protos/libecoli.git]
/
include
/
ecoli_utils.h
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright 2018, Olivier MATZ <zer0@droids-corp.org>
3
*/
4
5
/**
6
* @defgroup utils Utils
7
* @{
8
*
9
* @brief Misc utils
10
*/
11
12
13
#ifndef ECOLI_UTILS_
14
#define ECOLI_UTILS_
15
16
/**
17
* Cast a variable into a type, ensuring its initial type first
18
*/
19
#define EC_CAST(x, old_type, new_type) ({ \
20
old_type __x = (x); \
21
(new_type)__x; \
22
})
23
24
#endif
25
26
/** @} */