Surround nvim/func_attr.h includes with define/undef DEFINE_FUNC_ATTRIBUTES

Required for FUNC_ATTR_UNUSED to work in lib/k*
This commit is contained in:
ZyX
2014-05-18 00:54:48 +04:00
committed by Thiago de Arruda
parent 6498b281fa
commit 8c0ca573e5
2 changed files with 4 additions and 2 deletions

View File

@@ -129,7 +129,9 @@ int main() {
#include <string.h>
#include <limits.h>
#define DEFINE_FUNC_ATTRIBUTES
#include "nvim/func_attr.h"
#undef DEFINE_FUNC_ATTRIBUTES
#include "nvim/memory.h"
/* compiler specific configuration */
@@ -622,5 +624,4 @@ typedef const char *kh_cstr_t;
*/
#define KHASH_MAP_INIT_STR(name, khval_t) \
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str_hash_equal)
#endif /* __AC_KHASH_H */

View File

@@ -29,7 +29,9 @@
#include <stdbool.h>
#include <stdlib.h>
#define DEFINE_FUNC_ATTRIBUTES
#include "nvim/func_attr.h"
#undef DEFINE_FUNC_ATTRIBUTES
#include "nvim/memory.h"
#define KMEMPOOL_INIT(name, kmptype_t, kmpfree_f) \
@@ -124,5 +126,4 @@
#define kl_pushp(name, kl) kl_pushp_##name(kl)
#define kl_shift(name, kl, d) kl_shift_##name(kl, d)
#define kl_empty(kl) ((kl)->size == 0)
#endif