diff --git a/lua/blink/cmp/fuzzy/ffi.lua b/lua/blink/cmp/fuzzy/ffi.lua index bcc1c5a5..24f81fd3 100644 --- a/lua/blink/cmp/fuzzy/ffi.lua +++ b/lua/blink/cmp/fuzzy/ffi.lua @@ -18,29 +18,21 @@ end - - -typedef struct { - const int32_t *ptr; -} blink_cmp_fuzzy__Option_int32_t; -typedef struct { - const int32_t *ptr; - size_t len; - size_t capacity; -} blink_cmp_fuzzy__Vec_int32_t; - typedef struct { const char * *ptr; size_t len; size_t capacity; } blink_cmp_fuzzy__Vec___string_ptr; -typedef struct { - const char * *ptr; -} blink_cmp_fuzzy__Option___string_ptr; typedef struct { const blink_cmp_fuzzy__Vec___string_ptr *ptr; } blink_cmp_fuzzy__Option_Vec___string_ptr; +typedef struct { + const int32_t *ptr; +} blink_cmp_fuzzy__Option_int32_t; + + + typedef struct { const int8_t use_frecency; const blink_cmp_fuzzy__Option_Vec___string_ptr nearby_words; @@ -50,6 +42,14 @@ typedef struct { } blink_cmp_fuzzy__FuzzyOptions; +typedef struct { + const uint32_t *ptr; + size_t len; + size_t capacity; +} blink_cmp_fuzzy__Vec_uint32_t; +typedef struct { + const char * *ptr; +} blink_cmp_fuzzy__Option___string_ptr; typedef struct { const char * label; @@ -61,10 +61,10 @@ typedef struct { } blink_cmp_fuzzy__LspItem; typedef struct { - const uint32_t *ptr; + const int32_t *ptr; size_t len; size_t capacity; -} blink_cmp_fuzzy__Vec_uint32_t; +} blink_cmp_fuzzy__Vec_int32_t; int32_t init_db( const char *, int8_t*); @@ -106,38 +106,11 @@ end -local __const_c_typename_bool = ffi.typeof("const int8_t[?]") -local __c_function_argument_bool = ffi.typeof("int8_t[?]") -local __c_mut_function_argument_bool = ffi.typeof("int8_t[?]") - - -local __const_c_typename_size_t = ffi.typeof("const size_t[?]") -local __c_function_argument_size_t = ffi.typeof("size_t[?]") -local __c_mut_function_argument_size_t = ffi.typeof("size_t[?]") - - -local __const_c_typename_uint16_t = ffi.typeof("const uint16_t[?]") -local __c_function_argument_uint16_t = ffi.typeof("uint16_t[?]") -local __c_mut_function_argument_uint16_t = ffi.typeof("uint16_t[?]") - - local __const_c_typename_int32_t = ffi.typeof("const int32_t[?]") local __c_function_argument_int32_t = ffi.typeof("int32_t[?]") local __c_mut_function_argument_int32_t = ffi.typeof("int32_t[?]") -local __typename_Option_int32_t = ffi.metatype("blink_cmp_fuzzy__Option_int32_t", {}) -local __const_c_typename_Option_int32_t = ffi.typeof("const blink_cmp_fuzzy__Option_int32_t[?]") -local __c_function_argument_Option_int32_t = ffi.typeof("const blink_cmp_fuzzy__Option_int32_t*[?]") -local __c_mut_function_argument_Option_int32_t = ffi.typeof("blink_cmp_fuzzy__Option_int32_t*[?]") - - -local __typename_Vec_int32_t = ffi.metatype("blink_cmp_fuzzy__Vec_int32_t", {}) -local __const_c_typename_Vec_int32_t = ffi.typeof("const blink_cmp_fuzzy__Vec_int32_t[?]") -local __c_function_argument_Vec_int32_t = ffi.typeof("const blink_cmp_fuzzy__Vec_int32_t*[?]") -local __c_mut_function_argument_Vec_int32_t = ffi.typeof("blink_cmp_fuzzy__Vec_int32_t*[?]") - - local __const_c_typename___string_ptr = ffi.typeof("const char *[?]") local __c_function_argument___string_ptr = ffi.typeof("const char *[?]") local __c_mut_function_argument___string_ptr = ffi.typeof("char *[?]") @@ -149,18 +122,33 @@ local __c_function_argument_Vec___string_ptr = ffi.typeof("const blink_cmp_fuzzy local __c_mut_function_argument_Vec___string_ptr = ffi.typeof("blink_cmp_fuzzy__Vec___string_ptr*[?]") -local __typename_Option___string_ptr = ffi.metatype("blink_cmp_fuzzy__Option___string_ptr", {}) -local __const_c_typename_Option___string_ptr = ffi.typeof("const blink_cmp_fuzzy__Option___string_ptr[?]") -local __c_function_argument_Option___string_ptr = ffi.typeof("const blink_cmp_fuzzy__Option___string_ptr*[?]") -local __c_mut_function_argument_Option___string_ptr = ffi.typeof("blink_cmp_fuzzy__Option___string_ptr*[?]") - - local __typename_Option_Vec___string_ptr = ffi.metatype("blink_cmp_fuzzy__Option_Vec___string_ptr", {}) local __const_c_typename_Option_Vec___string_ptr = ffi.typeof("const blink_cmp_fuzzy__Option_Vec___string_ptr[?]") local __c_function_argument_Option_Vec___string_ptr = ffi.typeof("const blink_cmp_fuzzy__Option_Vec___string_ptr*[?]") local __c_mut_function_argument_Option_Vec___string_ptr = ffi.typeof("blink_cmp_fuzzy__Option_Vec___string_ptr*[?]") +local __const_c_typename_size_t = ffi.typeof("const size_t[?]") +local __c_function_argument_size_t = ffi.typeof("size_t[?]") +local __c_mut_function_argument_size_t = ffi.typeof("size_t[?]") + + +local __typename_Option_int32_t = ffi.metatype("blink_cmp_fuzzy__Option_int32_t", {}) +local __const_c_typename_Option_int32_t = ffi.typeof("const blink_cmp_fuzzy__Option_int32_t[?]") +local __c_function_argument_Option_int32_t = ffi.typeof("const blink_cmp_fuzzy__Option_int32_t*[?]") +local __c_mut_function_argument_Option_int32_t = ffi.typeof("blink_cmp_fuzzy__Option_int32_t*[?]") + + +local __const_c_typename_bool = ffi.typeof("const int8_t[?]") +local __c_function_argument_bool = ffi.typeof("int8_t[?]") +local __c_mut_function_argument_bool = ffi.typeof("int8_t[?]") + + +local __const_c_typename_uint16_t = ffi.typeof("const uint16_t[?]") +local __c_function_argument_uint16_t = ffi.typeof("uint16_t[?]") +local __c_mut_function_argument_uint16_t = ffi.typeof("uint16_t[?]") + + local __typename_FuzzyOptions = ffi.metatype("blink_cmp_fuzzy__FuzzyOptions", {}) local __const_c_typename_FuzzyOptions = ffi.typeof("const blink_cmp_fuzzy__FuzzyOptions[?]") local __c_function_argument_FuzzyOptions = ffi.typeof("const blink_cmp_fuzzy__FuzzyOptions*[?]") @@ -172,16 +160,28 @@ local __c_function_argument_uint32_t = ffi.typeof("uint32_t[?]") local __c_mut_function_argument_uint32_t = ffi.typeof("uint32_t[?]") +local __typename_Vec_uint32_t = ffi.metatype("blink_cmp_fuzzy__Vec_uint32_t", {}) +local __const_c_typename_Vec_uint32_t = ffi.typeof("const blink_cmp_fuzzy__Vec_uint32_t[?]") +local __c_function_argument_Vec_uint32_t = ffi.typeof("const blink_cmp_fuzzy__Vec_uint32_t*[?]") +local __c_mut_function_argument_Vec_uint32_t = ffi.typeof("blink_cmp_fuzzy__Vec_uint32_t*[?]") + + +local __typename_Option___string_ptr = ffi.metatype("blink_cmp_fuzzy__Option___string_ptr", {}) +local __const_c_typename_Option___string_ptr = ffi.typeof("const blink_cmp_fuzzy__Option___string_ptr[?]") +local __c_function_argument_Option___string_ptr = ffi.typeof("const blink_cmp_fuzzy__Option___string_ptr*[?]") +local __c_mut_function_argument_Option___string_ptr = ffi.typeof("blink_cmp_fuzzy__Option___string_ptr*[?]") + + local __typename_LspItem = ffi.metatype("blink_cmp_fuzzy__LspItem", {}) local __const_c_typename_LspItem = ffi.typeof("const blink_cmp_fuzzy__LspItem[?]") local __c_function_argument_LspItem = ffi.typeof("const blink_cmp_fuzzy__LspItem*[?]") local __c_mut_function_argument_LspItem = ffi.typeof("blink_cmp_fuzzy__LspItem*[?]") -local __typename_Vec_uint32_t = ffi.metatype("blink_cmp_fuzzy__Vec_uint32_t", {}) -local __const_c_typename_Vec_uint32_t = ffi.typeof("const blink_cmp_fuzzy__Vec_uint32_t[?]") -local __c_function_argument_Vec_uint32_t = ffi.typeof("const blink_cmp_fuzzy__Vec_uint32_t*[?]") -local __c_mut_function_argument_Vec_uint32_t = ffi.typeof("blink_cmp_fuzzy__Vec_uint32_t*[?]") +local __typename_Vec_int32_t = ffi.metatype("blink_cmp_fuzzy__Vec_int32_t", {}) +local __const_c_typename_Vec_int32_t = ffi.typeof("const blink_cmp_fuzzy__Vec_int32_t[?]") +local __c_function_argument_Vec_int32_t = ffi.typeof("const blink_cmp_fuzzy__Vec_int32_t*[?]") +local __c_mut_function_argument_Vec_int32_t = ffi.typeof("blink_cmp_fuzzy__Vec_int32_t*[?]") function M.init_db( db_path)