isomorfeus-ferret 0.13.10 → 0.13.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0625b49341ee2fc35e80e673e368789532c06ce6c93e779072cacc1206847a4b
4
- data.tar.gz: 7e81488d430471a37a872f80319efdcf8378e55dc4a583e33ff12bea942b9416
3
+ metadata.gz: a5603738325c11384e3dcd2d60e8ce34effbbe7b64fdcc319315910fdca6cbae
4
+ data.tar.gz: f15cc75761f2b0152243bbdc3983d880636fa71d6a2f5fdc4a34443fad28250b
5
5
  SHA512:
6
- metadata.gz: 38cf613eac98374898aa9a5c998cc3534d18d6badba3560cd1660413acd189cb6e618eba38f3bf828cef23fcafb9e44b2de349363b55585af9ea79927ff9b2cf
7
- data.tar.gz: 88564c30711737b48bec8879df788b46e03b06a041a98aaf3147c7375ef0d313d48f789805303774b4d0ed4531603ee8baaa46935b81abafb6df8ba7ccdb56a6
6
+ metadata.gz: 6ee5491226887aa837b0f71f053881c18be5dd460427aebf5501b17a3c863f9f28d4202848c82825ee110b568fb95a083e1defa4d1a316a6e7d9c35f41a328bc
7
+ data.tar.gz: 4e74d456a810c14b204e948c49885ef00710b2d79544ba5fc1c81c02bb1509459ad927935f9ef13fa73929d35919b18d4c5c56a4eb00790954da67f874fa591f
@@ -11,7 +11,7 @@
11
11
  bzip2/libbzip2 version 1.0.8 of 13 July 2019
12
12
  Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
13
13
 
14
- Please read the WARNING, DISCLAIMER and PATENTS sections in the
14
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
15
15
  README file.
16
16
 
17
17
  This program is released under the terms of the license contained
@@ -25,6 +25,7 @@
25
25
  #ifdef __cplusplus
26
26
  extern "C" {
27
27
  #endif
28
+ #define BZ_DEBUG 0
28
29
 
29
30
  #define BZ_RUN 0
30
31
  #define BZ_FLUSH 1
@@ -45,7 +46,7 @@ extern "C" {
45
46
  #define BZ_OUTBUFF_FULL (-8)
46
47
  #define BZ_CONFIG_ERROR (-9)
47
48
 
48
- typedef
49
+ typedef
49
50
  struct {
50
51
  char *next_in;
51
52
  unsigned int avail_in;
@@ -62,7 +63,7 @@ typedef
62
63
  void *(*bzalloc)(void *,int,int);
63
64
  void (*bzfree)(void *,void *);
64
65
  void *opaque;
65
- }
66
+ }
66
67
  bz_stream;
67
68
 
68
69
 
@@ -97,34 +98,34 @@ typedef
97
98
 
98
99
  /*-- Core (low-level) library functions --*/
99
100
 
100
- BZ_EXTERN int BZ_API(BZ2_bzCompressInit) (
101
- bz_stream* strm,
102
- int blockSize100k,
103
- int verbosity,
104
- int workFactor
101
+ BZ_EXTERN int BZ_API(BZ2_bzCompressInit) (
102
+ bz_stream* strm,
103
+ int blockSize100k,
104
+ int verbosity,
105
+ int workFactor
105
106
  );
106
107
 
107
- BZ_EXTERN int BZ_API(BZ2_bzCompress) (
108
- bz_stream* strm,
109
- int action
108
+ BZ_EXTERN int BZ_API(BZ2_bzCompress) (
109
+ bz_stream* strm,
110
+ int action
110
111
  );
111
112
 
112
- BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) (
113
- bz_stream* strm
113
+ BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) (
114
+ bz_stream* strm
114
115
  );
115
116
 
116
- BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) (
117
- bz_stream *strm,
118
- int verbosity,
117
+ BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) (
118
+ bz_stream *strm,
119
+ int verbosity,
119
120
  int small
120
121
  );
121
122
 
122
- BZ_EXTERN int BZ_API(BZ2_bzDecompress) (
123
- bz_stream* strm
123
+ BZ_EXTERN int BZ_API(BZ2_bzDecompress) (
124
+ bz_stream* strm
124
125
  );
125
126
 
126
- BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) (
127
- bz_stream *strm
127
+ BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) (
128
+ bz_stream *strm
128
129
  );
129
130
 
130
131
 
@@ -136,64 +137,64 @@ BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) (
136
137
 
137
138
  typedef void BZFILE;
138
139
 
139
- BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) (
140
- int* bzerror,
141
- FILE* f,
142
- int verbosity,
140
+ BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) (
141
+ int* bzerror,
142
+ FILE* f,
143
+ int verbosity,
143
144
  int small,
144
- void* unused,
145
- int nUnused
145
+ void* unused,
146
+ int nUnused
146
147
  );
