swishe 0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +21 -0
- data/README +33 -0
- data/ext/MANIFEST +3 -0
- data/ext/extconf.rb +13 -0
- data/ext/swishe_base.c +2510 -0
- data/lib/swishe.rb +137 -0
- data/setup.rb +1360 -0
- metadata +56 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
Copyright (c) 2006 Patrick Gundlach
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
data/README
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
= Readme for Swish-e Ruby Bindings
|
2
|
+
|
3
|
+
== Example usage
|
4
|
+
require "swishe"
|
5
|
+
sw=SwishE.new("swishe-index")
|
6
|
+
sw.query("searchstring").each do |result|
|
7
|
+
puts result.docpath
|
8
|
+
puts result.rank
|
9
|
+
# ....
|
10
|
+
end
|
11
|
+
sw.close
|
12
|
+
|
13
|
+
== Installing the bindings
|
14
|
+
|
15
|
+
You have two choices installing the bindings. First, use the gem command, such as
|
16
|
+
gem install swishe
|
17
|
+
in case the gem command doesn't find the Swish-e C-library you might need to supply the path
|
18
|
+
to the library on the gem command line, for example:
|
19
|
+
gem install swishe -- --with-swishe-dir=/opt/swishe/2.4.3/
|
20
|
+
|
21
|
+
The other way to install the ruby bindings for Swish-e would be to download the source file
|
22
|
+
and run setup.rb manually:
|
23
|
+
ruby setup.rb all
|
24
|
+
and again, if your system doesn't find the Swish-e library, you need to supply those:
|
25
|
+
ruby setup.rb all -- --with-swishe-dir=/opt/swishe/2.4.3/
|
26
|
+
Needles to say that you need to change the path according to your system requirements.
|
27
|
+
|
28
|
+
== Other Stuff
|
29
|
+
Author:: Patrick Gundlach <patrick <at> gundla.ch>
|
30
|
+
Project Page:: http://www.rubyforge.org/projects/swishe
|
31
|
+
Homepage:: (Documentation) http://swishe.rubyforge.org
|
32
|
+
License:: Copyright (c) 2006 Patrick Gundlach.
|
33
|
+
Released under the terms of the MIT license. See the file MIT-LICENSE
|
data/ext/MANIFEST
ADDED
data/ext/extconf.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/opt/ruby/1.8/bin/ruby
|
2
|
+
|
3
|
+
# ruby setup.rb all -- --with-swishe-dir=/opt/swishe/2.4.3
|
4
|
+
require 'mkmf'
|
5
|
+
|
6
|
+
dir_config "swishe"
|
7
|
+
if have_header("swish-e.h") and have_library('swish-e')
|
8
|
+
create_makefile('swishe_base')
|
9
|
+
else
|
10
|
+
puts "error creating makefile"
|
11
|
+
exit 1
|
12
|
+
end
|
13
|
+
|
data/ext/swishe_base.c
ADDED
@@ -0,0 +1,2510 @@
|
|
1
|
+
/* ----------------------------------------------------------------------------
|
2
|
+
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
+
* Version 1.3.24
|
4
|
+
*
|
5
|
+
* This file is not intended to be easily readable and contains a number of
|
6
|
+
* coding conventions designed to improve portability and efficiency. Do not make
|
7
|
+
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
+
* interface file instead.
|
9
|
+
* ----------------------------------------------------------------------------- */
|
10
|
+
|
11
|
+
|
12
|
+
#ifndef SWIG_TEMPLATE_DISAMBIGUATOR
|
13
|
+
# if defined(__SUNPRO_CC)
|
14
|
+
# define SWIG_TEMPLATE_DISAMBIGUATOR template
|
15
|
+
# else
|
16
|
+
# define SWIG_TEMPLATE_DISAMBIGUATOR
|
17
|
+
# endif
|
18
|
+
#endif
|
19
|
+
|
20
|
+
/* ruby.swg */
|
21
|
+
/* Implementation : RUBY */
|
22
|
+
#define SWIGRUBY 1
|
23
|
+
|
24
|
+
#include "ruby.h"
|
25
|
+
|
26
|
+
/* Flags for pointer conversion */
|
27
|
+
#define SWIG_POINTER_EXCEPTION 0x1
|
28
|
+
#define SWIG_POINTER_DISOWN 0x2
|
29
|
+
|
30
|
+
#define NUM2USHRT(n) (\
|
31
|
+
(0 <= NUM2UINT(n) && NUM2UINT(n) <= USHRT_MAX)\
|
32
|
+
? (unsigned short) NUM2UINT(n) \
|
33
|
+
: (rb_raise(rb_eArgError, "integer %d out of range of `unsigned short'",\
|
34
|
+
NUM2UINT(n)), (short)0)\
|
35
|
+
)
|
36
|
+
|
37
|
+
#define NUM2SHRT(n) (\
|
38
|
+
(SHRT_MIN <= NUM2INT(n) && NUM2INT(n) <= SHRT_MAX)\
|
39
|
+
? (short)NUM2INT(n)\
|
40
|
+
: (rb_raise(rb_eArgError, "integer %d out of range of `short'",\
|
41
|
+
NUM2INT(n)), (short)0)\
|
42
|
+
)
|
43
|
+
|
44
|
+
/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
|
45
|
+
#ifndef NUM2LL
|
46
|
+
#define NUM2LL(x) NUM2LONG((x))
|
47
|
+
#endif
|
48
|
+
#ifndef LL2NUM
|
49
|
+
#define LL2NUM(x) INT2NUM((long) (x))
|
50
|
+
#endif
|
51
|
+
#ifndef ULL2NUM
|
52
|
+
#define ULL2NUM(x) UINT2NUM((unsigned long) (x))
|
53
|
+
#endif
|
54
|
+
|
55
|
+
/* Ruby 1.7 doesn't (yet) define NUM2ULL() */
|
56
|
+
#ifndef NUM2ULL
|
57
|
+
#ifdef HAVE_LONG_LONG
|
58
|
+
#define NUM2ULL(x) rb_num2ull((x))
|
59
|
+
#else
|
60
|
+
#define NUM2ULL(x) NUM2ULONG(x)
|
61
|
+
#endif
|
62
|
+
#endif
|
63
|
+
|
64
|
+
/*
|
65
|
+
* Need to be very careful about how these macros are defined, especially
|
66
|
+
* when compiling C++ code or C code with an ANSI C compiler.
|
67
|
+
*
|
68
|
+
* VALUEFUNC(f) is a macro used to typecast a C function that implements
|
69
|
+
* a Ruby method so that it can be passed as an argument to API functions
|
70
|
+
* like rb_define_method() and rb_define_singleton_method().
|
71
|
+
*
|
72
|
+
* VOIDFUNC(f) is a macro used to typecast a C function that implements
|
73
|
+
* either the "mark" or "free" stuff for a Ruby Data object, so that it
|
74
|
+
* can be passed as an argument to API functions like Data_Wrap_Struct()
|
75
|
+
* and Data_Make_Struct().
|
76
|
+
*/
|
77
|
+
|
78
|
+
#ifdef __cplusplus
|
79
|
+
# ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
|
80
|
+
# define PROTECTFUNC(f) ((VALUE (*)()) f)
|
81
|
+
# define VALUEFUNC(f) ((VALUE (*)()) f)
|
82
|
+
# define VOIDFUNC(f) ((void (*)()) f)
|
83
|
+
# else
|
84
|
+
# ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
|
85
|
+
# define PROTECTFUNC(f) ((VALUE (*)()) f)
|
86
|
+
# define VALUEFUNC(f) ((VALUE (*)()) f)
|
87
|
+
# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
|
88
|
+
# else /* These definitions should work for Ruby 1.7+ */
|
89
|
+
# define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
|
90
|
+
# define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
|
91
|
+
# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
|
92
|
+
# endif
|
93
|
+
# endif
|
94
|
+
#else
|
95
|
+
# define VALUEFUNC(f) (f)
|
96
|
+
# define VOIDFUNC(f) (f)
|
97
|
+
#endif
|
98
|
+
|
99
|
+
typedef struct {
|
100
|
+
VALUE klass;
|
101
|
+
VALUE mImpl;
|
102
|
+
void (*mark)(void *);
|
103
|
+
void (*destroy)(void *);
|
104
|
+
} swig_class;
|
105
|
+
|
106
|
+
/* Don't use for expressions have side effect */
|
107
|
+
#ifndef RB_STRING_VALUE
|
108
|
+
#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
|
109
|
+
#endif
|
110
|
+
#ifndef StringValue
|
111
|
+
#define StringValue(s) RB_STRING_VALUE(s)
|
112
|
+
#endif
|
113
|
+
#ifndef StringValuePtr
|
114
|
+
#define StringValuePtr(s) RSTRING(RB_STRING_VALUE(s))->ptr
|
115
|
+
#endif
|
116
|
+
#ifndef StringValueLen
|
117
|
+
#define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len
|
118
|
+
#endif
|
119
|
+
#ifndef SafeStringValue
|
120
|
+
#define SafeStringValue(v) do {\
|
121
|
+
StringValue(v);\
|
122
|
+
rb_check_safe_str(v);\
|
123
|
+
} while (0)
|
124
|
+
#endif
|
125
|
+
|
126
|
+
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
127
|
+
#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
|
128
|
+
#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
|
129
|
+
#endif
|
130
|
+
|
131
|
+
/* Contract support */
|
132
|
+
|
133
|
+
#define SWIG_contract_assert(expr, msg) if (!(expr)) { rb_raise(rb_eRuntimeError, (char *) msg ); } else
|
134
|
+
|
135
|
+
|
136
|
+
/***********************************************************************
|
137
|
+
* swigrun.swg
|
138
|
+
*
|
139
|
+
* This file contains generic CAPI SWIG runtime support for pointer
|
140
|
+
* type checking.
|
141
|
+
*
|
142
|
+
************************************************************************/
|
143
|
+
|
144
|
+
/* This should only be incremented when either the layout of swig_type_info changes,
|
145
|
+
or for whatever reason, the runtime changes incompatibly */
|
146
|
+
#define SWIG_RUNTIME_VERSION "1"
|
147
|
+
|
148
|
+
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
|
149
|
+
#ifdef SWIG_TYPE_TABLE
|
150
|
+
#define SWIG_QUOTE_STRING(x) #x
|
151
|
+
#define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
|
152
|
+
#define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
|
153
|
+
#else
|
154
|
+
#define SWIG_TYPE_TABLE_NAME
|
155
|
+
#endif
|
156
|
+
|
157
|
+
#include <string.h>
|
158
|
+
|
159
|
+
#ifndef SWIGINLINE
|
160
|
+
#if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
|
161
|
+
# define SWIGINLINE inline
|
162
|
+
#else
|
163
|
+
# define SWIGINLINE
|
164
|
+
#endif
|
165
|
+
#endif
|
166
|
+
|
167
|
+
/*
|
168
|
+
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
|
169
|
+
creating a static or dynamic library from the swig runtime code.
|
170
|
+
In 99.9% of the cases, swig just needs to declare them as 'static'.
|
171
|
+
|
172
|
+
But only do this if is strictly necessary, ie, if you have problems
|
173
|
+
with your compiler or so.
|
174
|
+
*/
|
175
|
+
#ifndef SWIGRUNTIME
|
176
|
+
#define SWIGRUNTIME static
|
177
|
+
#endif
|
178
|
+
#ifndef SWIGRUNTIMEINLINE
|
179
|
+
#define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
|
180
|
+
#endif
|
181
|
+
|
182
|
+
#ifdef __cplusplus
|
183
|
+
extern "C" {
|
184
|
+
#endif
|
185
|
+
|
186
|
+
typedef void *(*swig_converter_func)(void *);
|
187
|
+
typedef struct swig_type_info *(*swig_dycast_func)(void **);
|
188
|
+
|
189
|
+
typedef struct swig_type_info {
|
190
|
+
const char *name;
|
191
|
+
swig_converter_func converter;
|
192
|
+
const char *str;
|
193
|
+
void *clientdata;
|
194
|
+
swig_dycast_func dcast;
|
195
|
+
struct swig_type_info *next;
|
196
|
+
struct swig_type_info *prev;
|
197
|
+
} swig_type_info;
|
198
|
+
|
199
|
+
/*
|
200
|
+
Compare two type names skipping the space characters, therefore
|
201
|
+
"char*" == "char *" and "Class<int>" == "Class<int >", etc.
|
202
|
+
|
203
|
+
Return 0 when the two name types are equivalent, as in
|
204
|
+
strncmp, but skipping ' '.
|
205
|
+
*/
|
206
|
+
SWIGRUNTIME int
|
207
|
+
SWIG_TypeNameComp(const char *f1, const char *l1,
|
208
|
+
const char *f2, const char *l2) {
|
209
|
+
for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
|
210
|
+
while ((*f1 == ' ') && (f1 != l1)) ++f1;
|
211
|
+
while ((*f2 == ' ') && (f2 != l2)) ++f2;
|
212
|
+
if (*f1 != *f2) return *f1 - *f2;
|
213
|
+
}
|
214
|
+
return (l1 - f1) - (l2 - f2);
|
215
|
+
}
|
216
|
+
|
217
|
+
/*
|
218
|
+
Check type equivalence in a name list like <name1>|<name2>|...
|
219
|
+
*/
|
220
|
+
SWIGRUNTIME int
|
221
|
+
SWIG_TypeEquiv(const char *nb, const char *tb) {
|
222
|
+
int equiv = 0;
|
223
|
+
const char* te = tb + strlen(tb);
|
224
|
+
const char* ne = nb;
|
225
|
+
while (!equiv && *ne) {
|
226
|
+
for (nb = ne; *ne; ++ne) {
|
227
|
+
if (*ne == '|') break;
|
228
|
+
}
|
229
|
+
equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0;
|
230
|
+
if (*ne) ++ne;
|
231
|
+
}
|
232
|
+
return equiv;
|
233
|
+
}
|
234
|
+
|
235
|
+
/*
|
236
|
+
Register a type mapping with the type-checking
|
237
|
+
*/
|
238
|
+
SWIGRUNTIME swig_type_info *
|
239
|
+
SWIG_TypeRegisterTL(swig_type_info **tl, swig_type_info *ti) {
|
240
|
+
swig_type_info *tc, *head, *ret, *next;
|
241
|
+
/* Check to see if this type has already been registered */
|
242
|
+
tc = *tl;
|
243
|
+
while (tc) {
|
244
|
+
/* check simple type equivalence */
|
245
|
+
int typeequiv = (strcmp(tc->name, ti->name) == 0);
|
246
|
+
/* check full type equivalence, resolving typedefs */
|
247
|
+
if (!typeequiv) {
|
248
|
+
/* only if tc is not a typedef (no '|' on it) */
|
249
|
+
if (tc->str && ti->str && !strstr(tc->str,"|")) {
|
250
|
+
typeequiv = SWIG_TypeEquiv(ti->str,tc->str);
|
251
|
+
}
|
252
|
+
}
|
253
|
+
if (typeequiv) {
|
254
|
+
/* Already exists in the table. Just add additional types to the list */
|
255
|
+
if (ti->clientdata) tc->clientdata = ti->clientdata;
|
256
|
+
head = tc;
|
257
|
+
next = tc->next;
|
258
|
+
goto l1;
|
259
|
+
}
|
260
|
+
tc = tc->prev;
|
261
|
+
}
|
262
|
+
head = ti;
|
263
|
+
next = 0;
|
264
|
+
|
265
|
+
/* Place in list */
|
266
|
+
ti->prev = *tl;
|
267
|
+
*tl = ti;
|
268
|
+
|
269
|
+
/* Build linked lists */
|
270
|
+
l1:
|
271
|
+
ret = head;
|
272
|
+
tc = ti + 1;
|
273
|
+
/* Patch up the rest of the links */
|
274
|
+
while (tc->name) {
|
275
|
+
head->next = tc;
|
276
|
+
tc->prev = head;
|
277
|
+
head = tc;
|
278
|
+
tc++;
|
279
|
+
}
|
280
|
+
if (next) next->prev = head;
|
281
|
+
head->next = next;
|
282
|
+
|
283
|
+
return ret;
|
284
|
+
}
|
285
|
+
|
286
|
+
/*
|
287
|
+
Check the typename
|
288
|
+
*/
|
289
|
+
SWIGRUNTIME swig_type_info *
|
290
|
+
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
|
291
|
+
swig_type_info *s;
|
292
|
+
if (!ty) return 0; /* Void pointer */
|
293
|
+
s = ty->next; /* First element always just a name */
|
294
|
+
do {
|
295
|
+
if (strcmp(s->name,c) == 0) {
|
296
|
+
if (s == ty->next) return s;
|
297
|
+
/* Move s to the top of the linked list */
|
298
|
+
s->prev->next = s->next;
|
299
|
+
if (s->next) {
|
300
|
+
s->next->prev = s->prev;
|
301
|
+
}
|
302
|
+
/* Insert s as second element in the list */
|
303
|
+
s->next = ty->next;
|
304
|
+
if (ty->next) ty->next->prev = s;
|
305
|
+
ty->next = s;
|
306
|
+
s->prev = ty;
|
307
|
+
return s;
|
308
|
+
}
|
309
|
+
s = s->next;
|
310
|
+
} while (s && (s != ty->next));
|
311
|
+
return 0;
|
312
|
+
}
|
313
|
+
|
314
|
+
/*
|
315
|
+
Cast a pointer up an inheritance hierarchy
|
316
|
+
*/
|
317
|
+
SWIGRUNTIMEINLINE void *
|
318
|
+
SWIG_TypeCast(swig_type_info *ty, void *ptr) {
|
319
|
+
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
|
320
|
+
}
|
321
|
+
|
322
|
+
/*
|
323
|
+
Dynamic pointer casting. Down an inheritance hierarchy
|
324
|
+
*/
|
325
|
+
SWIGRUNTIME swig_type_info *
|
326
|
+
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
|
327
|
+
swig_type_info *lastty = ty;
|
328
|
+
if (!ty || !ty->dcast) return ty;
|
329
|
+
while (ty && (ty->dcast)) {
|
330
|
+
ty = (*ty->dcast)(ptr);
|
331
|
+
if (ty) lastty = ty;
|
332
|
+
}
|
333
|
+
return lastty;
|
334
|
+
}
|
335
|
+
|
336
|
+
/*
|
337
|
+
Return the name associated with this type
|
338
|
+
*/
|
339
|
+
SWIGRUNTIMEINLINE const char *
|
340
|
+
SWIG_TypeName(const swig_type_info *ty) {
|
341
|
+
return ty->name;
|
342
|
+
}
|
343
|
+
|
344
|
+
/*
|
345
|
+
Return the pretty name associated with this type,
|
346
|
+
that is an unmangled type name in a form presentable to the user.
|
347
|
+
*/
|
348
|
+
SWIGRUNTIME const char *
|
349
|
+
SWIG_TypePrettyName(const swig_type_info *type) {
|
350
|
+
/* The "str" field contains the equivalent pretty names of the
|
351
|
+
type, separated by vertical-bar characters. We choose
|
352
|
+
to print the last name, as it is often (?) the most
|
353
|
+
specific. */
|
354
|
+
if (type->str != NULL) {
|
355
|
+
const char *last_name = type->str;
|
356
|
+
const char *s;
|
357
|
+
for (s = type->str; *s; s++)
|
358
|
+
if (*s == '|') last_name = s+1;
|
359
|
+
return last_name;
|
360
|
+
}
|
361
|
+
else
|
362
|
+
return type->name;
|
363
|
+
}
|
364
|
+
|
365
|
+
/*
|
366
|
+
Search for a swig_type_info structure
|
367
|
+
*/
|
368
|
+
SWIGRUNTIME swig_type_info *
|
369
|
+
SWIG_TypeQueryTL(swig_type_info *tl, const char *name) {
|
370
|
+
swig_type_info *ty = tl;
|
371
|
+
while (ty) {
|
372
|
+
if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty;
|
373
|
+
if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
|
374
|
+
ty = ty->prev;
|
375
|
+
}
|
376
|
+
return 0;
|
377
|
+
}
|
378
|
+
|
379
|
+
/*
|
380
|
+
Set the clientdata field for a type
|
381
|
+
*/
|
382
|
+
SWIGRUNTIME void
|
383
|
+
SWIG_TypeClientDataTL(swig_type_info *tl, swig_type_info *ti, void *clientdata) {
|
384
|
+
swig_type_info *tc, *equiv;
|
385
|
+
if (ti->clientdata) return;
|
386
|
+
/* if (ti->clientdata == clientdata) return; */
|
387
|
+
ti->clientdata = clientdata;
|
388
|
+
equiv = ti->next;
|
389
|
+
while (equiv) {
|
390
|
+
if (!equiv->converter) {
|
391
|
+
tc = tl;
|
392
|
+
while (tc) {
|
393
|
+
if ((strcmp(tc->name, equiv->name) == 0))
|
394
|
+
SWIG_TypeClientDataTL(tl,tc,clientdata);
|
395
|
+
tc = tc->prev;
|
396
|
+
}
|
397
|
+
}
|
398
|
+
equiv = equiv->next;
|
399
|
+
}
|
400
|
+
}
|
401
|
+
|
402
|
+
/*
|
403
|
+
Pack binary data into a string
|
404
|
+
*/
|
405
|
+
SWIGRUNTIME char *
|
406
|
+
SWIG_PackData(char *c, void *ptr, size_t sz) {
|
407
|
+
static char hex[17] = "0123456789abcdef";
|
408
|
+
unsigned char *u = (unsigned char *) ptr;
|
409
|
+
const unsigned char *eu = u + sz;
|
410
|
+
register unsigned char uu;
|
411
|
+
for (; u != eu; ++u) {
|
412
|
+
uu = *u;
|
413
|
+
*(c++) = hex[(uu & 0xf0) >> 4];
|
414
|
+
*(c++) = hex[uu & 0xf];
|
415
|
+
}
|
416
|
+
return c;
|
417
|
+
}
|
418
|
+
|
419
|
+
/*
|
420
|
+
Unpack binary data from a string
|
421
|
+
*/
|
422
|
+
SWIGRUNTIME const char *
|
423
|
+
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
424
|
+
register unsigned char *u = (unsigned char *) ptr;
|
425
|
+
register const unsigned char *eu = u + sz;
|
426
|
+
for (; u != eu; ++u) {
|
427
|
+
register int d = *(c++);
|
428
|
+
register unsigned char uu = 0;
|
429
|
+
if ((d >= '0') && (d <= '9'))
|
430
|
+
uu = ((d - '0') << 4);
|
431
|
+
else if ((d >= 'a') && (d <= 'f'))
|
432
|
+
uu = ((d - ('a'-10)) << 4);
|
433
|
+
else
|
434
|
+
return (char *) 0;
|
435
|
+
d = *(c++);
|
436
|
+
if ((d >= '0') && (d <= '9'))
|
437
|
+
uu |= (d - '0');
|
438
|
+
else if ((d >= 'a') && (d <= 'f'))
|
439
|
+
uu |= (d - ('a'-10));
|
440
|
+
else
|
441
|
+
return (char *) 0;
|
442
|
+
*u = uu;
|
443
|
+
}
|
444
|
+
return c;
|
445
|
+
}
|
446
|
+
|
447
|
+
/*
|
448
|
+
This function will propagate the clientdata field of type to any new
|
449
|
+
swig_type_info structures that have been added into the list of
|
450
|
+
equivalent types. It is like calling SWIG_TypeClientData(type,
|
451
|
+
clientdata) a second time.
|
452
|
+
*/
|
453
|
+
SWIGRUNTIME void
|
454
|
+
SWIG_PropagateClientDataTL(swig_type_info *tl, swig_type_info *type) {
|
455
|
+
swig_type_info *equiv = type->next;
|
456
|
+
swig_type_info *tc;
|
457
|
+
if (!type->clientdata) return;
|
458
|
+
while (equiv) {
|
459
|
+
if (!equiv->converter) {
|
460
|
+
tc = tl;
|
461
|
+
while (tc) {
|
462
|
+
if ((strcmp(tc->name, equiv->name) == 0) && !tc->clientdata)
|
463
|
+
SWIG_TypeClientDataTL(tl,tc, type->clientdata);
|
464
|
+
tc = tc->prev;
|
465
|
+
}
|
466
|
+
}
|
467
|
+
equiv = equiv->next;
|
468
|
+
}
|
469
|
+
}
|
470
|
+
|
471
|
+
/*
|
472
|
+
Pack 'void *' into a string buffer.
|
473
|
+
*/
|
474
|
+
SWIGRUNTIME char *
|
475
|
+
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
|
476
|
+
char *r = buff;
|
477
|
+
if ((2*sizeof(void *) + 2) > bsz) return 0;
|
478
|
+
*(r++) = '_';
|
479
|
+
r = SWIG_PackData(r,&ptr,sizeof(void *));
|
480
|
+
if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
|
481
|
+
strcpy(r,name);
|
482
|
+
return buff;
|
483
|
+
}
|
484
|
+
|
485
|
+
SWIGRUNTIME const char *
|
486
|
+
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
|
487
|
+
if (*c != '_') {
|
488
|
+
if (strcmp(c,"NULL") == 0) {
|
489
|
+
*ptr = (void *) 0;
|
490
|
+
return name;
|
491
|
+
} else {
|
492
|
+
return 0;
|
493
|
+
}
|
494
|
+
}
|
495
|
+
return SWIG_UnpackData(++c,ptr,sizeof(void *));
|
496
|
+
}
|
497
|
+
|
498
|
+
SWIGRUNTIME char *
|
499
|
+
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
|
500
|
+
char *r = buff;
|
501
|
+
size_t lname = (name ? strlen(name) : 0);
|
502
|
+
if ((2*sz + 2 + lname) > bsz) return 0;
|
503
|
+
*(r++) = '_';
|
504
|
+
r = SWIG_PackData(r,ptr,sz);
|
505
|
+
if (lname) {
|
506
|
+
strncpy(r,name,lname+1);
|
507
|
+
} else {
|
508
|
+
*r = 0;
|
509
|
+
}
|
510
|
+
return buff;
|
511
|
+
}
|
512
|
+
|
513
|
+
SWIGRUNTIME const char *
|
514
|
+
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
515
|
+
if (*c != '_') {
|
516
|
+
if (strcmp(c,"NULL") == 0) {
|
517
|
+
memset(ptr,0,sz);
|
518
|
+
return name;
|
519
|
+
} else {
|
520
|
+
return 0;
|
521
|
+
}
|
522
|
+
}
|
523
|
+
return SWIG_UnpackData(++c,ptr,sz);
|
524
|
+
}
|
525
|
+
|
526
|
+
#ifdef __cplusplus
|
527
|
+
}
|
528
|
+
#endif
|
529
|
+
|
530
|
+
/***********************************************************************
|
531
|
+
* common.swg
|
532
|
+
*
|
533
|
+
* This file contains generic SWIG runtime support for pointer
|
534
|
+
* type checking as well as a few commonly used macros to control
|
535
|
+
* external linkage.
|
536
|
+
*
|
537
|
+
* Author : David Beazley (beazley@cs.uchicago.edu)
|
538
|
+
*
|
539
|
+
* Copyright (c) 1999-2000, The University of Chicago
|
540
|
+
*
|
541
|
+
* This file may be freely redistributed without license or fee provided
|
542
|
+
* this copyright message remains intact.
|
543
|
+
************************************************************************/
|
544
|
+
|
545
|
+
|
546
|
+
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
547
|
+
# if !defined(STATIC_LINKED)
|
548
|
+
# define SWIGEXPORT(a) __declspec(dllexport) a
|
549
|
+
# else
|
550
|
+
# define SWIGEXPORT(a) a
|
551
|
+
# endif
|
552
|
+
#else
|
553
|
+
# define SWIGEXPORT(a) a
|
554
|
+
#endif
|
555
|
+
|
556
|
+
#ifdef __cplusplus
|
557
|
+
extern "C" {
|
558
|
+
#endif
|
559
|
+
|
560
|
+
|
561
|
+
/*************************************************************************/
|
562
|
+
|
563
|
+
|
564
|
+
/* The static type info list */
|
565
|
+
|
566
|
+
static swig_type_info *swig_type_list = 0;
|
567
|
+
static swig_type_info **swig_type_list_handle = &swig_type_list;
|
568
|
+
|
569
|
+
|
570
|
+
/* Register a type mapping with the type-checking */
|
571
|
+
static swig_type_info *
|
572
|
+
SWIG_TypeRegister(swig_type_info *ti) {
|
573
|
+
return SWIG_TypeRegisterTL(swig_type_list_handle, ti);
|
574
|
+
}
|
575
|
+
|
576
|
+
/* Search for a swig_type_info structure */
|
577
|
+
static swig_type_info *
|
578
|
+
SWIG_TypeQuery(const char *name) {
|
579
|
+
return SWIG_TypeQueryTL(*swig_type_list_handle, name);
|
580
|
+
}
|
581
|
+
|
582
|
+
/* Set the clientdata field for a type */
|
583
|
+
static void
|
584
|
+
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
585
|
+
SWIG_TypeClientDataTL(*swig_type_list_handle, ti, clientdata);
|
586
|
+
}
|
587
|
+
|
588
|
+
/* This function will propagate the clientdata field of type to
|
589
|
+
* any new swig_type_info structures that have been added into the list
|
590
|
+
* of equivalent types. It is like calling
|
591
|
+
* SWIG_TypeClientData(type, clientdata) a second time.
|
592
|
+
*/
|
593
|
+
static void
|
594
|
+
SWIG_PropagateClientData(swig_type_info *type) {
|
595
|
+
SWIG_PropagateClientDataTL(*swig_type_list_handle, type);
|
596
|
+
}
|
597
|
+
|
598
|
+
#ifdef __cplusplus
|
599
|
+
}
|
600
|
+
#endif
|
601
|
+
|
602
|
+
/* Common SWIG API */
|
603
|
+
#define SWIG_ConvertPtr(obj, pp, type, flags) \
|
604
|
+
SWIG_Ruby_ConvertPtr(obj, pp, type, flags)
|
605
|
+
#define SWIG_NewPointerObj(p, type, flags) \
|
606
|
+
SWIG_Ruby_NewPointerObj(p, type, flags)
|
607
|
+
#define SWIG_MustGetPtr(p, type, argnum, flags) \
|
608
|
+
SWIG_Ruby_MustGetPtr(p, type, argnum, flags)
|
609
|
+
|
610
|
+
/* Ruby-specific SWIG API */
|
611
|
+
|
612
|
+
#define SWIG_InitRuntime() \
|
613
|
+
SWIG_Ruby_InitRuntime()
|
614
|
+
#define SWIG_define_class(ty) \
|
615
|
+
SWIG_Ruby_define_class(ty)
|
616
|
+
#define SWIG_NewClassInstance(value, ty) \
|
617
|
+
SWIG_Ruby_NewClassInstance(value, ty)
|
618
|
+
#define SWIG_MangleStr(value) \
|
619
|
+
SWIG_Ruby_MangleStr(value)
|
620
|
+
#define SWIG_CheckConvert(value, ty) \
|
621
|
+
SWIG_Ruby_CheckConvert(value, ty)
|
622
|
+
#define SWIG_NewPackedObj(ptr, sz, ty) \
|
623
|
+
SWIG_Ruby_NewPackedObj(ptr, sz, ty)
|
624
|
+
#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
|
625
|
+
SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
|
626
|
+
|
627
|
+
/* rubydef.swg */
|
628
|
+
#ifdef __cplusplus
|
629
|
+
extern "C" {
|
630
|
+
#endif
|
631
|
+
|
632
|
+
static VALUE _mSWIG = Qnil;
|
633
|
+
static VALUE _cSWIG_Pointer = Qnil;
|
634
|
+
static VALUE swig_runtime_data_type_pointer = Qnil;
|
635
|
+
|
636
|
+
/* Initialize Ruby runtime support */
|
637
|
+
static void
|
638
|
+
SWIG_Ruby_InitRuntime(void)
|
639
|
+
{
|
640
|
+
VALUE pointer;
|
641
|
+
|
642
|
+
if (_mSWIG == Qnil) {
|
643
|
+
_mSWIG = rb_define_module("SWIG");
|
644
|
+
}
|
645
|
+
|
646
|
+
/* first check if pointer already created */
|
647
|
+
pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
|
648
|
+
if (pointer != Qnil) {
|
649
|
+
Data_Get_Struct(pointer, swig_type_info *, swig_type_list_handle);
|
650
|
+
} else {
|
651
|
+
/* register a new class */
|
652
|
+
VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
|
653
|
+
/* create and store the structure pointer to a global variable */
|
654
|
+
swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, swig_type_list_handle);
|
655
|
+
rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
|
656
|
+
}
|
657
|
+
}
|
658
|
+
|
659
|
+
/* Define Ruby class for C type */
|
660
|
+
static void
|
661
|
+
SWIG_Ruby_define_class(swig_type_info *type)
|
662
|
+
{
|
663
|
+
VALUE klass;
|
664
|
+
char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
|
665
|
+
sprintf(klass_name, "TYPE%s", type->name);
|
666
|
+
if (NIL_P(_cSWIG_Pointer)) {
|
667
|
+
_cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
|
668
|
+
rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
|
669
|
+
}
|
670
|
+
klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
|
671
|
+
free((void *) klass_name);
|
672
|
+
}
|
673
|
+
|
674
|
+
/* Create a new pointer object */
|
675
|
+
static VALUE
|
676
|
+
SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int own)
|
677
|
+
{
|
678
|
+
char *klass_name;
|
679
|
+
swig_class *sklass;
|
680
|
+
VALUE klass;
|
681
|
+
VALUE obj;
|
682
|
+
|
683
|
+
if (!ptr)
|
684
|
+
return Qnil;
|
685
|
+
|
686
|
+
if (type->clientdata) {
|
687
|
+
sklass = (swig_class *) type->clientdata;
|
688
|
+
obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), (own ? VOIDFUNC(sklass->destroy) : 0), ptr);
|
689
|
+
} else {
|
690
|
+
klass_name = (char *) malloc(4 + strlen(type->name) + 1);
|
691
|
+
sprintf(klass_name, "TYPE%s", type->name);
|
692
|
+
klass = rb_const_get(_mSWIG, rb_intern(klass_name));
|
693
|
+
free((void *) klass_name);
|
694
|
+
obj = Data_Wrap_Struct(klass, 0, 0, ptr);
|
695
|
+
}
|
696
|
+
rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
|
697
|
+
return obj;
|
698
|
+
}
|
699
|
+
|
700
|
+
/* Create a new class instance (always owned) */
|
701
|
+
static VALUE
|
702
|
+
SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
|
703
|
+
{
|
704
|
+
VALUE obj;
|
705
|
+
swig_class *sklass = (swig_class *) type->clientdata;
|
706
|
+
obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
|
707
|
+
rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
|
708
|
+
return obj;
|
709
|
+
}
|
710
|
+
|
711
|
+
/* Get type mangle from class name */
|
712
|
+
static SWIGINLINE char *
|
713
|
+
SWIG_Ruby_MangleStr(VALUE obj)
|
714
|
+
{
|
715
|
+
VALUE stype = rb_iv_get(obj, "__swigtype__");
|
716
|
+
return StringValuePtr(stype);
|
717
|
+
}
|
718
|
+
|
719
|
+
/* Convert a pointer value */
|
720
|
+
static int
|
721
|
+
SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags)
|
722
|
+
{
|
723
|
+
char *c;
|
724
|
+
swig_type_info *tc;
|
725
|
+
|
726
|
+
/* Grab the pointer */
|
727
|
+
if (NIL_P(obj)) {
|
728
|
+
*ptr = 0;
|
729
|
+
return 0;
|
730
|
+
} else {
|
731
|
+
Data_Get_Struct(obj, void, *ptr);
|
732
|
+
}
|
733
|
+
|
734
|
+
/* Do type-checking if type info was provided */
|
735
|
+
if (ty) {
|
736
|
+
if (ty->clientdata) {
|
737
|
+
if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
|
738
|
+
if (*ptr == 0)
|
739
|
+
rb_raise(rb_eRuntimeError, "This %s already released", ty->str);
|
740
|
+
return 0;
|
741
|
+
}
|
742
|
+
}
|
743
|
+
if ((c = SWIG_MangleStr(obj)) == NULL) {
|
744
|
+
if (flags & SWIG_POINTER_EXCEPTION)
|
745
|
+
rb_raise(rb_eTypeError, "Expected %s", ty->str);
|
746
|
+
else
|
747
|
+
return -1;
|
748
|
+
}
|
749
|
+
tc = SWIG_TypeCheck(c, ty);
|
750
|
+
if (!tc) {
|
751
|
+
if (flags & SWIG_POINTER_EXCEPTION)
|
752
|
+
rb_raise(rb_eTypeError, "Expected %s", ty->str);
|
753
|
+
else
|
754
|
+
return -1;
|
755
|
+
}
|
756
|
+
*ptr = SWIG_TypeCast(tc, *ptr);
|
757
|
+
}
|
758
|
+
return 0;
|
759
|
+
}
|
760
|
+
|
761
|
+
/* Convert a pointer value, signal an exception on a type mismatch */
|
762
|
+
static SWIGINLINE void *
|
763
|
+
SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags)
|
764
|
+
{
|
765
|
+
void *result;
|
766
|
+
SWIG_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION);
|
767
|
+
return result;
|
768
|
+
}
|
769
|
+
|
770
|
+
/* Check convert */
|
771
|
+
static SWIGINLINE int
|
772
|
+
SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
|
773
|
+
{
|
774
|
+
char *c = SWIG_MangleStr(obj);
|
775
|
+
if (!c)
|
776
|
+
return 0;
|
777
|
+
return SWIG_TypeCheck(c,ty) != 0;
|
778
|
+
}
|
779
|
+
|
780
|
+
static VALUE
|
781
|
+
SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
|
782
|
+
char result[1024];
|
783
|
+
char *r = result;
|
784
|
+
if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
|
785
|
+
*(r++) = '_';
|
786
|
+
r = SWIG_PackData(r, ptr, sz);
|
787
|
+
strcpy(r, type->name);
|
788
|
+
return rb_str_new2(result);
|
789
|
+
}
|
790
|
+
|
791
|
+
/* Convert a packed value value */
|
792
|
+
static void
|
793
|
+
SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty, int flags) {
|
794
|
+
swig_type_info *tc;
|
795
|
+
const char *c;
|
796
|
+
|
797
|
+
if (TYPE(obj) != T_STRING) goto type_error;
|
798
|
+
c = StringValuePtr(obj);
|
799
|
+
/* Pointer values must start with leading underscore */
|
800
|
+
if (*c != '_') goto type_error;
|
801
|
+
c++;
|
802
|
+
c = SWIG_UnpackData(c, ptr, sz);
|
803
|
+
if (ty) {
|
804
|
+
tc = SWIG_TypeCheck(c, ty);
|
805
|
+
if (!tc) goto type_error;
|
806
|
+
}
|
807
|
+
return;
|
808
|
+
|
809
|
+
type_error:
|
810
|
+
|
811
|
+
if (flags) {
|
812
|
+
if (ty) {
|
813
|
+
rb_raise(rb_eTypeError, "Type error. Expected %s", ty->name);
|
814
|
+
} else {
|
815
|
+
rb_raise(rb_eTypeError, "Expected a pointer");
|
816
|
+
}
|
817
|
+
}
|
818
|
+
}
|
819
|
+
|
820
|
+
#ifdef __cplusplus
|
821
|
+
}
|
822
|
+
#endif
|
823
|
+
|
824
|
+
|
825
|
+
|
826
|
+
/* -------- TYPES TABLE (BEGIN) -------- */
|
827
|
+
|
828
|
+
#define SWIGTYPE_p_FILE swig_types[0]
|
829
|
+
#define SWIGTYPE_p_time_t swig_types[1]
|
830
|
+
#define SWIGTYPE_p_unsigned_long swig_types[2]
|
831
|
+
#define SWIGTYPE_p_u_PropValue1 swig_types[3]
|
832
|
+
#define SWIGTYPE_p_SWISH_HEADER_VALUE swig_types[4]
|
833
|
+
#define SWIGTYPE_p_p_char swig_types[5]
|
834
|
+
#define SWIGTYPE_p_PropType swig_types[6]
|
835
|
+
#define SWIGTYPE_p_SWISH_HEADER_TYPE swig_types[7]
|
836
|
+
#define SWIGTYPE_p_p_void swig_types[8]
|
837
|
+
#define SWIGTYPE_p_void swig_types[9]
|
838
|
+
#define SWIGTYPE_p_PropValue swig_types[10]
|
839
|
+
static swig_type_info *swig_types[12];
|
840
|
+
|
841
|
+
/* -------- TYPES TABLE (END) -------- */
|
842
|
+
|
843
|
+
#define SWIG_init Init_swishe_base
|
844
|
+
#define SWIG_name "Swishe_base"
|
845
|
+
|
846
|
+
static VALUE mSwishe_base;
|
847
|
+
|
848
|
+
static void SWIG_AsVal(VALUE obj, int *val)
|
849
|
+
{
|
850
|
+
*val = (int) NUM2INT(obj);
|
851
|
+
}
|
852
|
+
|
853
|
+
|
854
|
+
#include "stdio.h"
|
855
|
+
#include "swish-e.h"
|
856
|
+
|
857
|
+
|
858
|
+
|
859
|
+
swig_class cSWISH_HEADER_VALUE;
|
860
|
+
static void free_SWISH_HEADER_VALUE(SWISH_HEADER_VALUE *);
|
861
|
+
|
862
|
+
swig_class cU_PropValue1;
|
863
|
+
static void free_u_PropValue1(u_PropValue1 *);
|
864
|
+
|
865
|
+
swig_class cPropValue;
|
866
|
+
static void free_PropValue(PropValue *);
|
867
|
+
static VALUE
|
868
|
+
_wrap_SWISH_HEADER_VALUE_string_set(int argc, VALUE *argv, VALUE self) {
|
869
|
+
SWISH_HEADER_VALUE *arg1 = (SWISH_HEADER_VALUE *) 0 ;
|
870
|
+
char *arg2 = (char *) 0 ;
|
871
|
+
|
872
|
+
if ((argc < 1) || (argc > 1))
|
873
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
874
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_SWISH_HEADER_VALUE, 1);
|
875
|
+
arg2 = StringValuePtr(argv[0]);
|
876
|
+
{
|
877
|
+
if (arg2) {
|
878
|
+
arg1->string = (char const *) malloc(strlen(arg2)+1);
|
879
|
+
strcpy((char*)arg1->string,arg2);
|
880
|
+
} else {
|
881
|
+
arg1->string = 0;
|
882
|
+
}
|
883
|
+
}
|
884
|
+
return Qnil;
|
885
|
+
}
|
886
|
+
|
887
|
+
|
888
|
+
static VALUE
|
889
|
+
_wrap_SWISH_HEADER_VALUE_string_get(int argc, VALUE *argv, VALUE self) {
|
890
|
+
SWISH_HEADER_VALUE *arg1 = (SWISH_HEADER_VALUE *) 0 ;
|
891
|
+
char *result;
|
892
|
+
VALUE vresult = Qnil;
|
893
|
+
|
894
|
+
if ((argc < 0) || (argc > 0))
|
895
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
896
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_SWISH_HEADER_VALUE, 1);
|
897
|
+
result = (char *) ((arg1)->string);
|
898
|
+
|
899
|
+
vresult = rb_str_new2(result);
|
900
|
+
return vresult;
|
901
|
+
}
|
902
|
+
|
903
|
+
|
904
|
+
static VALUE
|
905
|
+
_wrap_SWISH_HEADER_VALUE_string_list_set(int argc, VALUE *argv, VALUE self) {
|
906
|
+
SWISH_HEADER_VALUE *arg1 = (SWISH_HEADER_VALUE *) 0 ;
|
907
|
+
char **arg2 = (char **) 0 ;
|
908
|
+
|
909
|
+
if ((argc < 1) || (argc > 1))
|
910
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
911
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_SWISH_HEADER_VALUE, 1);
|
912
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_p_char, 1);
|
913
|
+
if (arg1) (arg1)->string_list = (char const **)arg2;
|
914
|
+
|
915
|
+
return Qnil;
|
916
|
+
}
|
917
|
+
|
918
|
+
|
919
|
+
static VALUE
|
920
|
+
_wrap_SWISH_HEADER_VALUE_string_list_get(int argc, VALUE *argv, VALUE self) {
|
921
|
+
SWISH_HEADER_VALUE *arg1 = (SWISH_HEADER_VALUE *) 0 ;
|
922
|
+
char **result;
|
923
|
+
VALUE vresult = Qnil;
|
924
|
+
|
925
|
+
if ((argc < 0) || (argc > 0))
|
926
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
927
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_SWISH_HEADER_VALUE, 1);
|
928
|
+
result = (char **) ((arg1)->string_list);
|
929
|
+
|
930
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_p_char,0);
|
931
|
+
return vresult;
|
932
|
+
}
|
933
|
+
|
934
|
+
|
935
|
+
static VALUE
|
936
|
+
_wrap_SWISH_HEADER_VALUE_number_set(int argc, VALUE *argv, VALUE self) {
|
937
|
+
SWISH_HEADER_VALUE *arg1 = (SWISH_HEADER_VALUE *) 0 ;
|
938
|
+
unsigned long arg2 ;
|
939
|
+
|
940
|
+
if ((argc < 1) || (argc > 1))
|
941
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
942
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_SWISH_HEADER_VALUE, 1);
|
943
|
+
arg2 = NUM2ULONG(argv[0]);
|
944
|
+
if (arg1) (arg1)->number = arg2;
|
945
|
+
|
946
|
+
return Qnil;
|
947
|
+
}
|
948
|
+
|
949
|
+
|
950
|
+
static VALUE
|
951
|
+
_wrap_SWISH_HEADER_VALUE_number_get(int argc, VALUE *argv, VALUE self) {
|
952
|
+
SWISH_HEADER_VALUE *arg1 = (SWISH_HEADER_VALUE *) 0 ;
|
953
|
+
unsigned long result;
|
954
|
+
VALUE vresult = Qnil;
|
955
|
+
|
956
|
+
if ((argc < 0) || (argc > 0))
|
957
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
958
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_SWISH_HEADER_VALUE, 1);
|
959
|
+
result = (unsigned long) ((arg1)->number);
|
960
|
+
|
961
|
+
vresult = UINT2NUM(result);
|
962
|
+
return vresult;
|
963
|
+
}
|
964
|
+
|
965
|
+
|
966
|
+
static VALUE
|
967
|
+
_wrap_SWISH_HEADER_VALUE_boolean_set(int argc, VALUE *argv, VALUE self) {
|
968
|
+
SWISH_HEADER_VALUE *arg1 = (SWISH_HEADER_VALUE *) 0 ;
|
969
|
+
int arg2 ;
|
970
|
+
|
971
|
+
if ((argc < 1) || (argc > 1))
|
972
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
973
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_SWISH_HEADER_VALUE, 1);
|
974
|
+
arg2 = NUM2INT(argv[0]);
|
975
|
+
if (arg1) (arg1)->boolean = arg2;
|
976
|
+
|
977
|
+
return Qnil;
|
978
|
+
}
|
979
|
+
|
980
|
+
|
981
|
+
static VALUE
|
982
|
+
_wrap_SWISH_HEADER_VALUE_boolean_get(int argc, VALUE *argv, VALUE self) {
|
983
|
+
SWISH_HEADER_VALUE *arg1 = (SWISH_HEADER_VALUE *) 0 ;
|
984
|
+
int result;
|
985
|
+
VALUE vresult = Qnil;
|
986
|
+
|
987
|
+
if ((argc < 0) || (argc > 0))
|
988
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
989
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_SWISH_HEADER_VALUE, 1);
|
990
|
+
result = (int) ((arg1)->boolean);
|
991
|
+
|
992
|
+
vresult = INT2NUM(result);
|
993
|
+
return vresult;
|
994
|
+
}
|
995
|
+
|
996
|
+
|
997
|
+
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
998
|
+
static VALUE
|
999
|
+
_wrap_SWISH_HEADER_VALUE_allocate(VALUE self) {
|
1000
|
+
#else
|
1001
|
+
static VALUE
|
1002
|
+
_wrap_SWISH_HEADER_VALUE_allocate(int argc, VALUE *argv, VALUE self) {
|
1003
|
+
#endif
|
1004
|
+
|
1005
|
+
|
1006
|
+
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_SWISH_HEADER_VALUE);
|
1007
|
+
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
1008
|
+
rb_obj_call_init(vresult, argc, argv);
|
1009
|
+
#endif
|
1010
|
+
return vresult;
|
1011
|
+
}
|
1012
|
+
|
1013
|
+
|
1014
|
+
static VALUE
|
1015
|
+
_wrap_new_SWISH_HEADER_VALUE(int argc, VALUE *argv, VALUE self) {
|
1016
|
+
SWISH_HEADER_VALUE *result;
|
1017
|
+
|
1018
|
+
if ((argc < 0) || (argc > 0))
|
1019
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
1020
|
+
result = (SWISH_HEADER_VALUE *)(SWISH_HEADER_VALUE *) calloc(1, sizeof(SWISH_HEADER_VALUE));
|
1021
|
+
DATA_PTR(self) = result;
|
1022
|
+
return self;
|
1023
|
+
}
|
1024
|
+
|
1025
|
+
|
1026
|
+
static void
|
1027
|
+
free_SWISH_HEADER_VALUE(SWISH_HEADER_VALUE *arg1) {
|
1028
|
+
free((char *) arg1);
|
1029
|
+
}
|
1030
|
+
static VALUE
|
1031
|
+
_wrap_SwishHeaderNames(int argc, VALUE *argv, VALUE self) {
|
1032
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1033
|
+
char **result;
|
1034
|
+
VALUE vresult = Qnil;
|
1035
|
+
|
1036
|
+
if ((argc < 1) || (argc > 1))
|
1037
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1038
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1039
|
+
result = (char **)SwishHeaderNames(arg1);
|
1040
|
+
|
1041
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_p_char,0);
|
1042
|
+
return vresult;
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
|
1046
|
+
static VALUE
|
1047
|
+
_wrap_SwishIndexNames(int argc, VALUE *argv, VALUE self) {
|
1048
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1049
|
+
char **result;
|
1050
|
+
VALUE vresult = Qnil;
|
1051
|
+
|
1052
|
+
if ((argc < 1) || (argc > 1))
|
1053
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1054
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1055
|
+
result = (char **)SwishIndexNames(arg1);
|
1056
|
+
|
1057
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_p_char,0);
|
1058
|
+
return vresult;
|
1059
|
+
}
|
1060
|
+
|
1061
|
+
|
1062
|
+
static VALUE
|
1063
|
+
_wrap_SwishHeaderValue(int argc, VALUE *argv, VALUE self) {
|
1064
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1065
|
+
char *arg2 = (char *) 0 ;
|
1066
|
+
char *arg3 = (char *) 0 ;
|
1067
|
+
SWISH_HEADER_TYPE *arg4 = (SWISH_HEADER_TYPE *) 0 ;
|
1068
|
+
SWISH_HEADER_VALUE result;
|
1069
|
+
VALUE vresult = Qnil;
|
1070
|
+
|
1071
|
+
if ((argc < 4) || (argc > 4))
|
1072
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
|
1073
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1074
|
+
arg2 = StringValuePtr(argv[1]);
|
1075
|
+
arg3 = StringValuePtr(argv[2]);
|
1076
|
+
SWIG_ConvertPtr(argv[3], (void **) &arg4, SWIGTYPE_p_SWISH_HEADER_TYPE, 1);
|
1077
|
+
result = SwishHeaderValue(arg1,(char const *)arg2,(char const *)arg3,arg4);
|
1078
|
+
|
1079
|
+
{
|
1080
|
+
SWISH_HEADER_VALUE * resultptr;
|
1081
|
+
resultptr = (SWISH_HEADER_VALUE *) malloc(sizeof(SWISH_HEADER_VALUE));
|
1082
|
+
memmove(resultptr, &result, sizeof(SWISH_HEADER_VALUE));
|
1083
|
+
vresult = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_SWISH_HEADER_VALUE, 1);
|
1084
|
+
}
|
1085
|
+
return vresult;
|
1086
|
+
}
|
1087
|
+
|
1088
|
+
|
1089
|
+
static VALUE
|
1090
|
+
_wrap_SwishResultIndexValue(int argc, VALUE *argv, VALUE self) {
|
1091
|
+
SW_RESULT arg1 = (SW_RESULT) 0 ;
|
1092
|
+
char *arg2 = (char *) 0 ;
|
1093
|
+
SWISH_HEADER_TYPE *arg3 = (SWISH_HEADER_TYPE *) 0 ;
|
1094
|
+
SWISH_HEADER_VALUE result;
|
1095
|
+
VALUE vresult = Qnil;
|
1096
|
+
|
1097
|
+
if ((argc < 3) || (argc > 3))
|
1098
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
|
1099
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1100
|
+
arg2 = StringValuePtr(argv[1]);
|
1101
|
+
SWIG_ConvertPtr(argv[2], (void **) &arg3, SWIGTYPE_p_SWISH_HEADER_TYPE, 1);
|
1102
|
+
result = SwishResultIndexValue(arg1,(char const *)arg2,arg3);
|
1103
|
+
|
1104
|
+
{
|
1105
|
+
SWISH_HEADER_VALUE * resultptr;
|
1106
|
+
resultptr = (SWISH_HEADER_VALUE *) malloc(sizeof(SWISH_HEADER_VALUE));
|
1107
|
+
memmove(resultptr, &result, sizeof(SWISH_HEADER_VALUE));
|
1108
|
+
vresult = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_SWISH_HEADER_VALUE, 1);
|
1109
|
+
}
|
1110
|
+
return vresult;
|
1111
|
+
}
|
1112
|
+
|
1113
|
+
|
1114
|
+
static VALUE
|
1115
|
+
_wrap_SwishMetaList(int argc, VALUE *argv, VALUE self) {
|
1116
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1117
|
+
char *arg2 = (char *) 0 ;
|
1118
|
+
SWISH_META_LIST result;
|
1119
|
+
VALUE vresult = Qnil;
|
1120
|
+
|
1121
|
+
if ((argc < 2) || (argc > 2))
|
1122
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1123
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1124
|
+
arg2 = StringValuePtr(argv[1]);
|
1125
|
+
result = (SWISH_META_LIST)SwishMetaList(arg1,(char const *)arg2);
|
1126
|
+
|
1127
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_p_void,0);
|
1128
|
+
return vresult;
|
1129
|
+
}
|
1130
|
+
|
1131
|
+
|
1132
|
+
static VALUE
|
1133
|
+
_wrap_SwishPropertyList(int argc, VALUE *argv, VALUE self) {
|
1134
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1135
|
+
char *arg2 = (char *) 0 ;
|
1136
|
+
SWISH_META_LIST result;
|
1137
|
+
VALUE vresult = Qnil;
|
1138
|
+
|
1139
|
+
if ((argc < 2) || (argc > 2))
|
1140
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1141
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1142
|
+
arg2 = StringValuePtr(argv[1]);
|
1143
|
+
result = (SWISH_META_LIST)SwishPropertyList(arg1,(char const *)arg2);
|
1144
|
+
|
1145
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_p_void,0);
|
1146
|
+
return vresult;
|
1147
|
+
}
|
1148
|
+
|
1149
|
+
|
1150
|
+
static VALUE
|
1151
|
+
_wrap_SwishResultMetaList(int argc, VALUE *argv, VALUE self) {
|
1152
|
+
SW_RESULT arg1 = (SW_RESULT) 0 ;
|
1153
|
+
SWISH_META_LIST result;
|
1154
|
+
VALUE vresult = Qnil;
|
1155
|
+
|
1156
|
+
if ((argc < 1) || (argc > 1))
|
1157
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1158
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1159
|
+
result = (SWISH_META_LIST)SwishResultMetaList(arg1);
|
1160
|
+
|
1161
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_p_void,0);
|
1162
|
+
return vresult;
|
1163
|
+
}
|
1164
|
+
|
1165
|
+
|
1166
|
+
static VALUE
|
1167
|
+
_wrap_SwishResultPropertyList(int argc, VALUE *argv, VALUE self) {
|
1168
|
+
SW_RESULT arg1 = (SW_RESULT) 0 ;
|
1169
|
+
SWISH_META_LIST result;
|
1170
|
+
VALUE vresult = Qnil;
|
1171
|
+
|
1172
|
+
if ((argc < 1) || (argc > 1))
|
1173
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1174
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1175
|
+
result = (SWISH_META_LIST)SwishResultPropertyList(arg1);
|
1176
|
+
|
1177
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_p_void,0);
|
1178
|
+
return vresult;
|
1179
|
+
}
|
1180
|
+
|
1181
|
+
|
1182
|
+
static VALUE
|
1183
|
+
_wrap_SwishMetaName(int argc, VALUE *argv, VALUE self) {
|
1184
|
+
SW_META arg1 = (SW_META) 0 ;
|
1185
|
+
char *result;
|
1186
|
+
VALUE vresult = Qnil;
|
1187
|
+
|
1188
|
+
if ((argc < 1) || (argc > 1))
|
1189
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1190
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1191
|
+
result = (char *)SwishMetaName(arg1);
|
1192
|
+
|
1193
|
+
vresult = rb_str_new2(result);
|
1194
|
+
return vresult;
|
1195
|
+
}
|
1196
|
+
|
1197
|
+
|
1198
|
+
static VALUE
|
1199
|
+
_wrap_SwishMetaType(int argc, VALUE *argv, VALUE self) {
|
1200
|
+
SW_META arg1 = (SW_META) 0 ;
|
1201
|
+
int result;
|
1202
|
+
VALUE vresult = Qnil;
|
1203
|
+
|
1204
|
+
if ((argc < 1) || (argc > 1))
|
1205
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1206
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1207
|
+
result = (int)SwishMetaType(arg1);
|
1208
|
+
|
1209
|
+
vresult = INT2NUM(result);
|
1210
|
+
return vresult;
|
1211
|
+
}
|
1212
|
+
|
1213
|
+
|
1214
|
+
static VALUE
|
1215
|
+
_wrap_SwishMetaID(int argc, VALUE *argv, VALUE self) {
|
1216
|
+
SW_META arg1 = (SW_META) 0 ;
|
1217
|
+
int result;
|
1218
|
+
VALUE vresult = Qnil;
|
1219
|
+
|
1220
|
+
if ((argc < 1) || (argc > 1))
|
1221
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1222
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1223
|
+
result = (int)SwishMetaID(arg1);
|
1224
|
+
|
1225
|
+
vresult = INT2NUM(result);
|
1226
|
+
return vresult;
|
1227
|
+
}
|
1228
|
+
|
1229
|
+
|
1230
|
+
static VALUE
|
1231
|
+
_wrap_SwishInit(int argc, VALUE *argv, VALUE self) {
|
1232
|
+
char *arg1 = (char *) 0 ;
|
1233
|
+
SW_HANDLE result;
|
1234
|
+
VALUE vresult = Qnil;
|
1235
|
+
|
1236
|
+
if ((argc < 1) || (argc > 1))
|
1237
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1238
|
+
arg1 = StringValuePtr(argv[0]);
|
1239
|
+
result = (SW_HANDLE)SwishInit(arg1);
|
1240
|
+
|
1241
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1242
|
+
return vresult;
|
1243
|
+
}
|
1244
|
+
|
1245
|
+
|
1246
|
+
static VALUE
|
1247
|
+
_wrap_SwishQuery(int argc, VALUE *argv, VALUE self) {
|
1248
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1249
|
+
char *arg2 = (char *) 0 ;
|
1250
|
+
SW_RESULTS result;
|
1251
|
+
VALUE vresult = Qnil;
|
1252
|
+
|
1253
|
+
if ((argc < 2) || (argc > 2))
|
1254
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1255
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1256
|
+
arg2 = StringValuePtr(argv[1]);
|
1257
|
+
result = (SW_RESULTS)SwishQuery(arg1,arg2);
|
1258
|
+
|
1259
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1260
|
+
return vresult;
|
1261
|
+
}
|
1262
|
+
|
1263
|
+
|
1264
|
+
static VALUE
|
1265
|
+
_wrap_New_Search_Object(int argc, VALUE *argv, VALUE self) {
|
1266
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1267
|
+
char *arg2 = (char *) 0 ;
|
1268
|
+
SW_SEARCH result;
|
1269
|
+
VALUE vresult = Qnil;
|
1270
|
+
|
1271
|
+
if ((argc < 2) || (argc > 2))
|
1272
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1273
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1274
|
+
arg2 = StringValuePtr(argv[1]);
|
1275
|
+
result = (SW_SEARCH)New_Search_Object(arg1,arg2);
|
1276
|
+
|
1277
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1278
|
+
return vresult;
|
1279
|
+
}
|
1280
|
+
|
1281
|
+
|
1282
|
+
static VALUE
|
1283
|
+
_wrap_SwishRankScheme(int argc, VALUE *argv, VALUE self) {
|
1284
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1285
|
+
int arg2 ;
|
1286
|
+
|
1287
|
+
if ((argc < 2) || (argc > 2))
|
1288
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1289
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1290
|
+
arg2 = NUM2INT(argv[1]);
|
1291
|
+
SwishRankScheme(arg1,arg2);
|
1292
|
+
|
1293
|
+
return Qnil;
|
1294
|
+
}
|
1295
|
+
|
1296
|
+
|
1297
|
+
static VALUE
|
1298
|
+
_wrap_SwishSetRefPtr(int argc, VALUE *argv, VALUE self) {
|
1299
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1300
|
+
void *arg2 = (void *) 0 ;
|
1301
|
+
|
1302
|
+
if ((argc < 2) || (argc > 2))
|
1303
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1304
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1305
|
+
SWIG_ConvertPtr(argv[1], (void **) &arg2, 0, 1);
|
1306
|
+
SwishSetRefPtr(arg1,arg2);
|
1307
|
+
|
1308
|
+
return Qnil;
|
1309
|
+
}
|
1310
|
+
|
1311
|
+
|
1312
|
+
static VALUE
|
1313
|
+
_wrap_SwishGetRefPtr(int argc, VALUE *argv, VALUE self) {
|
1314
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1315
|
+
void *result;
|
1316
|
+
VALUE vresult = Qnil;
|
1317
|
+
|
1318
|
+
if ((argc < 1) || (argc > 1))
|
1319
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1320
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1321
|
+
result = (void *)SwishGetRefPtr(arg1);
|
1322
|
+
|
1323
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1324
|
+
return vresult;
|
1325
|
+
}
|
1326
|
+
|
1327
|
+
|
1328
|
+
static VALUE
|
1329
|
+
_wrap_SwishSearch_parent(int argc, VALUE *argv, VALUE self) {
|
1330
|
+
SW_SEARCH arg1 = (SW_SEARCH) 0 ;
|
1331
|
+
void *result;
|
1332
|
+
VALUE vresult = Qnil;
|
1333
|
+
|
1334
|
+
if ((argc < 1) || (argc > 1))
|
1335
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1336
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1337
|
+
result = (void *)SwishSearch_parent(arg1);
|
1338
|
+
|
1339
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1340
|
+
return vresult;
|
1341
|
+
}
|
1342
|
+
|
1343
|
+
|
1344
|
+
static VALUE
|
1345
|
+
_wrap_SwishResults_parent(int argc, VALUE *argv, VALUE self) {
|
1346
|
+
SW_RESULTS arg1 = (SW_RESULTS) 0 ;
|
1347
|
+
void *result;
|
1348
|
+
VALUE vresult = Qnil;
|
1349
|
+
|
1350
|
+
if ((argc < 1) || (argc > 1))
|
1351
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1352
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1353
|
+
result = (void *)SwishResults_parent(arg1);
|
1354
|
+
|
1355
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1356
|
+
return vresult;
|
1357
|
+
}
|
1358
|
+
|
1359
|
+
|
1360
|
+
static VALUE
|
1361
|
+
_wrap_SwishResult_parent(int argc, VALUE *argv, VALUE self) {
|
1362
|
+
SW_RESULT arg1 = (SW_RESULT) 0 ;
|
1363
|
+
void *result;
|
1364
|
+
VALUE vresult = Qnil;
|
1365
|
+
|
1366
|
+
if ((argc < 1) || (argc > 1))
|
1367
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1368
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1369
|
+
result = (void *)SwishResult_parent(arg1);
|
1370
|
+
|
1371
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1372
|
+
return vresult;
|
1373
|
+
}
|
1374
|
+
|
1375
|
+
|
1376
|
+
static VALUE
|
1377
|
+
_wrap_ResultsSetRefPtr(int argc, VALUE *argv, VALUE self) {
|
1378
|
+
SW_RESULTS arg1 = (SW_RESULTS) 0 ;
|
1379
|
+
void *arg2 = (void *) 0 ;
|
1380
|
+
|
1381
|
+
if ((argc < 2) || (argc > 2))
|
1382
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1383
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1384
|
+
SWIG_ConvertPtr(argv[1], (void **) &arg2, 0, 1);
|
1385
|
+
ResultsSetRefPtr(arg1,arg2);
|
1386
|
+
|
1387
|
+
return Qnil;
|
1388
|
+
}
|
1389
|
+
|
1390
|
+
|
1391
|
+
static VALUE
|
1392
|
+
_wrap_SwishSetStructure(int argc, VALUE *argv, VALUE self) {
|
1393
|
+
SW_SEARCH arg1 = (SW_SEARCH) 0 ;
|
1394
|
+
int arg2 ;
|
1395
|
+
|
1396
|
+
if ((argc < 2) || (argc > 2))
|
1397
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1398
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1399
|
+
arg2 = NUM2INT(argv[1]);
|
1400
|
+
SwishSetStructure(arg1,arg2);
|
1401
|
+
|
1402
|
+
return Qnil;
|
1403
|
+
}
|
1404
|
+
|
1405
|
+
|
1406
|
+
static VALUE
|
1407
|
+
_wrap_SwishPhraseDelimiter(int argc, VALUE *argv, VALUE self) {
|
1408
|
+
SW_SEARCH arg1 = (SW_SEARCH) 0 ;
|
1409
|
+
char arg2 ;
|
1410
|
+
|
1411
|
+
if ((argc < 2) || (argc > 2))
|
1412
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1413
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1414
|
+
arg2 = NUM2CHR(argv[1]);
|
1415
|
+
SwishPhraseDelimiter(arg1,arg2);
|
1416
|
+
|
1417
|
+
return Qnil;
|
1418
|
+
}
|
1419
|
+
|
1420
|
+
|
1421
|
+
static VALUE
|
1422
|
+
_wrap_SwishSetSort(int argc, VALUE *argv, VALUE self) {
|
1423
|
+
SW_SEARCH arg1 = (SW_SEARCH) 0 ;
|
1424
|
+
char *arg2 = (char *) 0 ;
|
1425
|
+
|
1426
|
+
if ((argc < 2) || (argc > 2))
|
1427
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1428
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1429
|
+
arg2 = StringValuePtr(argv[1]);
|
1430
|
+
SwishSetSort(arg1,arg2);
|
1431
|
+
|
1432
|
+
return Qnil;
|
1433
|
+
}
|
1434
|
+
|
1435
|
+
|
1436
|
+
static VALUE
|
1437
|
+
_wrap_SwishSetQuery(int argc, VALUE *argv, VALUE self) {
|
1438
|
+
SW_SEARCH arg1 = (SW_SEARCH) 0 ;
|
1439
|
+
char *arg2 = (char *) 0 ;
|
1440
|
+
|
1441
|
+
if ((argc < 2) || (argc > 2))
|
1442
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1443
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1444
|
+
arg2 = StringValuePtr(argv[1]);
|
1445
|
+
SwishSetQuery(arg1,arg2);
|
1446
|
+
|
1447
|
+
return Qnil;
|
1448
|
+
}
|
1449
|
+
|
1450
|
+
|
1451
|
+
static VALUE
|
1452
|
+
_wrap_SwishSetSearchLimit(int argc, VALUE *argv, VALUE self) {
|
1453
|
+
SW_SEARCH arg1 = (SW_SEARCH) 0 ;
|
1454
|
+
char *arg2 = (char *) 0 ;
|
1455
|
+
char *arg3 = (char *) 0 ;
|
1456
|
+
char *arg4 = (char *) 0 ;
|
1457
|
+
int result;
|
1458
|
+
VALUE vresult = Qnil;
|
1459
|
+
|
1460
|
+
if ((argc < 4) || (argc > 4))
|
1461
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
|
1462
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1463
|
+
arg2 = StringValuePtr(argv[1]);
|
1464
|
+
arg3 = StringValuePtr(argv[2]);
|
1465
|
+
arg4 = StringValuePtr(argv[3]);
|
1466
|
+
result = (int)SwishSetSearchLimit(arg1,arg2,arg3,arg4);
|
1467
|
+
|
1468
|
+
vresult = INT2NUM(result);
|
1469
|
+
return vresult;
|
1470
|
+
}
|
1471
|
+
|
1472
|
+
|
1473
|
+
static VALUE
|
1474
|
+
_wrap_SwishResetSearchLimit(int argc, VALUE *argv, VALUE self) {
|
1475
|
+
SW_SEARCH arg1 = (SW_SEARCH) 0 ;
|
1476
|
+
|
1477
|
+
if ((argc < 1) || (argc > 1))
|
1478
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1479
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1480
|
+
SwishResetSearchLimit(arg1);
|
1481
|
+
|
1482
|
+
return Qnil;
|
1483
|
+
}
|
1484
|
+
|
1485
|
+
|
1486
|
+
static VALUE
|
1487
|
+
_wrap_SwishExecute(int argc, VALUE *argv, VALUE self) {
|
1488
|
+
SW_SEARCH arg1 = (SW_SEARCH) 0 ;
|
1489
|
+
char *arg2 = (char *) 0 ;
|
1490
|
+
SW_RESULTS result;
|
1491
|
+
VALUE vresult = Qnil;
|
1492
|
+
|
1493
|
+
if ((argc < 2) || (argc > 2))
|
1494
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1495
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1496
|
+
arg2 = StringValuePtr(argv[1]);
|
1497
|
+
result = (SW_RESULTS)SwishExecute(arg1,arg2);
|
1498
|
+
|
1499
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1500
|
+
return vresult;
|
1501
|
+
}
|
1502
|
+
|
1503
|
+
|
1504
|
+
static VALUE
|
1505
|
+
_wrap_SwishHits(int argc, VALUE *argv, VALUE self) {
|
1506
|
+
SW_RESULTS arg1 = (SW_RESULTS) 0 ;
|
1507
|
+
int result;
|
1508
|
+
VALUE vresult = Qnil;
|
1509
|
+
|
1510
|
+
if ((argc < 1) || (argc > 1))
|
1511
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1512
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1513
|
+
result = (int)SwishHits(arg1);
|
1514
|
+
|
1515
|
+
vresult = INT2NUM(result);
|
1516
|
+
return vresult;
|
1517
|
+
}
|
1518
|
+
|
1519
|
+
|
1520
|
+
static VALUE
|
1521
|
+
_wrap_SwishParsedWords(int argc, VALUE *argv, VALUE self) {
|
1522
|
+
SW_RESULTS arg1 = (SW_RESULTS) 0 ;
|
1523
|
+
char *arg2 = (char *) 0 ;
|
1524
|
+
SWISH_HEADER_VALUE result;
|
1525
|
+
VALUE vresult = Qnil;
|
1526
|
+
|
1527
|
+
if ((argc < 2) || (argc > 2))
|
1528
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1529
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1530
|
+
arg2 = StringValuePtr(argv[1]);
|
1531
|
+
result = SwishParsedWords(arg1,(char const *)arg2);
|
1532
|
+
|
1533
|
+
{
|
1534
|
+
SWISH_HEADER_VALUE * resultptr;
|
1535
|
+
resultptr = (SWISH_HEADER_VALUE *) malloc(sizeof(SWISH_HEADER_VALUE));
|
1536
|
+
memmove(resultptr, &result, sizeof(SWISH_HEADER_VALUE));
|
1537
|
+
vresult = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_SWISH_HEADER_VALUE, 1);
|
1538
|
+
}
|
1539
|
+
return vresult;
|
1540
|
+
}
|
1541
|
+
|
1542
|
+
|
1543
|
+
static VALUE
|
1544
|
+
_wrap_SwishRemovedStopwords(int argc, VALUE *argv, VALUE self) {
|
1545
|
+
SW_RESULTS arg1 = (SW_RESULTS) 0 ;
|
1546
|
+
char *arg2 = (char *) 0 ;
|
1547
|
+
SWISH_HEADER_VALUE result;
|
1548
|
+
VALUE vresult = Qnil;
|
1549
|
+
|
1550
|
+
if ((argc < 2) || (argc > 2))
|
1551
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1552
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1553
|
+
arg2 = StringValuePtr(argv[1]);
|
1554
|
+
result = SwishRemovedStopwords(arg1,(char const *)arg2);
|
1555
|
+
|
1556
|
+
{
|
1557
|
+
SWISH_HEADER_VALUE * resultptr;
|
1558
|
+
resultptr = (SWISH_HEADER_VALUE *) malloc(sizeof(SWISH_HEADER_VALUE));
|
1559
|
+
memmove(resultptr, &result, sizeof(SWISH_HEADER_VALUE));
|
1560
|
+
vresult = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_SWISH_HEADER_VALUE, 1);
|
1561
|
+
}
|
1562
|
+
return vresult;
|
1563
|
+
}
|
1564
|
+
|
1565
|
+
|
1566
|
+
static VALUE
|
1567
|
+
_wrap_SwishSeekResult(int argc, VALUE *argv, VALUE self) {
|
1568
|
+
SW_RESULTS arg1 = (SW_RESULTS) 0 ;
|
1569
|
+
int arg2 ;
|
1570
|
+
int result;
|
1571
|
+
VALUE vresult = Qnil;
|
1572
|
+
|
1573
|
+
if ((argc < 2) || (argc > 2))
|
1574
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1575
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1576
|
+
arg2 = NUM2INT(argv[1]);
|
1577
|
+
result = (int)SwishSeekResult(arg1,arg2);
|
1578
|
+
|
1579
|
+
vresult = INT2NUM(result);
|
1580
|
+
return vresult;
|
1581
|
+
}
|
1582
|
+
|
1583
|
+
|
1584
|
+
static VALUE
|
1585
|
+
_wrap_SwishNextResult(int argc, VALUE *argv, VALUE self) {
|
1586
|
+
SW_RESULTS arg1 = (SW_RESULTS) 0 ;
|
1587
|
+
SW_RESULT result;
|
1588
|
+
VALUE vresult = Qnil;
|
1589
|
+
|
1590
|
+
if ((argc < 1) || (argc > 1))
|
1591
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1592
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1593
|
+
result = (SW_RESULT)SwishNextResult(arg1);
|
1594
|
+
|
1595
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1596
|
+
return vresult;
|
1597
|
+
}
|
1598
|
+
|
1599
|
+
|
1600
|
+
static VALUE
|
1601
|
+
_wrap_SwishResultPropertyStr(int argc, VALUE *argv, VALUE self) {
|
1602
|
+
SW_RESULT arg1 = (SW_RESULT) 0 ;
|
1603
|
+
char *arg2 = (char *) 0 ;
|
1604
|
+
char *result;
|
1605
|
+
VALUE vresult = Qnil;
|
1606
|
+
|
1607
|
+
if ((argc < 2) || (argc > 2))
|
1608
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1609
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1610
|
+
arg2 = StringValuePtr(argv[1]);
|
1611
|
+
result = (char *)SwishResultPropertyStr(arg1,arg2);
|
1612
|
+
|
1613
|
+
vresult = rb_str_new2(result);
|
1614
|
+
return vresult;
|
1615
|
+
}
|
1616
|
+
|
1617
|
+
|
1618
|
+
static VALUE
|
1619
|
+
_wrap_SwishResultPropertyULong(int argc, VALUE *argv, VALUE self) {
|
1620
|
+
SW_RESULT arg1 = (SW_RESULT) 0 ;
|
1621
|
+
char *arg2 = (char *) 0 ;
|
1622
|
+
unsigned long result;
|
1623
|
+
VALUE vresult = Qnil;
|
1624
|
+
|
1625
|
+
if ((argc < 2) || (argc > 2))
|
1626
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1627
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1628
|
+
arg2 = StringValuePtr(argv[1]);
|
1629
|
+
result = (unsigned long)SwishResultPropertyULong(arg1,arg2);
|
1630
|
+
|
1631
|
+
vresult = UINT2NUM(result);
|
1632
|
+
return vresult;
|
1633
|
+
}
|
1634
|
+
|
1635
|
+
|
1636
|
+
static VALUE
|
1637
|
+
_wrap_SW_ResultToSW_HANDLE(int argc, VALUE *argv, VALUE self) {
|
1638
|
+
SW_RESULT arg1 = (SW_RESULT) 0 ;
|
1639
|
+
SW_HANDLE result;
|
1640
|
+
VALUE vresult = Qnil;
|
1641
|
+
|
1642
|
+
if ((argc < 1) || (argc > 1))
|
1643
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1644
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1645
|
+
result = (SW_HANDLE)SW_ResultToSW_HANDLE(arg1);
|
1646
|
+
|
1647
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1648
|
+
return vresult;
|
1649
|
+
}
|
1650
|
+
|
1651
|
+
|
1652
|
+
static VALUE
|
1653
|
+
_wrap_SW_ResultsToSW_HANDLE(int argc, VALUE *argv, VALUE self) {
|
1654
|
+
SW_RESULTS arg1 = (SW_RESULTS) 0 ;
|
1655
|
+
SW_HANDLE result;
|
1656
|
+
VALUE vresult = Qnil;
|
1657
|
+
|
1658
|
+
if ((argc < 1) || (argc > 1))
|
1659
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1660
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1661
|
+
result = (SW_HANDLE)SW_ResultsToSW_HANDLE(arg1);
|
1662
|
+
|
1663
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1664
|
+
return vresult;
|
1665
|
+
}
|
1666
|
+
|
1667
|
+
|
1668
|
+
static VALUE
|
1669
|
+
_wrap_Free_Search_Object(int argc, VALUE *argv, VALUE self) {
|
1670
|
+
SW_SEARCH arg1 = (SW_SEARCH) 0 ;
|
1671
|
+
|
1672
|
+
if ((argc < 1) || (argc > 1))
|
1673
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1674
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1675
|
+
Free_Search_Object(arg1);
|
1676
|
+
|
1677
|
+
return Qnil;
|
1678
|
+
}
|
1679
|
+
|
1680
|
+
|
1681
|
+
static VALUE
|
1682
|
+
_wrap_Free_Results_Object(int argc, VALUE *argv, VALUE self) {
|
1683
|
+
SW_RESULTS arg1 = (SW_RESULTS) 0 ;
|
1684
|
+
|
1685
|
+
if ((argc < 1) || (argc > 1))
|
1686
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1687
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1688
|
+
Free_Results_Object(arg1);
|
1689
|
+
|
1690
|
+
return Qnil;
|
1691
|
+
}
|
1692
|
+
|
1693
|
+
|
1694
|
+
static VALUE
|
1695
|
+
_wrap_SwishClose(int argc, VALUE *argv, VALUE self) {
|
1696
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1697
|
+
|
1698
|
+
if ((argc < 1) || (argc > 1))
|
1699
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1700
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1701
|
+
SwishClose(arg1);
|
1702
|
+
|
1703
|
+
return Qnil;
|
1704
|
+
}
|
1705
|
+
|
1706
|
+
|
1707
|
+
static VALUE
|
1708
|
+
_wrap_SwishError(int argc, VALUE *argv, VALUE self) {
|
1709
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1710
|
+
int result;
|
1711
|
+
VALUE vresult = Qnil;
|
1712
|
+
|
1713
|
+
if ((argc < 1) || (argc > 1))
|
1714
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1715
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1716
|
+
result = (int)SwishError(arg1);
|
1717
|
+
|
1718
|
+
vresult = INT2NUM(result);
|
1719
|
+
return vresult;
|
1720
|
+
}
|
1721
|
+
|
1722
|
+
|
1723
|
+
static VALUE
|
1724
|
+
_wrap_SwishCriticalError(int argc, VALUE *argv, VALUE self) {
|
1725
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1726
|
+
int result;
|
1727
|
+
VALUE vresult = Qnil;
|
1728
|
+
|
1729
|
+
if ((argc < 1) || (argc > 1))
|
1730
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1731
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1732
|
+
result = (int)SwishCriticalError(arg1);
|
1733
|
+
|
1734
|
+
vresult = INT2NUM(result);
|
1735
|
+
return vresult;
|
1736
|
+
}
|
1737
|
+
|
1738
|
+
|
1739
|
+
static VALUE
|
1740
|
+
_wrap_SwishAbortLastError(int argc, VALUE *argv, VALUE self) {
|
1741
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1742
|
+
|
1743
|
+
if ((argc < 1) || (argc > 1))
|
1744
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1745
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1746
|
+
SwishAbortLastError(arg1);
|
1747
|
+
|
1748
|
+
return Qnil;
|
1749
|
+
}
|
1750
|
+
|
1751
|
+
|
1752
|
+
static VALUE
|
1753
|
+
_wrap_SwishErrorString(int argc, VALUE *argv, VALUE self) {
|
1754
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1755
|
+
char *result;
|
1756
|
+
VALUE vresult = Qnil;
|
1757
|
+
|
1758
|
+
if ((argc < 1) || (argc > 1))
|
1759
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1760
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1761
|
+
result = (char *)SwishErrorString(arg1);
|
1762
|
+
|
1763
|
+
vresult = rb_str_new2(result);
|
1764
|
+
return vresult;
|
1765
|
+
}
|
1766
|
+
|
1767
|
+
|
1768
|
+
static VALUE
|
1769
|
+
_wrap_SwishLastErrorMsg(int argc, VALUE *argv, VALUE self) {
|
1770
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1771
|
+
char *result;
|
1772
|
+
VALUE vresult = Qnil;
|
1773
|
+
|
1774
|
+
if ((argc < 1) || (argc > 1))
|
1775
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1776
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1777
|
+
result = (char *)SwishLastErrorMsg(arg1);
|
1778
|
+
|
1779
|
+
vresult = rb_str_new2(result);
|
1780
|
+
return vresult;
|
1781
|
+
}
|
1782
|
+
|
1783
|
+
|
1784
|
+
static VALUE
|
1785
|
+
_wrap_set_error_handle(int argc, VALUE *argv, VALUE self) {
|
1786
|
+
FILE *arg1 = (FILE *) 0 ;
|
1787
|
+
|
1788
|
+
if ((argc < 1) || (argc > 1))
|
1789
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1790
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_FILE, 1);
|
1791
|
+
set_error_handle(arg1);
|
1792
|
+
|
1793
|
+
return Qnil;
|
1794
|
+
}
|
1795
|
+
|
1796
|
+
|
1797
|
+
static VALUE
|
1798
|
+
_wrap_SwishErrorsToStderr(int argc, VALUE *argv, VALUE self) {
|
1799
|
+
if ((argc < 0) || (argc > 0))
|
1800
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
1801
|
+
SwishErrorsToStderr();
|
1802
|
+
|
1803
|
+
return Qnil;
|
1804
|
+
}
|
1805
|
+
|
1806
|
+
|
1807
|
+
static VALUE
|
1808
|
+
_wrap_SwishWordsByLetter(int argc, VALUE *argv, VALUE self) {
|
1809
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1810
|
+
char *arg2 = (char *) 0 ;
|
1811
|
+
char arg3 ;
|
1812
|
+
char *result;
|
1813
|
+
VALUE vresult = Qnil;
|
1814
|
+
|
1815
|
+
if ((argc < 3) || (argc > 3))
|
1816
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
|
1817
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1818
|
+
arg2 = StringValuePtr(argv[1]);
|
1819
|
+
arg3 = NUM2CHR(argv[2]);
|
1820
|
+
result = (char *)SwishWordsByLetter(arg1,arg2,arg3);
|
1821
|
+
|
1822
|
+
vresult = rb_str_new2(result);
|
1823
|
+
return vresult;
|
1824
|
+
}
|
1825
|
+
|
1826
|
+
|
1827
|
+
static VALUE
|
1828
|
+
_wrap_SwishStemWord(int argc, VALUE *argv, VALUE self) {
|
1829
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1830
|
+
char *arg2 = (char *) 0 ;
|
1831
|
+
char *result;
|
1832
|
+
VALUE vresult = Qnil;
|
1833
|
+
|
1834
|
+
if ((argc < 2) || (argc > 2))
|
1835
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1836
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1837
|
+
arg2 = StringValuePtr(argv[1]);
|
1838
|
+
result = (char *)SwishStemWord(arg1,arg2);
|
1839
|
+
|
1840
|
+
vresult = rb_str_new2(result);
|
1841
|
+
return vresult;
|
1842
|
+
}
|
1843
|
+
|
1844
|
+
|
1845
|
+
static VALUE
|
1846
|
+
_wrap_SwishFuzzyWord(int argc, VALUE *argv, VALUE self) {
|
1847
|
+
SW_RESULT arg1 = (SW_RESULT) 0 ;
|
1848
|
+
char *arg2 = (char *) 0 ;
|
1849
|
+
SW_FUZZYWORD result;
|
1850
|
+
VALUE vresult = Qnil;
|
1851
|
+
|
1852
|
+
if ((argc < 2) || (argc > 2))
|
1853
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
1854
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1855
|
+
arg2 = StringValuePtr(argv[1]);
|
1856
|
+
result = (SW_FUZZYWORD)SwishFuzzyWord(arg1,arg2);
|
1857
|
+
|
1858
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1859
|
+
return vresult;
|
1860
|
+
}
|
1861
|
+
|
1862
|
+
|
1863
|
+
static VALUE
|
1864
|
+
_wrap_SwishFuzzy(int argc, VALUE *argv, VALUE self) {
|
1865
|
+
SW_HANDLE arg1 = (SW_HANDLE) 0 ;
|
1866
|
+
char *arg2 = (char *) 0 ;
|
1867
|
+
char *arg3 = (char *) 0 ;
|
1868
|
+
SW_FUZZYWORD result;
|
1869
|
+
VALUE vresult = Qnil;
|
1870
|
+
|
1871
|
+
if ((argc < 3) || (argc > 3))
|
1872
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
|
1873
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1874
|
+
arg2 = StringValuePtr(argv[1]);
|
1875
|
+
arg3 = StringValuePtr(argv[2]);
|
1876
|
+
result = (SW_FUZZYWORD)SwishFuzzy(arg1,(char const *)arg2,arg3);
|
1877
|
+
|
1878
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0);
|
1879
|
+
return vresult;
|
1880
|
+
}
|
1881
|
+
|
1882
|
+
|
1883
|
+
static VALUE
|
1884
|
+
_wrap_SwishFuzzyWordList(int argc, VALUE *argv, VALUE self) {
|
1885
|
+
SW_FUZZYWORD arg1 = (SW_FUZZYWORD) 0 ;
|
1886
|
+
char **result;
|
1887
|
+
VALUE vresult = Qnil;
|
1888
|
+
|
1889
|
+
if ((argc < 1) || (argc > 1))
|
1890
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1891
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1892
|
+
result = (char **)SwishFuzzyWordList(arg1);
|
1893
|
+
|
1894
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_p_char,0);
|
1895
|
+
return vresult;
|
1896
|
+
}
|
1897
|
+
|
1898
|
+
|
1899
|
+
static VALUE
|
1900
|
+
_wrap_SwishFuzzyWordCount(int argc, VALUE *argv, VALUE self) {
|
1901
|
+
SW_FUZZYWORD arg1 = (SW_FUZZYWORD) 0 ;
|
1902
|
+
int result;
|
1903
|
+
VALUE vresult = Qnil;
|
1904
|
+
|
1905
|
+
if ((argc < 1) || (argc > 1))
|
1906
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1907
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1908
|
+
result = (int)SwishFuzzyWordCount(arg1);
|
1909
|
+
|
1910
|
+
vresult = INT2NUM(result);
|
1911
|
+
return vresult;
|
1912
|
+
}
|
1913
|
+
|
1914
|
+
|
1915
|
+
static VALUE
|
1916
|
+
_wrap_SwishFuzzyWordError(int argc, VALUE *argv, VALUE self) {
|
1917
|
+
SW_FUZZYWORD arg1 = (SW_FUZZYWORD) 0 ;
|
1918
|
+
int result;
|
1919
|
+
VALUE vresult = Qnil;
|
1920
|
+
|
1921
|
+
if ((argc < 1) || (argc > 1))
|
1922
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1923
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1924
|
+
result = (int)SwishFuzzyWordError(arg1);
|
1925
|
+
|
1926
|
+
vresult = INT2NUM(result);
|
1927
|
+
return vresult;
|
1928
|
+
}
|
1929
|
+
|
1930
|
+
|
1931
|
+
static VALUE
|
1932
|
+
_wrap_SwishFuzzyWordFree(int argc, VALUE *argv, VALUE self) {
|
1933
|
+
SW_FUZZYWORD arg1 = (SW_FUZZYWORD) 0 ;
|
1934
|
+
|
1935
|
+
if ((argc < 1) || (argc > 1))
|
1936
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1937
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1938
|
+
SwishFuzzyWordFree(arg1);
|
1939
|
+
|
1940
|
+
return Qnil;
|
1941
|
+
}
|
1942
|
+
|
1943
|
+
|
1944
|
+
static VALUE
|
1945
|
+
_wrap_SwishFuzzyMode(int argc, VALUE *argv, VALUE self) {
|
1946
|
+
SW_RESULT arg1 = (SW_RESULT) 0 ;
|
1947
|
+
char *result;
|
1948
|
+
VALUE vresult = Qnil;
|
1949
|
+
|
1950
|
+
if ((argc < 1) || (argc > 1))
|
1951
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1952
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
1953
|
+
result = (char *)SwishFuzzyMode(arg1);
|
1954
|
+
|
1955
|
+
vresult = rb_str_new2(result);
|
1956
|
+
return vresult;
|
1957
|
+
}
|
1958
|
+
|
1959
|
+
|
1960
|
+
static VALUE
|
1961
|
+
_wrap_u_PropValue1_v_str_set(int argc, VALUE *argv, VALUE self) {
|
1962
|
+
u_PropValue1 *arg1 = (u_PropValue1 *) 0 ;
|
1963
|
+
char *arg2 = (char *) 0 ;
|
1964
|
+
|
1965
|
+
if ((argc < 1) || (argc > 1))
|
1966
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
1967
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_u_PropValue1, 1);
|
1968
|
+
arg2 = StringValuePtr(argv[0]);
|
1969
|
+
{
|
1970
|
+
if (arg1->v_str) free((char*)arg1->v_str);
|
1971
|
+
if (arg2) {
|
1972
|
+
arg1->v_str = (char *) malloc(strlen(arg2)+1);
|
1973
|
+
strcpy((char*)arg1->v_str,arg2);
|
1974
|
+
} else {
|
1975
|
+
arg1->v_str = 0;
|
1976
|
+
}
|
1977
|
+
}
|
1978
|
+
return Qnil;
|
1979
|
+
}
|
1980
|
+
|
1981
|
+
|
1982
|
+
static VALUE
|
1983
|
+
_wrap_u_PropValue1_v_str_get(int argc, VALUE *argv, VALUE self) {
|
1984
|
+
u_PropValue1 *arg1 = (u_PropValue1 *) 0 ;
|
1985
|
+
char *result;
|
1986
|
+
VALUE vresult = Qnil;
|
1987
|
+
|
1988
|
+
if ((argc < 0) || (argc > 0))
|
1989
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
1990
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_u_PropValue1, 1);
|
1991
|
+
result = (char *) ((arg1)->v_str);
|
1992
|
+
|
1993
|
+
vresult = rb_str_new2(result);
|
1994
|
+
return vresult;
|
1995
|
+
}
|
1996
|
+
|
1997
|
+
|
1998
|
+
static VALUE
|
1999
|
+
_wrap_u_PropValue1_v_int_set(int argc, VALUE *argv, VALUE self) {
|
2000
|
+
u_PropValue1 *arg1 = (u_PropValue1 *) 0 ;
|
2001
|
+
int arg2 ;
|
2002
|
+
|
2003
|
+
if ((argc < 1) || (argc > 1))
|
2004
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
2005
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_u_PropValue1, 1);
|
2006
|
+
arg2 = NUM2INT(argv[0]);
|
2007
|
+
if (arg1) (arg1)->v_int = arg2;
|
2008
|
+
|
2009
|
+
return Qnil;
|
2010
|
+
}
|
2011
|
+
|
2012
|
+
|
2013
|
+
static VALUE
|
2014
|
+
_wrap_u_PropValue1_v_int_get(int argc, VALUE *argv, VALUE self) {
|
2015
|
+
u_PropValue1 *arg1 = (u_PropValue1 *) 0 ;
|
2016
|
+
int result;
|
2017
|
+
VALUE vresult = Qnil;
|
2018
|
+
|
2019
|
+
if ((argc < 0) || (argc > 0))
|
2020
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
2021
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_u_PropValue1, 1);
|
2022
|
+
result = (int) ((arg1)->v_int);
|
2023
|
+
|
2024
|
+
vresult = INT2NUM(result);
|
2025
|
+
return vresult;
|
2026
|
+
}
|
2027
|
+
|
2028
|
+
|
2029
|
+
static VALUE
|
2030
|
+
_wrap_u_PropValue1_v_date_set(int argc, VALUE *argv, VALUE self) {
|
2031
|
+
u_PropValue1 *arg1 = (u_PropValue1 *) 0 ;
|
2032
|
+
time_t arg2 ;
|
2033
|
+
|
2034
|
+
if ((argc < 1) || (argc > 1))
|
2035
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
2036
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_u_PropValue1, 1);
|
2037
|
+
{
|
2038
|
+
time_t * ptr;
|
2039
|
+
SWIG_ConvertPtr(argv[0], (void **) &ptr, SWIGTYPE_p_time_t, 1);
|
2040
|
+
if (ptr) arg2 = *ptr;
|
2041
|
+
}
|
2042
|
+
if (arg1) (arg1)->v_date = arg2;
|
2043
|
+
|
2044
|
+
return Qnil;
|
2045
|
+
}
|
2046
|
+
|
2047
|
+
|
2048
|
+
static VALUE
|
2049
|
+
_wrap_u_PropValue1_v_date_get(int argc, VALUE *argv, VALUE self) {
|
2050
|
+
u_PropValue1 *arg1 = (u_PropValue1 *) 0 ;
|
2051
|
+
time_t result;
|
2052
|
+
VALUE vresult = Qnil;
|
2053
|
+
|
2054
|
+
if ((argc < 0) || (argc > 0))
|
2055
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
2056
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_u_PropValue1, 1);
|
2057
|
+
result = ((arg1)->v_date);
|
2058
|
+
|
2059
|
+
{
|
2060
|
+
time_t * resultptr;
|
2061
|
+
resultptr = (time_t *) malloc(sizeof(time_t));
|
2062
|
+
memmove(resultptr, &result, sizeof(time_t));
|
2063
|
+
vresult = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_time_t, 1);
|
2064
|
+
}
|
2065
|
+
return vresult;
|
2066
|
+
}
|
2067
|
+
|
2068
|
+
|
2069
|
+
static VALUE
|
2070
|
+
_wrap_u_PropValue1_v_float_set(int argc, VALUE *argv, VALUE self) {
|
2071
|
+
u_PropValue1 *arg1 = (u_PropValue1 *) 0 ;
|
2072
|
+
double arg2 ;
|
2073
|
+
|
2074
|
+
if ((argc < 1) || (argc > 1))
|
2075
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
2076
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_u_PropValue1, 1);
|
2077
|
+
arg2 = (double) NUM2DBL(argv[0]);
|
2078
|
+
if (arg1) (arg1)->v_float = arg2;
|
2079
|
+
|
2080
|
+
return Qnil;
|
2081
|
+
}
|
2082
|
+
|
2083
|
+
|
2084
|
+
static VALUE
|
2085
|
+
_wrap_u_PropValue1_v_float_get(int argc, VALUE *argv, VALUE self) {
|
2086
|
+
u_PropValue1 *arg1 = (u_PropValue1 *) 0 ;
|
2087
|
+
double result;
|
2088
|
+
VALUE vresult = Qnil;
|
2089
|
+
|
2090
|
+
if ((argc < 0) || (argc > 0))
|
2091
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
2092
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_u_PropValue1, 1);
|
2093
|
+
result = (double) ((arg1)->v_float);
|
2094
|
+
|
2095
|
+
vresult = rb_float_new(result);
|
2096
|
+
return vresult;
|
2097
|
+
}
|
2098
|
+
|
2099
|
+
|
2100
|
+
static VALUE
|
2101
|
+
_wrap_u_PropValue1_v_ulong_set(int argc, VALUE *argv, VALUE self) {
|
2102
|
+
u_PropValue1 *arg1 = (u_PropValue1 *) 0 ;
|
2103
|
+
unsigned long arg2 ;
|
2104
|
+
|
2105
|
+
if ((argc < 1) || (argc > 1))
|
2106
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
2107
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_u_PropValue1, 1);
|
2108
|
+
arg2 = NUM2ULONG(argv[0]);
|
2109
|
+
if (arg1) (arg1)->v_ulong = arg2;
|
2110
|
+
|
2111
|
+
return Qnil;
|
2112
|
+
}
|
2113
|
+
|
2114
|
+
|
2115
|
+
static VALUE
|
2116
|
+
_wrap_u_PropValue1_v_ulong_get(int argc, VALUE *argv, VALUE self) {
|
2117
|
+
u_PropValue1 *arg1 = (u_PropValue1 *) 0 ;
|
2118
|
+
unsigned long result;
|
2119
|
+
VALUE vresult = Qnil;
|
2120
|
+
|
2121
|
+
if ((argc < 0) || (argc > 0))
|
2122
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
2123
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_u_PropValue1, 1);
|
2124
|
+
result = (unsigned long) ((arg1)->v_ulong);
|
2125
|
+
|
2126
|
+
vresult = UINT2NUM(result);
|
2127
|
+
return vresult;
|
2128
|
+
}
|
2129
|
+
|
2130
|
+
|
2131
|
+
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
2132
|
+
static VALUE
|
2133
|
+
_wrap_u_PropValue1_allocate(VALUE self) {
|
2134
|
+
#else
|
2135
|
+
static VALUE
|
2136
|
+
_wrap_u_PropValue1_allocate(int argc, VALUE *argv, VALUE self) {
|
2137
|
+
#endif
|
2138
|
+
|
2139
|
+
|
2140
|
+
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_u_PropValue1);
|
2141
|
+
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
2142
|
+
rb_obj_call_init(vresult, argc, argv);
|
2143
|
+
#endif
|
2144
|
+
return vresult;
|
2145
|
+
}
|
2146
|
+
|
2147
|
+
|
2148
|
+
static VALUE
|
2149
|
+
_wrap_new_u_PropValue1(int argc, VALUE *argv, VALUE self) {
|
2150
|
+
u_PropValue1 *result;
|
2151
|
+
|
2152
|
+
if ((argc < 0) || (argc > 0))
|
2153
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
2154
|
+
result = (u_PropValue1 *)(u_PropValue1 *) calloc(1, sizeof(u_PropValue1));
|
2155
|
+
DATA_PTR(self) = result;
|
2156
|
+
return self;
|
2157
|
+
}
|
2158
|
+
|
2159
|
+
|
2160
|
+
static void
|
2161
|
+
free_u_PropValue1(u_PropValue1 *arg1) {
|
2162
|
+
free((char *) arg1);
|
2163
|
+
}
|
2164
|
+
static VALUE
|
2165
|
+
_wrap_PropValue_datatype_set(int argc, VALUE *argv, VALUE self) {
|
2166
|
+
PropValue *arg1 = (PropValue *) 0 ;
|
2167
|
+
PropType arg2 ;
|
2168
|
+
|
2169
|
+
if ((argc < 1) || (argc > 1))
|
2170
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
2171
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_PropValue, 1);
|
2172
|
+
arg2 = (PropType) NUM2INT(argv[0]);
|
2173
|
+
if (arg1) (arg1)->datatype = (PropType )arg2;
|
2174
|
+
|
2175
|
+
return Qnil;
|
2176
|
+
}
|
2177
|
+
|
2178
|
+
|
2179
|
+
static VALUE
|
2180
|
+
_wrap_PropValue_datatype_get(int argc, VALUE *argv, VALUE self) {
|
2181
|
+
PropValue *arg1 = (PropValue *) 0 ;
|
2182
|
+
PropType result;
|
2183
|
+
VALUE vresult = Qnil;
|
2184
|
+
|
2185
|
+
if ((argc < 0) || (argc > 0))
|
2186
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
2187
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_PropValue, 1);
|
2188
|
+
result = (PropType) ((arg1)->datatype);
|
2189
|
+
|
2190
|
+
vresult = INT2NUM(result);
|
2191
|
+
return vresult;
|
2192
|
+
}
|
2193
|
+
|
2194
|
+
|
2195
|
+
static VALUE
|
2196
|
+
_wrap_PropValue_value_set(int argc, VALUE *argv, VALUE self) {
|
2197
|
+
PropValue *arg1 = (PropValue *) 0 ;
|
2198
|
+
u_PropValue1 *arg2 = (u_PropValue1 *) 0 ;
|
2199
|
+
|
2200
|
+
if ((argc < 1) || (argc > 1))
|
2201
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
2202
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_PropValue, 1);
|
2203
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_u_PropValue1, 1);
|
2204
|
+
if (arg1) (arg1)->value = *arg2;
|
2205
|
+
|
2206
|
+
return Qnil;
|
2207
|
+
}
|
2208
|
+
|
2209
|
+
|
2210
|
+
static VALUE
|
2211
|
+
_wrap_PropValue_value_get(int argc, VALUE *argv, VALUE self) {
|
2212
|
+
PropValue *arg1 = (PropValue *) 0 ;
|
2213
|
+
u_PropValue1 *result;
|
2214
|
+
VALUE vresult = Qnil;
|
2215
|
+
|
2216
|
+
if ((argc < 0) || (argc > 0))
|
2217
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
2218
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_PropValue, 1);
|
2219
|
+
result = (u_PropValue1 *)& ((arg1)->value);
|
2220
|
+
|
2221
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_u_PropValue1,0);
|
2222
|
+
return vresult;
|
2223
|
+
}
|
2224
|
+
|
2225
|
+
|
2226
|
+
static VALUE
|
2227
|
+
_wrap_PropValue_destroy_set(int argc, VALUE *argv, VALUE self) {
|
2228
|
+
PropValue *arg1 = (PropValue *) 0 ;
|
2229
|
+
int arg2 ;
|
2230
|
+
|
2231
|
+
if ((argc < 1) || (argc > 1))
|
2232
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
2233
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_PropValue, 1);
|
2234
|
+
arg2 = NUM2INT(argv[0]);
|
2235
|
+
if (arg1) (arg1)->destroy = arg2;
|
2236
|
+
|
2237
|
+
return Qnil;
|
2238
|
+
}
|
2239
|
+
|
2240
|
+
|
2241
|
+
static VALUE
|
2242
|
+
_wrap_PropValue_destroy_get(int argc, VALUE *argv, VALUE self) {
|
2243
|
+
PropValue *arg1 = (PropValue *) 0 ;
|
2244
|
+
int result;
|
2245
|
+
VALUE vresult = Qnil;
|
2246
|
+
|
2247
|
+
if ((argc < 0) || (argc > 0))
|
2248
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
2249
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_PropValue, 1);
|
2250
|
+
result = (int) ((arg1)->destroy);
|
2251
|
+
|
2252
|
+
vresult = INT2NUM(result);
|
2253
|
+
return vresult;
|
2254
|
+
}
|
2255
|
+
|
2256
|
+
|
2257
|
+
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
2258
|
+
static VALUE
|
2259
|
+
_wrap_PropValue_allocate(VALUE self) {
|
2260
|
+
#else
|
2261
|
+
static VALUE
|
2262
|
+
_wrap_PropValue_allocate(int argc, VALUE *argv, VALUE self) {
|
2263
|
+
#endif
|
2264
|
+
|
2265
|
+
|
2266
|
+
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_PropValue);
|
2267
|
+
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
2268
|
+
rb_obj_call_init(vresult, argc, argv);
|
2269
|
+
#endif
|
2270
|
+
return vresult;
|
2271
|
+
}
|
2272
|
+
|
2273
|
+
|
2274
|
+
static VALUE
|
2275
|
+
_wrap_new_PropValue(int argc, VALUE *argv, VALUE self) {
|
2276
|
+
PropValue *result;
|
2277
|
+
|
2278
|
+
if ((argc < 0) || (argc > 0))
|
2279
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
2280
|
+
result = (PropValue *)(PropValue *) calloc(1, sizeof(PropValue));
|
2281
|
+
DATA_PTR(self) = result;
|
2282
|
+
return self;
|
2283
|
+
}
|
2284
|
+
|
2285
|
+
|
2286
|
+
static void
|
2287
|
+
free_PropValue(PropValue *arg1) {
|
2288
|
+
free((char *) arg1);
|
2289
|
+
}
|
2290
|
+
static VALUE
|
2291
|
+
_wrap_getResultPropValue(int argc, VALUE *argv, VALUE self) {
|
2292
|
+
SW_RESULT arg1 = (SW_RESULT) 0 ;
|
2293
|
+
char *arg2 = (char *) 0 ;
|
2294
|
+
int arg3 ;
|
2295
|
+
PropValue *result;
|
2296
|
+
VALUE vresult = Qnil;
|
2297
|
+
|
2298
|
+
if ((argc < 3) || (argc > 3))
|
2299
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
|
2300
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, 0, 1);
|
2301
|
+
arg2 = StringValuePtr(argv[1]);
|
2302
|
+
arg3 = NUM2INT(argv[2]);
|
2303
|
+
result = (PropValue *)getResultPropValue(arg1,arg2,arg3);
|
2304
|
+
|
2305
|
+
vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_PropValue,0);
|
2306
|
+
return vresult;
|
2307
|
+
}
|
2308
|
+
|
2309
|
+
|
2310
|
+
static VALUE
|
2311
|
+
_wrap_freeResultPropValue(int argc, VALUE *argv, VALUE self) {
|
2312
|
+
PropValue *arg1 = (PropValue *) 0 ;
|
2313
|
+
|
2314
|
+
if ((argc < 1) || (argc > 1))
|
2315
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
2316
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_PropValue, 1);
|
2317
|
+
freeResultPropValue(arg1);
|
2318
|
+
|
2319
|
+
return Qnil;
|
2320
|
+
}
|
2321
|
+
|
2322
|
+
|
2323
|
+
|
2324
|
+
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
2325
|
+
|
2326
|
+
static swig_type_info _swigt__p_FILE[] = {{"_p_FILE", 0, "FILE *", 0, 0, 0, 0},{"_p_FILE", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
|
2327
|
+
static swig_type_info _swigt__p_time_t[] = {{"_p_time_t", 0, "time_t *", 0, 0, 0, 0},{"_p_time_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
|
2328
|
+
static swig_type_info _swigt__p_unsigned_long[] = {{"_p_unsigned_long", 0, "unsigned long *|VALUE *", 0, 0, 0, 0},{"_p_unsigned_long", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
|
2329
|
+
static swig_type_info _swigt__p_u_PropValue1[] = {{"_p_u_PropValue1", 0, "u_PropValue1 *", 0, 0, 0, 0},{"_p_u_PropValue1", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
|
2330
|
+
static swig_type_info _swigt__p_SWISH_HEADER_VALUE[] = {{"_p_SWISH_HEADER_VALUE", 0, "SWISH_HEADER_VALUE *", 0, 0, 0, 0},{"_p_SWISH_HEADER_VALUE", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
|
2331
|
+
static swig_type_info _swigt__p_p_char[] = {{"_p_p_char", 0, "char **", 0, 0, 0, 0},{"_p_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
|
2332
|
+
static swig_type_info _swigt__p_PropType[] = {{"_p_PropType", 0, "enum PropType *|PropType *", 0, 0, 0, 0},{"_p_PropType", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
|
2333
|
+
static swig_type_info _swigt__p_SWISH_HEADER_TYPE[] = {{"_p_SWISH_HEADER_TYPE", 0, "enum SWISH_HEADER_TYPE *|SWISH_HEADER_TYPE *", 0, 0, 0, 0},{"_p_SWISH_HEADER_TYPE", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
|
2334
|
+
static swig_type_info _swigt__p_p_void[] = {{"_p_p_void", 0, "void **|SWISH_META_LIST", 0, 0, 0, 0},{"_p_p_void", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
|
2335
|
+
static swig_type_info _swigt__p_void[] = {{"_p_void", 0, "void *|SW_FUZZYWORD", 0, 0, 0, 0},{"_p_void", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
|
2336
|
+
static swig_type_info _swigt__p_PropValue[] = {{"_p_PropValue", 0, "PropValue *", 0, 0, 0, 0},{"_p_PropValue", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
|
2337
|
+
|
2338
|
+
static swig_type_info *swig_types_initial[] = {
|
2339
|
+
_swigt__p_FILE,
|
2340
|
+
_swigt__p_time_t,
|
2341
|
+
_swigt__p_unsigned_long,
|
2342
|
+
_swigt__p_u_PropValue1,
|
2343
|
+
_swigt__p_SWISH_HEADER_VALUE,
|
2344
|
+
_swigt__p_p_char,
|
2345
|
+
_swigt__p_PropType,
|
2346
|
+
_swigt__p_SWISH_HEADER_TYPE,
|
2347
|
+
_swigt__p_p_void,
|
2348
|
+
_swigt__p_void,
|
2349
|
+
_swigt__p_PropValue,
|
2350
|
+
0
|
2351
|
+
};
|
2352
|
+
|
2353
|
+
|
2354
|
+
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
|
2355
|
+
|
2356
|
+
|
2357
|
+
#ifdef __cplusplus
|
2358
|
+
extern "C"
|
2359
|
+
#endif
|
2360
|
+
SWIGEXPORT(void) Init_swishe_base(void) {
|
2361
|
+
int i;
|
2362
|
+
|
2363
|
+
SWIG_InitRuntime();
|
2364
|
+
mSwishe_base = rb_define_module("Swishe_base");
|
2365
|
+
|
2366
|
+
for (i = 0; swig_types_initial[i]; i++) {
|
2367
|
+
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
2368
|
+
SWIG_define_class(swig_types[i]);
|
2369
|
+
}
|
2370
|
+
|
2371
|
+
rb_define_const(mSwishe_base,"SWISH_NUMBER", INT2NUM(SWISH_NUMBER));
|
2372
|
+
rb_define_const(mSwishe_base,"SWISH_STRING", INT2NUM(SWISH_STRING));
|
2373
|
+
rb_define_const(mSwishe_base,"SWISH_LIST", INT2NUM(SWISH_LIST));
|
2374
|
+
rb_define_const(mSwishe_base,"SWISH_BOOL", INT2NUM(SWISH_BOOL));
|
2375
|
+
rb_define_const(mSwishe_base,"SWISH_WORD_HASH", INT2NUM(SWISH_WORD_HASH));
|
2376
|
+
rb_define_const(mSwishe_base,"SWISH_OTHER_DATA", INT2NUM(SWISH_OTHER_DATA));
|
2377
|
+
rb_define_const(mSwishe_base,"SWISH_HEADER_ERROR", INT2NUM(SWISH_HEADER_ERROR));
|
2378
|
+
|
2379
|
+
cSWISH_HEADER_VALUE.klass = rb_define_class_under(mSwishe_base, "SWISH_HEADER_VALUE", rb_cObject);
|
2380
|
+
SWIG_TypeClientData(SWIGTYPE_p_SWISH_HEADER_VALUE, (void *) &cSWISH_HEADER_VALUE);
|
2381
|
+
rb_define_alloc_func(cSWISH_HEADER_VALUE.klass, _wrap_SWISH_HEADER_VALUE_allocate);
|
2382
|
+
rb_define_method(cSWISH_HEADER_VALUE.klass, "initialize", _wrap_new_SWISH_HEADER_VALUE, -1);
|
2383
|
+
rb_define_method(cSWISH_HEADER_VALUE.klass, "string=", _wrap_SWISH_HEADER_VALUE_string_set, -1);
|
2384
|
+
rb_define_method(cSWISH_HEADER_VALUE.klass, "string", _wrap_SWISH_HEADER_VALUE_string_get, -1);
|
2385
|
+
rb_define_method(cSWISH_HEADER_VALUE.klass, "string_list=", _wrap_SWISH_HEADER_VALUE_string_list_set, -1);
|
2386
|
+
rb_define_method(cSWISH_HEADER_VALUE.klass, "string_list", _wrap_SWISH_HEADER_VALUE_string_list_get, -1);
|
2387
|
+
rb_define_method(cSWISH_HEADER_VALUE.klass, "number=", _wrap_SWISH_HEADER_VALUE_number_set, -1);
|
2388
|
+
rb_define_method(cSWISH_HEADER_VALUE.klass, "number", _wrap_SWISH_HEADER_VALUE_number_get, -1);
|
2389
|
+
rb_define_method(cSWISH_HEADER_VALUE.klass, "boolean=", _wrap_SWISH_HEADER_VALUE_boolean_set, -1);
|
2390
|
+
rb_define_method(cSWISH_HEADER_VALUE.klass, "boolean", _wrap_SWISH_HEADER_VALUE_boolean_get, -1);
|
2391
|
+
cSWISH_HEADER_VALUE.mark = 0;
|
2392
|
+
cSWISH_HEADER_VALUE.destroy = (void (*)(void *)) free_SWISH_HEADER_VALUE;
|
2393
|
+
rb_define_module_function(mSwishe_base, "SwishHeaderNames", _wrap_SwishHeaderNames, -1);
|
2394
|
+
rb_define_module_function(mSwishe_base, "SwishIndexNames", _wrap_SwishIndexNames, -1);
|
2395
|
+
rb_define_module_function(mSwishe_base, "SwishHeaderValue", _wrap_SwishHeaderValue, -1);
|
2396
|
+
rb_define_module_function(mSwishe_base, "SwishResultIndexValue", _wrap_SwishResultIndexValue, -1);
|
2397
|
+
rb_define_const(mSwishe_base,"SW_META_TYPE_UNDEF", INT2NUM(0));
|
2398
|
+
rb_define_const(mSwishe_base,"SW_META_TYPE_STRING", INT2NUM(4));
|
2399
|
+
rb_define_const(mSwishe_base,"SW_META_TYPE_ULONG", INT2NUM(8));
|
2400
|
+
rb_define_const(mSwishe_base,"SW_META_TYPE_DATE", INT2NUM(16));
|
2401
|
+
rb_define_module_function(mSwishe_base, "SwishMetaList", _wrap_SwishMetaList, -1);
|
2402
|
+
rb_define_module_function(mSwishe_base, "SwishPropertyList", _wrap_SwishPropertyList, -1);
|
2403
|
+
rb_define_module_function(mSwishe_base, "SwishResultMetaList", _wrap_SwishResultMetaList, -1);
|
2404
|
+
rb_define_module_function(mSwishe_base, "SwishResultPropertyList", _wrap_SwishResultPropertyList, -1);
|
2405
|
+
rb_define_module_function(mSwishe_base, "SwishMetaName", _wrap_SwishMetaName, -1);
|
2406
|
+
rb_define_module_function(mSwishe_base, "SwishMetaType", _wrap_SwishMetaType, -1);
|
2407
|
+
rb_define_module_function(mSwishe_base, "SwishMetaID", _wrap_SwishMetaID, -1);
|
2408
|
+
rb_define_const(mSwishe_base,"IN_FILE_BIT", INT2NUM(0));
|
2409
|
+
rb_define_const(mSwishe_base,"IN_TITLE_BIT", INT2NUM(1));
|
2410
|
+
rb_define_const(mSwishe_base,"IN_HEAD_BIT", INT2NUM(2));
|
2411
|
+
rb_define_const(mSwishe_base,"IN_BODY_BIT", INT2NUM(3));
|
2412
|
+
rb_define_const(mSwishe_base,"IN_COMMENTS_BIT", INT2NUM(4));
|
2413
|
+
rb_define_const(mSwishe_base,"IN_HEADER_BIT", INT2NUM(5));
|
2414
|
+
rb_define_const(mSwishe_base,"IN_EMPHASIZED_BIT", INT2NUM(6));
|
2415
|
+
rb_define_const(mSwishe_base,"IN_META_BIT", INT2NUM(7));
|
2416
|
+
rb_define_const(mSwishe_base,"IN_FILE", INT2NUM((1<<0)));
|
2417
|
+
rb_define_const(mSwishe_base,"IN_TITLE", INT2NUM((1<<1)));
|
2418
|
+
rb_define_const(mSwishe_base,"IN_HEAD", INT2NUM((1<<2)));
|
2419
|
+
rb_define_const(mSwishe_base,"IN_BODY", INT2NUM((1<<3)));
|
2420
|
+
rb_define_const(mSwishe_base,"IN_COMMENTS", INT2NUM((1<<4)));
|
2421
|
+
rb_define_const(mSwishe_base,"IN_HEADER", INT2NUM((1<<5)));
|
2422
|
+
rb_define_const(mSwishe_base,"IN_EMPHASIZED", INT2NUM((1<<6)));
|
2423
|
+
rb_define_const(mSwishe_base,"IN_META", INT2NUM((1<<7)));
|
2424
|
+
rb_define_const(mSwishe_base,"IN_ALL", INT2NUM(((1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7))));
|
2425
|
+
rb_define_module_function(mSwishe_base, "SwishInit", _wrap_SwishInit, -1);
|
2426
|
+
rb_define_module_function(mSwishe_base, "SwishQuery", _wrap_SwishQuery, -1);
|
2427
|
+
rb_define_module_function(mSwishe_base, "New_Search_Object", _wrap_New_Search_Object, -1);
|
2428
|
+
rb_define_module_function(mSwishe_base, "SwishRankScheme", _wrap_SwishRankScheme, -1);
|
2429
|
+
rb_define_module_function(mSwishe_base, "SwishSetRefPtr", _wrap_SwishSetRefPtr, -1);
|
2430
|
+
rb_define_module_function(mSwishe_base, "SwishGetRefPtr", _wrap_SwishGetRefPtr, -1);
|
2431
|
+
rb_define_module_function(mSwishe_base, "SwishSearch_parent", _wrap_SwishSearch_parent, -1);
|
2432
|
+
rb_define_module_function(mSwishe_base, "SwishResults_parent", _wrap_SwishResults_parent, -1);
|
2433
|
+
rb_define_module_function(mSwishe_base, "SwishResult_parent", _wrap_SwishResult_parent, -1);
|
2434
|
+
rb_define_module_function(mSwishe_base, "ResultsSetRefPtr", _wrap_ResultsSetRefPtr, -1);
|
2435
|
+
rb_define_module_function(mSwishe_base, "SwishSetStructure", _wrap_SwishSetStructure, -1);
|
2436
|
+
rb_define_module_function(mSwishe_base, "SwishPhraseDelimiter", _wrap_SwishPhraseDelimiter, -1);
|
2437
|
+
rb_define_module_function(mSwishe_base, "SwishSetSort", _wrap_SwishSetSort, -1);
|
2438
|
+
rb_define_module_function(mSwishe_base, "SwishSetQuery", _wrap_SwishSetQuery, -1);
|
2439
|
+
rb_define_module_function(mSwishe_base, "SwishSetSearchLimit", _wrap_SwishSetSearchLimit, -1);
|
2440
|
+
rb_define_module_function(mSwishe_base, "SwishResetSearchLimit", _wrap_SwishResetSearchLimit, -1);
|
2441
|
+
rb_define_module_function(mSwishe_base, "SwishExecute", _wrap_SwishExecute, -1);
|
2442
|
+
rb_define_module_function(mSwishe_base, "SwishHits", _wrap_SwishHits, -1);
|
2443
|
+
rb_define_module_function(mSwishe_base, "SwishParsedWords", _wrap_SwishParsedWords, -1);
|
2444
|
+
rb_define_module_function(mSwishe_base, "SwishRemovedStopwords", _wrap_SwishRemovedStopwords, -1);
|
2445
|
+
rb_define_module_function(mSwishe_base, "SwishSeekResult", _wrap_SwishSeekResult, -1);
|
2446
|
+
rb_define_module_function(mSwishe_base, "SwishNextResult", _wrap_SwishNextResult, -1);
|
2447
|
+
rb_define_module_function(mSwishe_base, "SwishResultPropertyStr", _wrap_SwishResultPropertyStr, -1);
|
2448
|
+
rb_define_module_function(mSwishe_base, "SwishResultPropertyULong", _wrap_SwishResultPropertyULong, -1);
|
2449
|
+
rb_define_module_function(mSwishe_base, "SW_ResultToSW_HANDLE", _wrap_SW_ResultToSW_HANDLE, -1);
|
2450
|
+
rb_define_module_function(mSwishe_base, "SW_ResultsToSW_HANDLE", _wrap_SW_ResultsToSW_HANDLE, -1);
|
2451
|
+
rb_define_module_function(mSwishe_base, "Free_Search_Object", _wrap_Free_Search_Object, -1);
|
2452
|
+
rb_define_module_function(mSwishe_base, "Free_Results_Object", _wrap_Free_Results_Object, -1);
|
2453
|
+
rb_define_module_function(mSwishe_base, "SwishClose", _wrap_SwishClose, -1);
|
2454
|
+
rb_define_module_function(mSwishe_base, "SwishError", _wrap_SwishError, -1);
|
2455
|
+
rb_define_module_function(mSwishe_base, "SwishCriticalError", _wrap_SwishCriticalError, -1);
|
2456
|
+
rb_define_module_function(mSwishe_base, "SwishAbortLastError", _wrap_SwishAbortLastError, -1);
|
2457
|
+
rb_define_module_function(mSwishe_base, "SwishErrorString", _wrap_SwishErrorString, -1);
|
2458
|
+
rb_define_module_function(mSwishe_base, "SwishLastErrorMsg", _wrap_SwishLastErrorMsg, -1);
|
2459
|
+
rb_define_module_function(mSwishe_base, "set_error_handle", _wrap_set_error_handle, -1);
|
2460
|
+
rb_define_module_function(mSwishe_base, "SwishErrorsToStderr", _wrap_SwishErrorsToStderr, -1);
|
2461
|
+
rb_define_module_function(mSwishe_base, "SwishWordsByLetter", _wrap_SwishWordsByLetter, -1);
|
2462
|
+
rb_define_module_function(mSwishe_base, "SwishStemWord", _wrap_SwishStemWord, -1);
|
2463
|
+
rb_define_module_function(mSwishe_base, "SwishFuzzyWord", _wrap_SwishFuzzyWord, -1);
|
2464
|
+
rb_define_module_function(mSwishe_base, "SwishFuzzy", _wrap_SwishFuzzy, -1);
|
2465
|
+
rb_define_module_function(mSwishe_base, "SwishFuzzyWordList", _wrap_SwishFuzzyWordList, -1);
|
2466
|
+
rb_define_module_function(mSwishe_base, "SwishFuzzyWordCount", _wrap_SwishFuzzyWordCount, -1);
|
2467
|
+
rb_define_module_function(mSwishe_base, "SwishFuzzyWordError", _wrap_SwishFuzzyWordError, -1);
|
2468
|
+
rb_define_module_function(mSwishe_base, "SwishFuzzyWordFree", _wrap_SwishFuzzyWordFree, -1);
|
2469
|
+
rb_define_module_function(mSwishe_base, "SwishFuzzyMode", _wrap_SwishFuzzyMode, -1);
|
2470
|
+
rb_define_const(mSwishe_base,"PROP_UNDEFINED", INT2NUM(PROP_UNDEFINED));
|
2471
|
+
rb_define_const(mSwishe_base,"PROP_UNKNOWN", INT2NUM(PROP_UNKNOWN));
|
2472
|
+
rb_define_const(mSwishe_base,"PROP_STRING", INT2NUM(PROP_STRING));
|
2473
|
+
rb_define_const(mSwishe_base,"PROP_INTEGER", INT2NUM(PROP_INTEGER));
|
2474
|
+
rb_define_const(mSwishe_base,"PROP_FLOAT", INT2NUM(PROP_FLOAT));
|
2475
|
+
rb_define_const(mSwishe_base,"PROP_DATE", INT2NUM(PROP_DATE));
|
2476
|
+
rb_define_const(mSwishe_base,"PROP_ULONG", INT2NUM(PROP_ULONG));
|
2477
|
+
|
2478
|
+
cU_PropValue1.klass = rb_define_class_under(mSwishe_base, "U_PropValue1", rb_cObject);
|
2479
|
+
SWIG_TypeClientData(SWIGTYPE_p_u_PropValue1, (void *) &cU_PropValue1);
|
2480
|
+
rb_define_alloc_func(cU_PropValue1.klass, _wrap_u_PropValue1_allocate);
|
2481
|
+
rb_define_method(cU_PropValue1.klass, "initialize", _wrap_new_u_PropValue1, -1);
|
2482
|
+
rb_define_method(cU_PropValue1.klass, "v_str=", _wrap_u_PropValue1_v_str_set, -1);
|
2483
|
+
rb_define_method(cU_PropValue1.klass, "v_str", _wrap_u_PropValue1_v_str_get, -1);
|
2484
|
+
rb_define_method(cU_PropValue1.klass, "v_int=", _wrap_u_PropValue1_v_int_set, -1);
|
2485
|
+
rb_define_method(cU_PropValue1.klass, "v_int", _wrap_u_PropValue1_v_int_get, -1);
|
2486
|
+
rb_define_method(cU_PropValue1.klass, "v_date=", _wrap_u_PropValue1_v_date_set, -1);
|
2487
|
+
rb_define_method(cU_PropValue1.klass, "v_date", _wrap_u_PropValue1_v_date_get, -1);
|
2488
|
+
rb_define_method(cU_PropValue1.klass, "v_float=", _wrap_u_PropValue1_v_float_set, -1);
|
2489
|
+
rb_define_method(cU_PropValue1.klass, "v_float", _wrap_u_PropValue1_v_float_get, -1);
|
2490
|
+
rb_define_method(cU_PropValue1.klass, "v_ulong=", _wrap_u_PropValue1_v_ulong_set, -1);
|
2491
|
+
rb_define_method(cU_PropValue1.klass, "v_ulong", _wrap_u_PropValue1_v_ulong_get, -1);
|
2492
|
+
cU_PropValue1.mark = 0;
|
2493
|
+
cU_PropValue1.destroy = (void (*)(void *)) free_u_PropValue1;
|
2494
|
+
|
2495
|
+
cPropValue.klass = rb_define_class_under(mSwishe_base, "PropValue", rb_cObject);
|
2496
|
+
SWIG_TypeClientData(SWIGTYPE_p_PropValue, (void *) &cPropValue);
|
2497
|
+
rb_define_alloc_func(cPropValue.klass, _wrap_PropValue_allocate);
|
2498
|
+
rb_define_method(cPropValue.klass, "initialize", _wrap_new_PropValue, -1);
|
2499
|
+
rb_define_method(cPropValue.klass, "datatype=", _wrap_PropValue_datatype_set, -1);
|
2500
|
+
rb_define_method(cPropValue.klass, "datatype", _wrap_PropValue_datatype_get, -1);
|
2501
|
+
rb_define_method(cPropValue.klass, "value=", _wrap_PropValue_value_set, -1);
|
2502
|
+
rb_define_method(cPropValue.klass, "value", _wrap_PropValue_value_get, -1);
|
2503
|
+
rb_define_method(cPropValue.klass, "destroy=", _wrap_PropValue_destroy_set, -1);
|
2504
|
+
rb_define_method(cPropValue.klass, "destroy", _wrap_PropValue_destroy_get, -1);
|
2505
|
+
cPropValue.mark = 0;
|
2506
|
+
cPropValue.destroy = (void (*)(void *)) free_PropValue;
|
2507
|
+
rb_define_module_function(mSwishe_base, "getResultPropValue", _wrap_getResultPropValue, -1);
|
2508
|
+
rb_define_module_function(mSwishe_base, "freeResultPropValue", _wrap_freeResultPropValue, -1);
|
2509
|
+
}
|
2510
|
+
|