diff options
| author | Björn Linse <bjorn.linse@gmail.com> | 2016-06-19 16:41:08 +0200 |
|---|---|---|
| committer | Björn Linse <bjorn.linse@gmail.com> | 2016-08-31 21:57:04 +0200 |
| commit | 7e2348f2b1b487c875bbcf6c6711a276f9063040 (patch) | |
| tree | 9c00dc0c619c419e2819ad1a324a3aaf5b185aff /src/nvim/lib | |
| parent | 87e054bb24cd4ba8cd06eb1a65f956c6bcce222d (diff) | |
| download | rneovim-7e2348f2b1b487c875bbcf6c6711a276f9063040.tar.gz rneovim-7e2348f2b1b487c875bbcf6c6711a276f9063040.tar.bz2 rneovim-7e2348f2b1b487c875bbcf6c6711a276f9063040.zip | |
eval: use gperf to generate the hash of builtin functions
make api functions highlighted as builtins in vim.vim
Diffstat (limited to 'src/nvim/lib')
| -rw-r--r-- | src/nvim/lib/khash.h | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/src/nvim/lib/khash.h b/src/nvim/lib/khash.h index f8530be79a..8287cb14da 100644 --- a/src/nvim/lib/khash.h +++ b/src/nvim/lib/khash.h @@ -130,9 +130,7 @@ int main() { #include <limits.h> #include <stdint.h> -#ifndef USE_LIBC_ALLOCATOR -# include "nvim/memory.h" -#endif +#include "nvim/memory.h" #include "nvim/func_attr.h" @@ -173,32 +171,17 @@ typedef khint_t khiter_t; #define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x)) #endif -#ifdef USE_LIBC_ALLOCATOR -# ifndef kcalloc -# define kcalloc(N,Z) calloc(N,Z) -# endif -# ifndef kmalloc -# define kmalloc(Z) malloc(Z) -# endif -# ifndef krealloc -# define krealloc(P,Z) realloc(P,Z) -# endif -# ifndef kfree -# define kfree(P) free(P) -# endif -#else -# ifndef kcalloc -# define kcalloc(N,Z) xcalloc(N,Z) -# endif -# ifndef kmalloc -# define kmalloc(Z) xmalloc(Z) -# endif -# ifndef krealloc -# define krealloc(P,Z) xrealloc(P,Z) -# endif -# ifndef kfree -# define kfree(P) xfree(P) -# endif +#ifndef kcalloc +#define kcalloc(N,Z) xcalloc(N,Z) +#endif +#ifndef kmalloc +#define kmalloc(Z) xmalloc(Z) +#endif +#ifndef krealloc +#define krealloc(P,Z) xrealloc(P,Z) +#endif +#ifndef kfree +#define kfree(P) xfree(P) #endif #define __ac_HASH_UPPER 0.77 |