diff options
author | ZyX <kp-pav@ya.ru> | 2014-06-01 13:42:14 +0400 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-06-02 11:04:18 -0300 |
commit | 4cf17ad632a420517069fbfb84f33607d1b4efa3 (patch) | |
tree | d878501c1c8bd98b1558a177626de1d4ccfda319 /src/nvim/lib | |
parent | f0be78506fe1e0955d6f2c8b937dd2f147a2d03a (diff) | |
download | rneovim-4cf17ad632a420517069fbfb84f33607d1b4efa3.tar.gz rneovim-4cf17ad632a420517069fbfb84f33607d1b4efa3.tar.bz2 rneovim-4cf17ad632a420517069fbfb84f33607d1b4efa3.zip |
Add REAL_FATTR_ macros to func_attr.h, use them in lib/k*
Otherwise FUNC_ATTR_* macros may appear empty
Diffstat (limited to 'src/nvim/lib')
-rw-r--r-- | src/nvim/lib/khash.h | 14 | ||||
-rw-r--r-- | src/nvim/lib/klist.h | 6 |
2 files changed, 8 insertions, 12 deletions
diff --git a/src/nvim/lib/khash.h b/src/nvim/lib/khash.h index 9427f52be0..f706e994d5 100644 --- a/src/nvim/lib/khash.h +++ b/src/nvim/lib/khash.h @@ -131,9 +131,7 @@ int main() { #include "nvim/memory.h" -#define DEFINE_FUNC_ATTRIBUTES #include "nvim/func_attr.h" -#undef DEFINE_FUNC_ATTRIBUTES /* compiler specific configuration */ @@ -209,7 +207,7 @@ static const double __ac_HASH_UPPER = 0.77; return (kh_##name##_t*)kcalloc(1, sizeof(kh_##name##_t)); \ } \ SCOPE void kh_destroy_##name(kh_##name##_t *h) \ - FUNC_ATTR_UNUSED; \ + REAL_FATTR_UNUSED; \ SCOPE void kh_destroy_##name(kh_##name##_t *h) \ { \ if (h) { \ @@ -219,7 +217,7 @@ static const double __ac_HASH_UPPER = 0.77; } \ } \ SCOPE void kh_clear_##name(kh_##name##_t *h) \ - FUNC_ATTR_UNUSED; \ + REAL_FATTR_UNUSED; \ SCOPE void kh_clear_##name(kh_##name##_t *h) \ { \ if (h && h->flags) { \ @@ -228,7 +226,7 @@ static const double __ac_HASH_UPPER = 0.77; } \ } \ SCOPE khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key) \ - FUNC_ATTR_UNUSED; \ + REAL_FATTR_UNUSED; \ SCOPE khint_t kh_get_##name(const kh_##name##_t *h, khkey_t key) \ { \ if (h->n_buckets) { \ @@ -244,7 +242,7 @@ static const double __ac_HASH_UPPER = 0.77; } else return 0; \ } \ SCOPE void kh_resize_##name(kh_##name##_t *h, khint_t new_n_buckets) \ - FUNC_ATTR_UNUSED; \ + REAL_FATTR_UNUSED; \ SCOPE void kh_resize_##name(kh_##name##_t *h, khint_t new_n_buckets) \ { /* This function uses 0.25*n_buckets bytes of working space instead of [sizeof(key_t+val_t)+.25]*n_buckets. */ \ khint32_t *new_flags = 0; \ @@ -305,7 +303,7 @@ static const double __ac_HASH_UPPER = 0.77; } \ } \ SCOPE khint_t kh_put_##name(kh_##name##_t *h, khkey_t key, int *ret) \ - FUNC_ATTR_UNUSED; \ + REAL_FATTR_UNUSED; \ SCOPE khint_t kh_put_##name(kh_##name##_t *h, khkey_t key, int *ret) \ { \ khint_t x; \ @@ -347,7 +345,7 @@ static const double __ac_HASH_UPPER = 0.77; return x; \ } \ SCOPE void kh_del_##name(kh_##name##_t *h, khint_t x) \ - FUNC_ATTR_UNUSED; \ + REAL_FATTR_UNUSED; \ SCOPE void kh_del_##name(kh_##name##_t *h, khint_t x) \ { \ if (x != h->n_buckets && !__ac_iseither(h->flags, x)) { \ diff --git a/src/nvim/lib/klist.h b/src/nvim/lib/klist.h index d910851543..4cc87263a4 100644 --- a/src/nvim/lib/klist.h +++ b/src/nvim/lib/klist.h @@ -29,10 +29,8 @@ #include <stdbool.h> #include <stdlib.h> -#define DEFINE_FUNC_ATTRIBUTES -#include "nvim/func_attr.h" -#undef DEFINE_FUNC_ATTRIBUTES #include "nvim/memory.h" +#include "nvim/func_attr.h" #define KMEMPOOL_INIT(name, kmptype_t, kmpfree_f) \ typedef struct { \ @@ -89,7 +87,7 @@ return kl; \ } \ static inline void kl_destroy_##name(kl_##name##_t *kl) \ - FUNC_ATTR_UNUSED; \ + REAL_FATTR_UNUSED; \ static inline void kl_destroy_##name(kl_##name##_t *kl) { \ kl1_##name *p; \ for (p = kl->head; p != kl->tail; p = p->next) \ |