147
148
 
148
- BZ_EXTERN void BZ_API(BZ2_bzReadClose) (
149
- int* bzerror,
150
- BZFILE* b
149
+ BZ_EXTERN void BZ_API(BZ2_bzReadClose) (
150
+ int* bzerror,
151
+ BZFILE* b
151
152
  );
152
153
 
153
- BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) (
154
- int* bzerror,
155
- BZFILE* b,
156
- void** unused,
157
- int* nUnused
154
+ BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) (
155
+ int* bzerror,
156
+ BZFILE* b,
157
+ void** unused,
158
+ int* nUnused
158
159
  );
159
160
 
160
- BZ_EXTERN int BZ_API(BZ2_bzRead) (
161
- int* bzerror,
162
- BZFILE* b,
163
- void* buf,
164
- int len
161
+ BZ_EXTERN int BZ_API(BZ2_bzRead) (
162
+ int* bzerror,
163
+ BZFILE* b,
164
+ void* buf,
165
+ int len
165
166
  );
166
167
 
167
- BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) (
168
- int* bzerror,
169
- FILE* f,
170
- int blockSize100k,
171
- int verbosity,
172
- int workFactor
168
+ BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) (
169
+ int* bzerror,
170
+ FILE* f,
171
+ int blockSize100k,
172
+ int verbosity,
173
+ int workFactor
173
174
  );
174
175
 
175
- BZ_EXTERN void BZ_API(BZ2_bzWrite) (
176
- int* bzerror,
177
- BZFILE* b,
178
- void* buf,
179
- int len
176
+ BZ_EXTERN void BZ_API(BZ2_bzWrite) (
177
+ int* bzerror,
178
+ BZFILE* b,
179
+ void* buf,
180
+ int len
180
181
  );
181
182
 
182
- BZ_EXTERN void BZ_API(BZ2_bzWriteClose) (
183
- int* bzerror,
184
- BZFILE* b,
185
- int abandon,
186
- unsigned int* nbytes_in,
187
- unsigned int* nbytes_out
183
+ BZ_EXTERN void BZ_API(BZ2_bzWriteClose) (
184
+ int* bzerror,
185
+ BZFILE* b,
186
+ int abandon,
187
+ unsigned int* nbytes_in,
188
+ unsigned int* nbytes_out
188
189
  );
189
190
 
190
- BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) (
191
- int* bzerror,
192
- BZFILE* b,
193
- int abandon,
194
- unsigned int* nbytes_in_lo32,
195
- unsigned int* nbytes_in_hi32,
196
- unsigned int* nbytes_out_lo32,
191
+ BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) (
192
+ int* bzerror,
193
+ BZFILE* b,
194
+ int abandon,
195
+ unsigned int* nbytes_in_lo32,
196
+ unsigned int* nbytes_in_hi32,
197
+ unsigned int* nbytes_out_lo32,
197
198
  unsigned int* nbytes_out_hi32
198
199
  );
199
200
  #endif
@@ -201,23 +202,23 @@ BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) (
201
202
 
202
203
  /*-- Utility functions --*/
203
204
 
204
- BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) (
205
- char* dest,
205
+ BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) (
206
+ char* dest,
206
207
  unsigned int* destLen,
207
- char* source,
208
+ char* source,
208
209
  unsigned int sourceLen,
209
- int blockSize100k,
210
- int verbosity,
211
- int workFactor
210
+ int blockSize100k,
211
+ int verbosity,
212
+ int workFactor
212
213
  );
