isomorfeus-ferret 0.13.4 → 0.13.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/isomorfeus_ferret_ext/benchmark.c +2 -2
- data/ext/isomorfeus_ferret_ext/frb_index.c +3 -3
- data/ext/isomorfeus_ferret_ext/frt_except.c +0 -1
- data/ext/isomorfeus_ferret_ext/frt_fs_store.c +0 -2
- data/ext/isomorfeus_ferret_ext/frt_global.h +0 -7
- data/ext/isomorfeus_ferret_ext/frt_lang.c +8 -1
- data/ext/isomorfeus_ferret_ext/frt_store.h +1 -1
- data/ext/isomorfeus_ferret_ext/isomorfeus_ferret.c +2 -2
- data/ext/isomorfeus_ferret_ext/isomorfeus_ferret.h +1 -2
- data/ext/isomorfeus_ferret_ext/test_threading.c +1 -1
- data/lib/isomorfeus/ferret/version.rb +1 -1
- metadata +2 -5
- data/ext/isomorfeus_ferret_ext/frb_lang.c +0 -9
- data/ext/isomorfeus_ferret_ext/frb_lang.h +0 -17
- data/ext/isomorfeus_ferret_ext/frb_threading.h +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f2a4a6ea097a25d4d32a958c730fffca81ded61133f37ef4c86ca5b78ecef77
|
4
|
+
data.tar.gz: 7be1f98b64559be5f02e39d7a74894476046fef3fdd46d1e69ee3079c74c9681
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d173777ee520433e8df0e1a07853f92b65aa350427668baea67a957a28a8cadc05790396d8d5167282c4c83fb1e874eec3316c226e8c961f9f3161f3bf3ecb79
|
7
|
+
data.tar.gz: c64a96813a4b2546e21825cb4a6310c9384a8090bafe51e9c65c49d8c2b8bc69ab3deed82780e6df09089b6a915d6b7e7418bcac30f3d9770c1358800aa2286d
|
@@ -117,13 +117,13 @@ static void bm_single_run(BenchMarkUnit *unit, BenchMarkTimes *bm_times)
|
|
117
117
|
struct rusage ru_before, ru_after;
|
118
118
|
|
119
119
|
if (gettimeofday(&tv_before, NULL) == -1)
|
120
|
-
|
120
|
+
rb_raise(rb_eRuntimeError, "gettimeofday failed\n");
|
121
121
|
getrusage(RUSAGE_SELF, &ru_before);
|
122
122
|
|
123
123
|
unit->run();
|
124
124
|
|
125
125
|
if (gettimeofday(&tv_after, NULL) == -1)
|
126
|
-
|
126
|
+
rb_raise(rb_eRuntimeError, "gettimeofday failed\n");
|
127
127
|
getrusage(RUSAGE_SELF, &ru_after);
|
128
128
|
|
129
129
|
bm_times->rtime = TVAL_TO_SEC(tv_before, tv_after);
|
@@ -1271,11 +1271,11 @@ void frb_iw_free(void *p) {
|
|
1271
1271
|
|
1272
1272
|
void frb_iw_mark(void *p) {
|
1273
1273
|
FrtIndexWriter *iw = (FrtIndexWriter *)p;
|
1274
|
-
if (iw->analyzer->ranalyzer)
|
1274
|
+
if (iw->analyzer && iw->analyzer->ranalyzer)
|
1275
1275
|
rb_gc_mark(iw->analyzer->ranalyzer);
|
1276
|
-
if (iw->store->rstore)
|
1276
|
+
if (iw->store && iw->store->rstore)
|
1277
1277
|
rb_gc_mark(iw->store->rstore);
|
1278
|
-
if (iw->fis->rfis)
|
1278
|
+
if (iw->fis && iw->fis->rfis)
|
1279
1279
|
rb_gc_mark(iw->fis->rfis);
|
1280
1280
|
}
|
1281
1281
|
|
@@ -266,13 +266,6 @@ extern FILE *frt_x_exception_stream;
|
|
266
266
|
#define EXCEPTION 2
|
267
267
|
#define EXCEPTION_STREAM (frt_x_exception_stream ? frt_x_exception_stream : stderr)
|
268
268
|
|
269
|
-
#ifdef DEBUG
|
270
|
-
extern bool frt_x_do_logging;
|
271
|
-
#define xlog if (frt_x_do_logging) printf
|
272
|
-
#else
|
273
|
-
#define xlog()
|
274
|
-
#endif
|
275
|
-
|
276
269
|
extern void frt_init(int arc, const char *const argv[]);
|
277
270
|
extern void frt_micro_sleep(const int micro_seconds);
|
278
271
|
|
@@ -43,7 +43,14 @@ void *frt_erealloc(void *ptr, size_t size)
|
|
43
43
|
return p;
|
44
44
|
}
|
45
45
|
|
46
|
-
|
46
|
+
|
47
|
+
struct timeval rb_time_interval _((VALUE));
|
48
|
+
|
49
|
+
extern void frt_micro_sleep(const int micro_seconds) {
|
50
|
+
rb_thread_wait_for(rb_time_interval(rb_float_new((double)micro_seconds/1000000.0)));
|
51
|
+
}
|
52
|
+
|
53
|
+
/* void frt_micro_sleep(const int micro_seconds)
|
47
54
|
{
|
48
55
|
#if (defined POSH_OS_WIN32 || defined POSH_OS_WIN64) && !defined __MINGW32__
|
49
56
|
Sleep(micro_seconds / 1000);
|
@@ -175,7 +175,7 @@ TestSuite *ts_threading(TestSuite *suite)
|
|
175
175
|
|
176
176
|
tst_run_test(suite, test_number_to_str, NULL);
|
177
177
|
tst_run_test(suite, test_threading_test, index);
|
178
|
-
|
178
|
+
tst_run_test(suite, test_threading, index);
|
179
179
|
|
180
180
|
frt_index_destroy(index);
|
181
181
|
|
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.
|
4
|
+
version: 0.13.5
|
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-04-
|
11
|
+
date: 2022-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -167,12 +167,9 @@ files:
|
|
167
167
|
- ext/isomorfeus_ferret_ext/fio_tmpfile.h
|
168
168
|
- ext/isomorfeus_ferret_ext/frb_analysis.c
|
169
169
|
- ext/isomorfeus_ferret_ext/frb_index.c
|
170
|
-
- ext/isomorfeus_ferret_ext/frb_lang.c
|
171
|
-
- ext/isomorfeus_ferret_ext/frb_lang.h
|
172
170
|
- ext/isomorfeus_ferret_ext/frb_qparser.c
|
173
171
|
- ext/isomorfeus_ferret_ext/frb_search.c
|
174
172
|
- ext/isomorfeus_ferret_ext/frb_store.c
|
175
|
-
- ext/isomorfeus_ferret_ext/frb_threading.h
|
176
173
|
- ext/isomorfeus_ferret_ext/frb_utils.c
|
177
174
|
- ext/isomorfeus_ferret_ext/frt_analysis.c
|
178
175
|
- ext/isomorfeus_ferret_ext/frt_analysis.h
|
@@ -1,17 +0,0 @@
|
|
1
|
-
#ifndef FRT_LANG_H
|
2
|
-
#define FRT_LANG_H
|
3
|
-
|
4
|
-
#define RUBY_BINDINGS 1
|
5
|
-
|
6
|
-
#include <stdarg.h>
|
7
|
-
#include <ruby.h>
|
8
|
-
|
9
|
-
#undef close
|
10
|
-
#undef rename
|
11
|
-
#undef read
|
12
|
-
|
13
|
-
#define frt_emalloc xmalloc
|
14
|
-
#define frt_ecalloc(n) xcalloc(n, 1)
|
15
|
-
#define frt_erealloc xrealloc
|
16
|
-
|
17
|
-
#endif
|
@@ -1,29 +0,0 @@
|
|
1
|
-
#ifndef FRT_THREADING_H
|
2
|
-
#define FRT_THREADING_H
|
3
|
-
|
4
|
-
#include "frt_hash.h"
|
5
|
-
#define UNTHREADED 1
|
6
|
-
|
7
|
-
typedef void * frt_mutex_t;
|
8
|
-
typedef struct FrtHash *frt_thread_key_t;
|
9
|
-
typedef int frt_thread_once_t;
|
10
|
-
#define FRT_MUTEX_INITIALIZER NULL
|
11
|
-
#define FRT_THREAD_ONCE_INIT 1;
|
12
|
-
#define frt_mutex_init(a, b)
|
13
|
-
#define frt_mutex_lock(a)
|
14
|
-
#define frt_mutex_trylock(a)
|
15
|
-
#define frt_mutex_unlock(a)
|
16
|
-
#define frt_mutex_destroy(a)
|
17
|
-
#define frt_thread_key_create(a, b) frb_thread_key_create(a, b)
|
18
|
-
#define frt_thread_key_delete(a) frb_thread_key_delete(a)
|
19
|
-
#define frt_thread_setspecific(a, b) frb_thread_setspecific(a, b)
|
20
|
-
#define frt_thread_getspecific(a) frb_thread_getspecific(a)
|
21
|
-
#define frt_thread_once(a, b) frb_thread_once(a, b)
|
22
|
-
|
23
|
-
void frb_thread_once(int *once_control, void (*init_routine)(void));
|
24
|
-
void frb_thread_key_create(frt_thread_key_t *key, frt_free_ft destroy);
|
25
|
-
void frb_thread_key_delete(frt_thread_key_t key);
|
26
|
-
void frb_thread_setspecific(frt_thread_key_t key, const void *pointer);
|
27
|
-
void *frb_thread_getspecific(frt_thread_key_t key);
|
28
|
-
|
29
|
-
#endif
|