19
19
20
20
21
21
22
+
22
23
typedef struct {
23
- const char * * ptr ;
24
- size_t len ;
25
- size_t capacity ;
26
- } blink_cmp_fuzzy__Vec___string_ptr;
24
+ const int32_t * ptr ;
25
+ } blink_cmp_fuzzy__Option_int32_t;
27
26
typedef struct {
28
27
const int32_t * ptr ;
29
28
size_t len ;
30
29
size_t capacity ;
31
30
} blink_cmp_fuzzy__Vec_int32_t;
31
+
32
32
typedef struct {
33
- const int32_t * ptr ;
34
- } blink_cmp_fuzzy__Option_int32_t;
35
- typedef struct {
36
- const uint32_t * ptr ;
33
+ const char * * ptr ;
37
34
size_t len ;
38
35
size_t capacity ;
39
- } blink_cmp_fuzzy__Vec_uint32_t;
40
-
41
-
42
-
36
+ } blink_cmp_fuzzy__Vec___string_ptr;
43
37
typedef struct {
44
38
const char * * ptr ;
45
39
} blink_cmp_fuzzy__Option___string_ptr;
46
-
47
- typedef struct {
48
- const char * label ;
49
- const blink_cmp_fuzzy__Option___string_ptr sort_text ;
50
- const blink_cmp_fuzzy__Option___string_ptr filter_text ;
51
- const uint32_t kind ;
52
- const blink_cmp_fuzzy__Option_int32_t score_offset ;
53
- const char * source ;
54
- } blink_cmp_fuzzy__LspItem;
55
-
56
40
typedef struct {
57
41
const blink_cmp_fuzzy__Vec___string_ptr * ptr ;
58
42
} blink_cmp_fuzzy__Option_Vec___string_ptr;
@@ -65,6 +49,22 @@ typedef struct {
65
49
const blink_cmp_fuzzy__Vec___string_ptr sorts ;
66
50
} blink_cmp_fuzzy__FuzzyOptions;
67
51
52
+
53
+
54
+ typedef struct {
55
+ const char * label ;
56
+ const blink_cmp_fuzzy__Option___string_ptr sort_text ;
57
+ const blink_cmp_fuzzy__Option___string_ptr filter_text ;
58
+ const uint32_t kind ;
59
+ const blink_cmp_fuzzy__Option_int32_t score_offset ;
60
+ const char * source ;
61
+ } blink_cmp_fuzzy__LspItem;
62
+
63
+ typedef struct {
64
+ const uint32_t * ptr ;
65
+ size_t len ;
66
+ size_t capacity ;
67
+ } blink_cmp_fuzzy__Vec_uint32_t;
68
68
int32_t init_db (
69
69
const char * ,
70
70
int8_t * );
@@ -97,37 +97,33 @@ int32_t __gc_get_words(
97
97
98
98
]]
99
99
100
- local rust = ffi .load (debug.getinfo (1 ).source :match (' @?(.*/)' ) .. ' ../../../../target/release/libblink_cmp_fuzzy' .. get_shared_lib_extension ())
100
+ local ok , rust = pcall (function () return ffi .load (debug.getinfo (1 ).source :match (' @?(.*/)' ) .. ' ../../../../target/release/libblink_cmp_fuzzy' .. get_shared_lib_extension ()) end )
101
+ if not ok then
102
+ rust = ffi .load (debug.getinfo (1 ).source :match (' @?(.*/)' ) .. ' ../../../../target/release/blink_cmp_fuzzy' .. get_shared_lib_extension ())
103
+ end
101
104
102
105
local M = {}
103
106
104
107
105
108
106
- local __const_c_typename_int32_t = ffi .typeof (" const int32_t[?]" )
107
- local __c_function_argument_int32_t = ffi .typeof (" int32_t[?]" )
108
- local __c_mut_function_argument_int32_t = ffi .typeof (" int32_t[?]" )
109
-
110
-
111
- local __const_c_typename___string_ptr = ffi .typeof (" const char *[?]" )
112
- local __c_function_argument___string_ptr = ffi .typeof (" const char *[?]" )
113
- local __c_mut_function_argument___string_ptr = ffi .typeof (" char *[?]" )
109
+ local __const_c_typename_bool = ffi .typeof (" const int8_t[?]" )
110
+ local __c_function_argument_bool = ffi .typeof (" int8_t[?]" )
111
+ local __c_mut_function_argument_bool = ffi .typeof (" int8_t[?]" )
114
112
115
113
116
- local __const_c_typename_uint32_t = ffi .typeof (" const uint32_t [?]" )
117
- local __c_function_argument_uint32_t = ffi .typeof (" uint32_t [?]" )
118
- local __c_mut_function_argument_uint32_t = ffi .typeof (" uint32_t [?]" )
114
+ local __const_c_typename_size_t = ffi .typeof (" const size_t [?]" )
115
+ local __c_function_argument_size_t = ffi .typeof (" size_t [?]" )
116
+ local __c_mut_function_argument_size_t = ffi .typeof (" size_t [?]" )
119
117
120
118
121
- local __typename_Vec___string_ptr = ffi .metatype (" blink_cmp_fuzzy__Vec___string_ptr" , {})
122
- local __const_c_typename_Vec___string_ptr = ffi .typeof (" const blink_cmp_fuzzy__Vec___string_ptr[?]" )
123
- local __c_function_argument_Vec___string_ptr = ffi .typeof (" const blink_cmp_fuzzy__Vec___string_ptr*[?]" )
124
- local __c_mut_function_argument_Vec___string_ptr = ffi .typeof (" blink_cmp_fuzzy__Vec___string_ptr*[?]" )
119
+ local __const_c_typename_uint16_t = ffi .typeof (" const uint16_t[?]" )
120
+ local __c_function_argument_uint16_t = ffi .typeof (" uint16_t[?]" )
121
+ local __c_mut_function_argument_uint16_t = ffi .typeof (" uint16_t[?]" )
125
122
126
123
127
- local __typename_Vec_int32_t = ffi .metatype (" blink_cmp_fuzzy__Vec_int32_t" , {})
128
- local __const_c_typename_Vec_int32_t = ffi .typeof (" const blink_cmp_fuzzy__Vec_int32_t[?]" )
129
- local __c_function_argument_Vec_int32_t = ffi .typeof (" const blink_cmp_fuzzy__Vec_int32_t*[?]" )
130
- local __c_mut_function_argument_Vec_int32_t = ffi .typeof (" blink_cmp_fuzzy__Vec_int32_t*[?]" )
124
+ local __const_c_typename_int32_t = ffi .typeof (" const int32_t[?]" )
125
+ local __c_function_argument_int32_t = ffi .typeof (" int32_t[?]" )
126
+ local __c_mut_function_argument_int32_t = ffi .typeof (" int32_t[?]" )
131
127
132
128
133
129
local __typename_Option_int32_t = ffi .metatype (" blink_cmp_fuzzy__Option_int32_t" , {})
@@ -136,25 +132,21 @@ local __c_function_argument_Option_int32_t = ffi.typeof("const blink_cmp_fuzzy__
136
132
local __c_mut_function_argument_Option_int32_t = ffi .typeof (" blink_cmp_fuzzy__Option_int32_t*[?]" )
137
133
138
134
139
- local __typename_Vec_uint32_t = ffi .metatype (" blink_cmp_fuzzy__Vec_uint32_t" , {})
140
- local __const_c_typename_Vec_uint32_t = ffi .typeof (" const blink_cmp_fuzzy__Vec_uint32_t[?]" )
141
- local __c_function_argument_Vec_uint32_t = ffi .typeof (" const blink_cmp_fuzzy__Vec_uint32_t*[?]" )
142
- local __c_mut_function_argument_Vec_uint32_t = ffi .typeof (" blink_cmp_fuzzy__Vec_uint32_t*[?]" )
143
-
144
-
145
- local __const_c_typename_size_t = ffi .typeof (" const size_t[?]" )
146
- local __c_function_argument_size_t = ffi .typeof (" size_t[?]" )
147
- local __c_mut_function_argument_size_t = ffi .typeof (" size_t[?]" )
135
+ local __typename_Vec_int32_t = ffi .metatype (" blink_cmp_fuzzy__Vec_int32_t" , {})
136
+ local __const_c_typename_Vec_int32_t = ffi .typeof (" const blink_cmp_fuzzy__Vec_int32_t[?]" )
137
+ local __c_function_argument_Vec_int32_t = ffi .typeof (" const blink_cmp_fuzzy__Vec_int32_t*[?]" )
138
+ local __c_mut_function_argument_Vec_int32_t = ffi .typeof (" blink_cmp_fuzzy__Vec_int32_t*[?]" )
148
139
149
140
150
- local __const_c_typename_bool = ffi .typeof (" const int8_t [?]" )
151
- local __c_function_argument_bool = ffi .typeof (" int8_t [?]" )
152
- local __c_mut_function_argument_bool = ffi .typeof (" int8_t [?]" )
141
+ local __const_c_typename___string_ptr = ffi .typeof (" const char * [?]" )
142
+ local __c_function_argument___string_ptr = ffi .typeof (" const char * [?]" )
143
+ local __c_mut_function_argument___string_ptr = ffi .typeof (" char * [?]" )
153
144
154
145
155
- local __const_c_typename_uint16_t = ffi .typeof (" const uint16_t[?]" )
156
- local __c_function_argument_uint16_t = ffi .typeof (" uint16_t[?]" )
157
- local __c_mut_function_argument_uint16_t = ffi .typeof (" uint16_t[?]" )
146
+ local __typename_Vec___string_ptr = ffi .metatype (" blink_cmp_fuzzy__Vec___string_ptr" , {})
147
+ local __const_c_typename_Vec___string_ptr = ffi .typeof (" const blink_cmp_fuzzy__Vec___string_ptr[?]" )
148
+ local __c_function_argument_Vec___string_ptr = ffi .typeof (" const blink_cmp_fuzzy__Vec___string_ptr*[?]" )
149
+ local __c_mut_function_argument_Vec___string_ptr = ffi .typeof (" blink_cmp_fuzzy__Vec___string_ptr*[?]" )
158
150
159
151
160
152
local __typename_Option___string_ptr = ffi .metatype (" blink_cmp_fuzzy__Option___string_ptr" , {})
@@ -163,12 +155,6 @@ local __c_function_argument_Option___string_ptr = ffi.typeof("const blink_cmp_fu
163
155
local __c_mut_function_argument_Option___string_ptr = ffi .typeof (" blink_cmp_fuzzy__Option___string_ptr*[?]" )
164
156
165
157
166
- local __typename_LspItem = ffi .metatype (" blink_cmp_fuzzy__LspItem" , {})
167
- local __const_c_typename_LspItem = ffi .typeof (" const blink_cmp_fuzzy__LspItem[?]" )
168
- local __c_function_argument_LspItem = ffi .typeof (" const blink_cmp_fuzzy__LspItem*[?]" )
169
- local __c_mut_function_argument_LspItem = ffi .typeof (" blink_cmp_fuzzy__LspItem*[?]" )
170
-
171
-
172
158
local __typename_Option_Vec___string_ptr = ffi .metatype (" blink_cmp_fuzzy__Option_Vec___string_ptr" , {})
173
159
local __const_c_typename_Option_Vec___string_ptr = ffi .typeof (" const blink_cmp_fuzzy__Option_Vec___string_ptr[?]" )
174
160
local __c_function_argument_Option_Vec___string_ptr = ffi .typeof (" const blink_cmp_fuzzy__Option_Vec___string_ptr*[?]" )
@@ -180,6 +166,23 @@ local __const_c_typename_FuzzyOptions = ffi.typeof("const blink_cmp_fuzzy__Fuzzy
180
166
local __c_function_argument_FuzzyOptions = ffi .typeof (" const blink_cmp_fuzzy__FuzzyOptions*[?]" )
181
167
local __c_mut_function_argument_FuzzyOptions = ffi .typeof (" blink_cmp_fuzzy__FuzzyOptions*[?]" )
182
168
169
+
170
+ local __const_c_typename_uint32_t = ffi .typeof (" const uint32_t[?]" )
171
+ local __c_function_argument_uint32_t = ffi .typeof (" uint32_t[?]" )
172
+ local __c_mut_function_argument_uint32_t = ffi .typeof (" uint32_t[?]" )
173
+
174
+
175
+ local __typename_LspItem = ffi .metatype (" blink_cmp_fuzzy__LspItem" , {})
176
+ local __const_c_typename_LspItem = ffi .typeof (" const blink_cmp_fuzzy__LspItem[?]" )
177
+ local __c_function_argument_LspItem = ffi .typeof (" const blink_cmp_fuzzy__LspItem*[?]" )
178
+ local __c_mut_function_argument_LspItem = ffi .typeof (" blink_cmp_fuzzy__LspItem*[?]" )
179
+
180
+
181
+ local __typename_Vec_uint32_t = ffi .metatype (" blink_cmp_fuzzy__Vec_uint32_t" , {})
182
+ local __const_c_typename_Vec_uint32_t = ffi .typeof (" const blink_cmp_fuzzy__Vec_uint32_t[?]" )
183
+ local __c_function_argument_Vec_uint32_t = ffi .typeof (" const blink_cmp_fuzzy__Vec_uint32_t*[?]" )
184
+ local __c_mut_function_argument_Vec_uint32_t = ffi .typeof (" blink_cmp_fuzzy__Vec_uint32_t*[?]" )
185
+
183
186
function M .init_db (
184
187
db_path )
185
188
local __typeof = __c_mut_function_argument_bool
0 commit comments