aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lib/khash.h
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-06-02 11:24:02 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-06-02 11:24:02 -0300
commitcab8cf970c09ea465d30e11eb356e2e5d37dc544 (patch)
tree5d274c892e4d53f5e976ae8f6f58aba030785e02 /src/nvim/lib/khash.h
parent52a9a5b0b0c53a1481d901f39ed0d1e7e86c3853 (diff)
parent4aecb71b0e819aa84a430dacdab2146229c410a5 (diff)
downloadrneovim-cab8cf970c09ea465d30e11eb356e2e5d37dc544.tar.gz
rneovim-cab8cf970c09ea465d30e11eb356e2e5d37dc544.tar.bz2
rneovim-cab8cf970c09ea465d30e11eb356e2e5d37dc544.zip
Merge pull request #710 'Automatically generate declarations'
Diffstat (limited to 'src/nvim/lib/khash.h')
-rw-r--r--src/nvim/lib/khash.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/lib/khash.h b/src/nvim/lib/khash.h
index 51a666733b..f706e994d5 100644
--- a/src/nvim/lib/khash.h
+++ b/src/nvim/lib/khash.h
@@ -129,9 +129,10 @@ int main() {
#include <string.h>
#include <limits.h>
-#include "nvim/func_attr.h"
#include "nvim/memory.h"
+#include "nvim/func_attr.h"
+
/* compiler specific configuration */
#if UINT_MAX == 0xffffffffu
@@ -206,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) { \
@@ -216,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) { \
@@ -225,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) { \
@@ -241,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; \
@@ -302,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; \
@@ -344,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)) { \
@@ -622,5 +623,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 */