213
214
 
214
- BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) (
215
- char* dest,
215
+ BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) (
216
+ char* dest,
216
217
  unsigned int* destLen,
217
- char* source,
218
+ char* source,
218
219
  unsigned int sourceLen,
219
- int small,
220
- int verbosity
220
+ int small,
221
+ int verbosity
221
222
  );
222
223
 
223
224
 
@@ -244,17 +245,17 @@ BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) (
244
245
  int fd,
245
246
  const char *mode
246
247
  );
247
-
248
+
248
249
  BZ_EXTERN int BZ_API(BZ2_bzread) (
249
- BZFILE* b,
250
- void* buf,
251
- int len
250
+ BZFILE* b,
251
+ void* buf,
252
+ int len
252
253
  );
253
254
 
254
255
  BZ_EXTERN int BZ_API(BZ2_bzwrite) (
255
- BZFILE* b,
256
- void* buf,
257
- int len
256
+ BZFILE* b,
257
+ void* buf,
258
+ int len
258
259
  );
259
260
 
260
261
  BZ_EXTERN int BZ_API(BZ2_bzflush) (
@@ -266,7 +267,7 @@ BZ_EXTERN void BZ_API(BZ2_bzclose) (
266
267
  );
267
268
 
268
269
  BZ_EXTERN const char * BZ_API(BZ2_bzerror) (
269
- BZFILE *b,
270
+ BZFILE *b,
270
271
  int *errnum
271
272
  );
272
273
  #endif
@@ -229,7 +229,7 @@ static VALUE frb_fi_init(int argc, VALUE *argv, VALUE self) {
229
229
  */
230
230
  static VALUE frb_fi_name(VALUE self) {
231
231
  FrtFieldInfo *fi = (FrtFieldInfo *)DATA_PTR(self);
232
- return rb_str_new_cstr(rb_id2name(fi->name));
232
+ return ID2SYM(fi->name);
233
233
  }
234
234
 
235
235
  /*
@@ -659,7 +659,7 @@ frb_fis_get_tk_fields(VALUE self)
659
659
  int i;
660
660
  for (i = 0; i < fis->size; i++) {
661
661
  if (!fi_is_tokenized(fis->fields[i])) continue;
662
- rb_ary_push(rfield_names, rb_str_new_cstr(rb_id2name(fis->fields[i]->name)));
662
+ rb_ary_push(rfield_names, ID2SYM(fis->fields[i]->name));
663
663
  }
664
664
  return rfield_names;
665
665
  }
@@ -26,7 +26,7 @@ typedef posh_i32_t frt_i32;
26
26
  typedef posh_u64_t frt_u64;
27
27
  typedef posh_i64_t frt_i64;
28
28
 
29
- #if defined POSH_OS_WIN64
29
+ #if (defined POSH_OS_WIN32 || defined POSH_OS_WIN64)
30
30
  typedef off64_t frt_off_t;
31
31
  #else
32
32
  typedef off_t frt_off_t;
@@ -3,7 +3,7 @@
3
3
 
4
4
  /*
5
5
  * The HashSet contains an array +elems+ of the elements that have been added.
6
- * It always has +size+ elements so +size+ ane +elems+ can be used to iterate
6
+ * It always has +size+ elements so +size+ and +elems+ can be used to iterate
7
7
  * over all alements in the HashSet. It also uses a Hash to keep track of
8
8
  * which elements have been added and their index in the +elems+ array.
9
9
  */
@@ -37,7 +37,7 @@ FrtHashSet *frt_hs_new_ptr(frt_free_ft free_func)
37
37
  return hs;
38
38
  }
39
39
 
40
- static void clear(FrtHashSet *hs, bool destroy)
40
+ static void hs_clear(FrtHashSet *hs, bool destroy)
41
41
  {
42
42
  FrtHashSetEntry *curr, *next = hs->first;
43
43
  frt_free_ft do_free = destroy ? hs->free_elem_i : &frt_dummy_free;
@@ -52,20 +52,20 @@ static void clear(FrtHashSet *hs, bool destroy)
52
52
 
53
53
  void frt_hs_clear(FrtHashSet *hs)
54
54
  {
55
- clear(hs, true);
55
+ hs_clear(hs, true);
56
56
  frt_h_clear(hs->ht);
57
57
  }
58
58
 
59
59
  void frt_hs_free(FrtHashSet *hs)
60
60
  {
61
- clear(hs, false);
61
+ hs_clear(hs, false);
62
62
  frt_h_destroy(hs->ht);
63
63
  free(hs);
64
64
  }
65
65
 
66
66
  void frt_hs_destroy(FrtHashSet *hs)
67
67
  {
68
- clear(hs, true);
68
+ hs_clear(hs, true);
69
69
  frt_h_destroy(hs->ht);
70
70
  free(hs);
71
71
  }
@@ -116,7 +116,7 @@ char *frt_fn_for_generation(char *buf, const char *base, const char *ext, frt_i6
116
116
  } else {
117
117
  char b[FRT_SEGMENT_NAME_MAX_LENGTH];
118
118
  char *u = u64_to_str36(b, FRT_SEGMENT_NAME_MAX_LENGTH, (frt_u64)gen);
119
- if (ext == NULL) {
119
+ if (ext == NULL || (strcmp(ext, "") == 0)) {
120
120
  sprintf(buf, "%s_%s", base, u);
121
121
  } else {
122
122
  sprintf(buf, "%s_%s.%s", base, u, ext);
@@ -303,6 +303,7 @@ FrtFieldInfo *frt_fi_init(FrtFieldInfo *fi, ID name, FrtStoreValue store, FrtCom
303
303
  fi_set_compression(fi, compression);
304
304
  fi_set_index(fi, index);
305
305
  fi_set_term_vector(fi, term_vector);
306
+ fi->number = 0;
306
307
  fi->ref_cnt = 1;
307
308
  fi->rfi = Qnil;
308
309
  return fi;
@@ -394,6 +395,7 @@ FrtFieldInfo *frt_fis_add_field(FrtFieldInfos *fis, FrtFieldInfo *fi) {
394
395
  if (!frt_h_set_safe(fis->field_dict, (void *)fi->name, fi)) {
395
396
  FRT_RAISE(FRT_ARG_ERROR, "Field :%s already exists", rb_id2name(fi->name));
396
397
  }
398
+ FRT_REF(fi);
397
399
  fi->number = fis->size;
398
400
  fis->fields[fis->size] = fi;
399
401
  fis->size++;
@@ -2801,6 +2801,7 @@ FrtQParser *frt_qp_init(FrtQParser *self, FrtAnalyzer *analyzer) {
2801
2801
  qp_push_fields(self, self->def_fields, false);
2802
2802
 
2803
2803
  self->analyzer = analyzer;
2804
+ if (analyzer) FRT_REF(analyzer);
2804
2805
  self->ts_cache = frt_h_new_ptr((frt_free_ft)&frt_ts_deref);
2805
2806
  self->buf_index = 0;
2806
2807
  self->dynbuf = NULL;
@@ -44,7 +44,7 @@ struct FrtOutStreamMethods {
44
44
  * Close any resources used by the output stream +os+
45
45
  *
46
46
  * @param os self
47
- * @raise FRT_IO_ERROR if there is an closing the file
47
+ * @raise FRT_IO_ERROR if there is an error closing the file
48
48
  */
49
49
  void (*close_i)(struct FrtOutStream *os);
50
50
  };
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Ferret
3
- VERSION = '0.13.10'
3
+ VERSION = '0.13.11'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-ferret
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.10
4
+ version: 0.13.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-07 00:00:00.000000000 Z
11
+ date: 2022-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj