1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 1.3.31
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 #define SWIGRUBY
12 /* -----------------------------------------------------------------------------
13 * This section contains generic SWIG labels for method/variable
14 * declarations/attributes, and other compiler dependent labels.
15 * ----------------------------------------------------------------------------- */
16
17 /* template workaround for compilers that cannot correctly implement the C++ standard */
18 #ifndef SWIGTEMPLATEDISAMBIGUATOR
19 # if defined(__SUNPRO_CC)
20 # if (__SUNPRO_CC <= 0x560)
21 # define SWIGTEMPLATEDISAMBIGUATOR template
22 # else
23 # define SWIGTEMPLATEDISAMBIGUATOR
24 # endif
25 # else
26 # define SWIGTEMPLATEDISAMBIGUATOR
27 # endif
28 #endif
29
30 /* inline attribute */
31 #ifndef SWIGINLINE
32 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
33 # define SWIGINLINE inline
34 # else
35 # define SWIGINLINE
36 # endif
37 #endif
38
39 /* attribute recognised by some compilers to avoid 'unused' warnings */
40 #ifndef SWIGUNUSED
41 # if defined(__GNUC__)
42 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
43 # define SWIGUNUSED __attribute__ ((__unused__))
44 # else
45 # define SWIGUNUSED
46 # endif
47 # elif defined(__ICC)
48 # define SWIGUNUSED __attribute__ ((__unused__))
49 # else
50 # define SWIGUNUSED
51 # endif
52 #endif
53
54 #ifndef SWIGUNUSEDPARM
55 # ifdef __cplusplus
56 # define SWIGUNUSEDPARM(p)
57 # else
58 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
59 # endif
60 #endif
61
62 /* internal SWIG method */
63 #ifndef SWIGINTERN
64 # define SWIGINTERN static SWIGUNUSED
65 #endif
66
67 /* internal inline SWIG method */
68 #ifndef SWIGINTERNINLINE
69 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
70 #endif
71
72 /* exporting methods */
73 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
74 # ifndef GCC_HASCLASSVISIBILITY
75 # define GCC_HASCLASSVISIBILITY
76 # endif
77 #endif
78
79 #ifndef SWIGEXPORT
80 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
81 # if defined(STATIC_LINKED)
82 # define SWIGEXPORT
83 # else
84 # define SWIGEXPORT __declspec(dllexport)
85 # endif
86 # else
87 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
88 # define SWIGEXPORT __attribute__ ((visibility("default")))
89 # else
90 # define SWIGEXPORT
91 # endif
92 # endif
93 #endif
94
95 /* calling conventions for Windows */
96 #ifndef SWIGSTDCALL
97 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
98 # define SWIGSTDCALL __stdcall
99 # else
100 # define SWIGSTDCALL
101 # endif
102 #endif
103
104 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
105 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
106 # define _CRT_SECURE_NO_DEPRECATE
107 #endif
108
109 /* -----------------------------------------------------------------------------
110 * This section contains generic SWIG labels for method/variable
111 * declarations/attributes, and other compiler dependent labels.
112 * ----------------------------------------------------------------------------- */
113
114 /* template workaround for compilers that cannot correctly implement the C++ standard */
115 #ifndef SWIGTEMPLATEDISAMBIGUATOR
116 # if defined(__SUNPRO_CC)
117 # if (__SUNPRO_CC <= 0x560)
118 # define SWIGTEMPLATEDISAMBIGUATOR template
119 # else
120 # define SWIGTEMPLATEDISAMBIGUATOR
121 # endif
122 # else
123 # define SWIGTEMPLATEDISAMBIGUATOR
124 # endif
125 #endif
126
127 /* inline attribute */
128 #ifndef SWIGINLINE
129 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
130 # define SWIGINLINE inline
131 # else
132 # define SWIGINLINE
133 # endif
134 #endif
135
136 /* attribute recognised by some compilers to avoid 'unused' warnings */
137 #ifndef SWIGUNUSED
138 # if defined(__GNUC__)
139 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
140 # define SWIGUNUSED __attribute__ ((__unused__))
141 # else
142 # define SWIGUNUSED
143 # endif
144 # elif defined(__ICC)
145 # define SWIGUNUSED __attribute__ ((__unused__))
146 # else
147 # define SWIGUNUSED
148 # endif
149 #endif
150
151 #ifndef SWIGUNUSEDPARM
152 # ifdef __cplusplus
153 # define SWIGUNUSEDPARM(p)
154 # else
155 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
156 # endif
157 #endif
158
159 /* internal SWIG method */
160 #ifndef SWIGINTERN
161 # define SWIGINTERN static SWIGUNUSED
162 #endif
163
164 /* internal inline SWIG method */
165 #ifndef SWIGINTERNINLINE
166 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
167 #endif
168
169 /* exporting methods */
170 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
171 # ifndef GCC_HASCLASSVISIBILITY
172 # define GCC_HASCLASSVISIBILITY
173 # endif
174 #endif
175
176 #ifndef SWIGEXPORT
177 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
178 # if defined(STATIC_LINKED)
179 # define SWIGEXPORT
180 # else
181 # define SWIGEXPORT __declspec(dllexport)
182 # endif
183 # else
184 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
185 # define SWIGEXPORT __attribute__ ((visibility("default")))
186 # else
187 # define SWIGEXPORT
188 # endif
189 # endif
190 #endif
191
192 /* calling conventions for Windows */
193 #ifndef SWIGSTDCALL
194 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
195 # define SWIGSTDCALL __stdcall
196 # else
197 # define SWIGSTDCALL
198 # endif
199 #endif
200
201 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
202 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
203 # define _CRT_SECURE_NO_DEPRECATE
204 #endif
205
206 /* -----------------------------------------------------------------------------
207 * swigrun.swg
208 *
209 * This file contains generic CAPI SWIG runtime support for pointer
210 * type checking.
211 * ----------------------------------------------------------------------------- */
212
213 /* This should only be incremented when either the layout of swig_type_info changes,
214 or for whatever reason, the runtime changes incompatibly */
215 #define SWIG_RUNTIME_VERSION "3"
216
217 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
218 #ifdef SWIG_TYPE_TABLE
219 # define SWIG_QUOTE_STRING(x) #x
220 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
221 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
222 #else
223 # define SWIG_TYPE_TABLE_NAME
224 #endif
225
226 /*
227 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
228 creating a static or dynamic library from the swig runtime code.
229 In 99.9% of the cases, swig just needs to declare them as 'static'.
230
231 But only do this if is strictly necessary, ie, if you have problems
232 with your compiler or so.
233 */
234
235 #ifndef SWIGRUNTIME
236 # define SWIGRUNTIME SWIGINTERN
237 #endif
238
239 #ifndef SWIGRUNTIMEINLINE
240 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
241 #endif
242
243 /* Generic buffer size */
244 #ifndef SWIG_BUFFER_SIZE
245 # define SWIG_BUFFER_SIZE 1024
246 #endif
247
248 /* Flags for pointer conversions */
249 #define SWIG_POINTER_DISOWN 0x1
250
251 /* Flags for new pointer objects */
252 #define SWIG_POINTER_OWN 0x1
253
254
255 /*
256 Flags/methods for returning states.
257
258 The swig conversion methods, as ConvertPtr, return and integer
259 that tells if the conversion was successful or not. And if not,
260 an error code can be returned (see swigerrors.swg for the codes).
261
262 Use the following macros/flags to set or process the returning
263 states.
264
265 In old swig versions, you usually write code as:
266
267 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
268 // success code
269 } else {
270 //fail code
271 }
272
273 Now you can be more explicit as:
274
275 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
276 if (SWIG_IsOK(res)) {
277 // success code
278 } else {
279 // fail code
280 }
281
282 that seems to be the same, but now you can also do
283
284 Type *ptr;
285 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
286 if (SWIG_IsOK(res)) {
287 // success code
288 if (SWIG_IsNewObj(res) {
289 ...
290 delete *ptr;
291 } else {
292 ...
293 }
294 } else {
295 // fail code
296 }
297
298 I.e., now SWIG_ConvertPtr can return new objects and you can
299 identify the case and take care of the deallocation. Of course that
300 requires also to SWIG_ConvertPtr to return new result values, as
301
302 int SWIG_ConvertPtr(obj, ptr,...) {
303 if (<obj is ok>) {
304 if (<need new object>) {
305 *ptr = <ptr to new allocated object>;
306 return SWIG_NEWOBJ;
307 } else {
308 *ptr = <ptr to old object>;
309 return SWIG_OLDOBJ;
310 }
311 } else {
312 return SWIG_BADOBJ;
313 }
314 }
315
316 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
317 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
318 swig errors code.
319
320 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
321 allows to return the 'cast rank', for example, if you have this
322
323 int food(double)
324 int fooi(int);
325
326 and you call
327
328 food(1) // cast rank '1' (1 -> 1.0)
329 fooi(1) // cast rank '0'
330
331 just use the SWIG_AddCast()/SWIG_CheckState()
332
333
334 */
335 #define SWIG_OK (0)
336 #define SWIG_ERROR (-1)
337 #define SWIG_IsOK(r) (r >= 0)
338 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
339
340 /* The CastRankLimit says how many bits are used for the cast rank */
341 #define SWIG_CASTRANKLIMIT (1 << 8)
342 /* The NewMask denotes the object was created (using new/malloc) */
343 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
344 /* The TmpMask is for in/out typemaps that use temporal objects */
345 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
346 /* Simple returning values */
347 #define SWIG_BADOBJ (SWIG_ERROR)
348 #define SWIG_OLDOBJ (SWIG_OK)
349 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
350 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
351 /* Check, add and del mask methods */
352 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
353 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
354 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
355 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
356 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
357 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
358
359
360 /* Cast-Rank Mode */
361 #if defined(SWIG_CASTRANK_MODE)
362 # ifndef SWIG_TypeRank
363 # define SWIG_TypeRank unsigned long
364 # endif
365 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
366 # define SWIG_MAXCASTRANK (2)
367 # endif
368 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
369 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)370 SWIGINTERNINLINE int SWIG_AddCast(int r) {
371 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
372 }
SWIG_CheckState(int r)373 SWIGINTERNINLINE int SWIG_CheckState(int r) {
374 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
375 }
376 #else /* no cast-rank mode */
377 # define SWIG_AddCast
378 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
379 #endif
380
381
382
383
384 #include <string.h>
385
386 #ifdef __cplusplus
387 extern "C" {
388 #endif
389
390 typedef void *(*swig_converter_func)(void *);
391 typedef struct swig_type_info *(*swig_dycast_func)(void **);
392
393 /* Structure to store inforomation on one type */
394 typedef struct swig_type_info {
395 const char *name; /* mangled name of this type */
396 const char *str; /* human readable name of this type */
397 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
398 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
399 void *clientdata; /* language specific type data */
400 int owndata; /* flag if the structure owns the clientdata */
401 } swig_type_info;
402
403 /* Structure to store a type and conversion function used for casting */
404 typedef struct swig_cast_info {
405 swig_type_info *type; /* pointer to type that is equivalent to this type */
406 swig_converter_func converter; /* function to cast the void pointers */
407 struct swig_cast_info *next; /* pointer to next cast in linked list */
408 struct swig_cast_info *prev; /* pointer to the previous cast */
409 } swig_cast_info;
410
411 /* Structure used to store module information
412 * Each module generates one structure like this, and the runtime collects
413 * all of these structures and stores them in a circularly linked list.*/
414 typedef struct swig_module_info {
415 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
416 size_t size; /* Number of types in this module */
417 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
418 swig_type_info **type_initial; /* Array of initially generated type structures */
419 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
420 void *clientdata; /* Language specific module data */
421 } swig_module_info;
422
423 /*
424 Compare two type names skipping the space characters, therefore
425 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
426
427 Return 0 when the two name types are equivalent, as in
428 strncmp, but skipping ' '.
429 */
430 SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)431 SWIG_TypeNameComp(const char *f1, const char *l1,
432 const char *f2, const char *l2) {
433 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
434 while ((*f1 == ' ') && (f1 != l1)) ++f1;
435 while ((*f2 == ' ') && (f2 != l2)) ++f2;
436 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
437 }
438 return (l1 - f1) - (l2 - f2);
439 }
440
441 /*
442 Check type equivalence in a name list like <name1>|<name2>|...
443 Return 0 if not equal, 1 if equal
444 */
445 SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)446 SWIG_TypeEquiv(const char *nb, const char *tb) {
447 int equiv = 0;
448 const char* te = tb + strlen(tb);
449 const char* ne = nb;
450 while (!equiv && *ne) {
451 for (nb = ne; *ne; ++ne) {
452 if (*ne == '|') break;
453 }
454 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
455 if (*ne) ++ne;
456 }
457 return equiv;
458 }
459
460 /*
461 Check type equivalence in a name list like <name1>|<name2>|...
462 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
463 */
464 SWIGRUNTIME int
SWIG_TypeCompare(const char * nb,const char * tb)465 SWIG_TypeCompare(const char *nb, const char *tb) {
466 int equiv = 0;
467 const char* te = tb + strlen(tb);
468 const char* ne = nb;
469 while (!equiv && *ne) {
470 for (nb = ne; *ne; ++ne) {
471 if (*ne == '|') break;
472 }
473 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
474 if (*ne) ++ne;
475 }
476 return equiv;
477 }
478
479
480 /* think of this as a c++ template<> or a scheme macro */
481 #define SWIG_TypeCheck_Template(comparison, ty) \
482 if (ty) { \
483 swig_cast_info *iter = ty->cast; \
484 while (iter) { \
485 if (comparison) { \
486 if (iter == ty->cast) return iter; \
487 /* Move iter to the top of the linked list */ \
488 iter->prev->next = iter->next; \
489 if (iter->next) \
490 iter->next->prev = iter->prev; \
491 iter->next = ty->cast; \
492 iter->prev = 0; \
493 if (ty->cast) ty->cast->prev = iter; \
494 ty->cast = iter; \
495 return iter; \
496 } \
497 iter = iter->next; \
498 } \
499 } \
500 return 0
501
502 /*
503 Check the typename
504 */
505 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)506 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
507 SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
508 }
509
510 /* Same as previous function, except strcmp is replaced with a pointer comparison */
511 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * into)512 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
513 SWIG_TypeCheck_Template(iter->type == from, into);
514 }
515
516 /*
517 Cast a pointer up an inheritance hierarchy
518 */
519 SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr)520 SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
521 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
522 }
523
524 /*
525 Dynamic pointer casting. Down an inheritance hierarchy
526 */
527 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)528 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
529 swig_type_info *lastty = ty;
530 if (!ty || !ty->dcast) return ty;
531 while (ty && (ty->dcast)) {
532 ty = (*ty->dcast)(ptr);
533 if (ty) lastty = ty;
534 }
535 return lastty;
536 }
537
538 /*
539 Return the name associated with this type
540 */
541 SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)542 SWIG_TypeName(const swig_type_info *ty) {
543 return ty->name;
544 }
545
546 /*
547 Return the pretty name associated with this type,
548 that is an unmangled type name in a form presentable to the user.
549 */
550 SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)551 SWIG_TypePrettyName(const swig_type_info *type) {
552 /* The "str" field contains the equivalent pretty names of the
553 type, separated by vertical-bar characters. We choose
554 to print the last name, as it is often (?) the most
555 specific. */
556 if (!type) return NULL;
557 if (type->str != NULL) {
558 const char *last_name = type->str;
559 const char *s;
560 for (s = type->str; *s; s++)
561 if (*s == '|') last_name = s+1;
562 return last_name;
563 }
564 else
565 return type->name;
566 }
567
568 /*
569 Set the clientdata field for a type
570 */
571 SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)572 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
573 swig_cast_info *cast = ti->cast;
574 /* if (ti->clientdata == clientdata) return; */
575 ti->clientdata = clientdata;
576
577 while (cast) {
578 if (!cast->converter) {
579 swig_type_info *tc = cast->type;
580 if (!tc->clientdata) {
581 SWIG_TypeClientData(tc, clientdata);
582 }
583 }
584 cast = cast->next;
585 }
586 }
587 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)588 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
589 SWIG_TypeClientData(ti, clientdata);
590 ti->owndata = 1;
591 }
592
593 /*
594 Search for a swig_type_info structure only by mangled name
595 Search is a O(log #types)
596
597 We start searching at module start, and finish searching when start == end.
598 Note: if start == end at the beginning of the function, we go all the way around
599 the circular list.
600 */
601 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)602 SWIG_MangledTypeQueryModule(swig_module_info *start,
603 swig_module_info *end,
604 const char *name) {
605 swig_module_info *iter = start;
606 do {
607 if (iter->size) {
608 register size_t l = 0;
609 register size_t r = iter->size - 1;
610 do {
611 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
612 register size_t i = (l + r) >> 1;
613 const char *iname = iter->types[i]->name;
614 if (iname) {
615 register int compare = strcmp(name, iname);
616 if (compare == 0) {
617 return iter->types[i];
618 } else if (compare < 0) {
619 if (i) {
620 r = i - 1;
621 } else {
622 break;
623 }
624 } else if (compare > 0) {
625 l = i + 1;
626 }
627 } else {
628 break; /* should never happen */
629 }
630 } while (l <= r);
631 }
632 iter = iter->next;
633 } while (iter != end);
634 return 0;
635 }
636
637 /*
638 Search for a swig_type_info structure for either a mangled name or a human readable name.
639 It first searches the mangled names of the types, which is a O(log #types)
640 If a type is not found it then searches the human readable names, which is O(#types).
641
642 We start searching at module start, and finish searching when start == end.
643 Note: if start == end at the beginning of the function, we go all the way around
644 the circular list.
645 */
646 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)647 SWIG_TypeQueryModule(swig_module_info *start,
648 swig_module_info *end,
649 const char *name) {
650 /* STEP 1: Search the name field using binary search */
651 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
652 if (ret) {
653 return ret;
654 } else {
655 /* STEP 2: If the type hasn't been found, do a complete search
656 of the str field (the human readable name) */
657 swig_module_info *iter = start;
658 do {
659 register size_t i = 0;
660 for (; i < iter->size; ++i) {
661 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
662 return iter->types[i];
663 }
664 iter = iter->next;
665 } while (iter != end);
666 }
667
668 /* neither found a match */
669 return 0;
670 }
671
672 /*
673 Pack binary data into a string
674 */
675 SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)676 SWIG_PackData(char *c, void *ptr, size_t sz) {
677 static const char hex[17] = "0123456789abcdef";
678 register const unsigned char *u = (unsigned char *) ptr;
679 register const unsigned char *eu = u + sz;
680 for (; u != eu; ++u) {
681 register unsigned char uu = *u;
682 *(c++) = hex[(uu & 0xf0) >> 4];
683 *(c++) = hex[uu & 0xf];
684 }
685 return c;
686 }
687
688 /*
689 Unpack binary data from a string
690 */
691 SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)692 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
693 register unsigned char *u = (unsigned char *) ptr;
694 register const unsigned char *eu = u + sz;
695 for (; u != eu; ++u) {
696 register char d = *(c++);
697 register unsigned char uu;
698 if ((d >= '0') && (d <= '9'))
699 uu = ((d - '0') << 4);
700 else if ((d >= 'a') && (d <= 'f'))
701 uu = ((d - ('a'-10)) << 4);
702 else
703 return (char *) 0;
704 d = *(c++);
705 if ((d >= '0') && (d <= '9'))
706 uu |= (d - '0');
707 else if ((d >= 'a') && (d <= 'f'))
708 uu |= (d - ('a'-10));
709 else
710 return (char *) 0;
711 *u = uu;
712 }
713 return c;
714 }
715
716 /*
717 Pack 'void *' into a string buffer.
718 */
719 SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)720 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
721 char *r = buff;
722 if ((2*sizeof(void *) + 2) > bsz) return 0;
723 *(r++) = '_';
724 r = SWIG_PackData(r,&ptr,sizeof(void *));
725 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
726 strcpy(r,name);
727 return buff;
728 }
729
730 SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)731 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
732 if (*c != '_') {
733 if (strcmp(c,"NULL") == 0) {
734 *ptr = (void *) 0;
735 return name;
736 } else {
737 return 0;
738 }
739 }
740 return SWIG_UnpackData(++c,ptr,sizeof(void *));
741 }
742
743 SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)744 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
745 char *r = buff;
746 size_t lname = (name ? strlen(name) : 0);
747 if ((2*sz + 2 + lname) > bsz) return 0;
748 *(r++) = '_';
749 r = SWIG_PackData(r,ptr,sz);
750 if (lname) {
751 strncpy(r,name,lname+1);
752 } else {
753 *r = 0;
754 }
755 return buff;
756 }
757
758 SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)759 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
760 if (*c != '_') {
761 if (strcmp(c,"NULL") == 0) {
762 memset(ptr,0,sz);
763 return name;
764 } else {
765 return 0;
766 }
767 }
768 return SWIG_UnpackData(++c,ptr,sz);
769 }
770
771 #ifdef __cplusplus
772 }
773 #endif
774
775 /* Errors in SWIG */
776 #define SWIG_UnknownError -1
777 #define SWIG_IOError -2
778 #define SWIG_RuntimeError -3
779 #define SWIG_IndexError -4
780 #define SWIG_TypeError -5
781 #define SWIG_DivisionByZero -6
782 #define SWIG_OverflowError -7
783 #define SWIG_SyntaxError -8
784 #define SWIG_ValueError -9
785 #define SWIG_SystemError -10
786 #define SWIG_AttributeError -11
787 #define SWIG_MemoryError -12
788 #define SWIG_NullReferenceError -13
789
790
791
792 #include <ruby.h>
793
794 /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
795 #ifndef NUM2LL
796 #define NUM2LL(x) NUM2LONG((x))
797 #endif
798 #ifndef LL2NUM
799 #define LL2NUM(x) INT2NUM((long) (x))
800 #endif
801 #ifndef ULL2NUM
802 #define ULL2NUM(x) UINT2NUM((unsigned long) (x))
803 #endif
804
805 /* Ruby 1.7 doesn't (yet) define NUM2ULL() */
806 #ifndef NUM2ULL
807 #ifdef HAVE_LONG_LONG
808 #define NUM2ULL(x) rb_num2ull((x))
809 #else
810 #define NUM2ULL(x) NUM2ULONG(x)
811 #endif
812 #endif
813
814 /* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */
815 /* Define these for older versions so we can just write code the new way */
816 #ifndef RSTRING_LEN
817 # define RSTRING_LEN(x) RSTRING(x)->len
818 #endif
819 #ifndef RSTRING_PTR
820 # define RSTRING_PTR(x) RSTRING(x)->ptr
821 #endif
822 #ifndef RARRAY_LEN
823 # define RARRAY_LEN(x) RARRAY(x)->len
824 #endif
825 #ifndef RARRAY_PTR
826 # define RARRAY_PTR(x) RARRAY(x)->ptr
827 #endif
828
829 /*
830 * Need to be very careful about how these macros are defined, especially
831 * when compiling C++ code or C code with an ANSI C compiler.
832 *
833 * VALUEFUNC(f) is a macro used to typecast a C function that implements
834 * a Ruby method so that it can be passed as an argument to API functions
835 * like rb_define_method() and rb_define_singleton_method().
836 *
837 * VOIDFUNC(f) is a macro used to typecast a C function that implements
838 * either the "mark" or "free" stuff for a Ruby Data object, so that it
839 * can be passed as an argument to API functions like Data_Wrap_Struct()
840 * and Data_Make_Struct().
841 */
842
843 #ifdef __cplusplus
844 # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
845 # define PROTECTFUNC(f) ((VALUE (*)()) f)
846 # define VALUEFUNC(f) ((VALUE (*)()) f)
847 # define VOIDFUNC(f) ((void (*)()) f)
848 # else
849 # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
850 # define PROTECTFUNC(f) ((VALUE (*)()) f)
851 # define VALUEFUNC(f) ((VALUE (*)()) f)
852 # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
853 # else /* These definitions should work for Ruby 1.7+ */
854 # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
855 # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
856 # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
857 # endif
858 # endif
859 #else
860 # define VALUEFUNC(f) (f)
861 # define VOIDFUNC(f) (f)
862 #endif
863
864 /* Don't use for expressions have side effect */
865 #ifndef RB_STRING_VALUE
866 #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
867 #endif
868 #ifndef StringValue
869 #define StringValue(s) RB_STRING_VALUE(s)
870 #endif
871 #ifndef StringValuePtr
872 #define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
873 #endif
874 #ifndef StringValueLen
875 #define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
876 #endif
877 #ifndef SafeStringValue
878 #define SafeStringValue(v) do {\
879 StringValue(v);\
880 rb_check_safe_str(v);\
881 } while (0)
882 #endif
883
884 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
885 #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
886 #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
887 #endif
888
889
890 /* -----------------------------------------------------------------------------
891 * error manipulation
892 * ----------------------------------------------------------------------------- */
893
894
895 /* Define some additional error types */
896 #define SWIG_ObjectPreviouslyDeletedError -100
897
898
899 /* Define custom exceptions for errors that do not map to existing Ruby
900 exceptions. Note this only works for C++ since a global cannot be
901 initialized by a funtion in C. For C, fallback to rb_eRuntimeError.*/
902
903 SWIGINTERN VALUE
getNullReferenceError(void)904 getNullReferenceError(void) {
905 static int init = 0;
906 static VALUE rb_eNullReferenceError ;
907 if (!init) {
908 init = 1;
909 rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
910 }
911 return rb_eNullReferenceError;
912 }
913
914 SWIGINTERN VALUE
getObjectPreviouslyDeletedError(void)915 getObjectPreviouslyDeletedError(void) {
916 static int init = 0;
917 static VALUE rb_eObjectPreviouslyDeleted ;
918 if (!init) {
919 init = 1;
920 rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
921 }
922 return rb_eObjectPreviouslyDeleted;
923 }
924
925
926 SWIGINTERN VALUE
SWIG_Ruby_ErrorType(int SWIG_code)927 SWIG_Ruby_ErrorType(int SWIG_code) {
928 VALUE type;
929 switch (SWIG_code) {
930 case SWIG_MemoryError:
931 type = rb_eNoMemError;
932 break;
933 case SWIG_IOError:
934 type = rb_eIOError;
935 break;
936 case SWIG_RuntimeError:
937 type = rb_eRuntimeError;
938 break;
939 case SWIG_IndexError:
940 type = rb_eIndexError;
941 break;
942 case SWIG_TypeError:
943 type = rb_eTypeError;
944 break;
945 case SWIG_DivisionByZero:
946 type = rb_eZeroDivError;
947 break;
948 case SWIG_OverflowError:
949 type = rb_eRangeError;
950 break;
951 case SWIG_SyntaxError:
952 type = rb_eSyntaxError;
953 break;
954 case SWIG_ValueError:
955 type = rb_eArgError;
956 break;
957 case SWIG_SystemError:
958 type = rb_eFatal;
959 break;
960 case SWIG_AttributeError:
961 type = rb_eRuntimeError;
962 break;
963 case SWIG_NullReferenceError:
964 type = getNullReferenceError();
965 break;
966 case SWIG_ObjectPreviouslyDeletedError:
967 type = getObjectPreviouslyDeletedError();
968 break;
969 case SWIG_UnknownError:
970 type = rb_eRuntimeError;
971 break;
972 default:
973 type = rb_eRuntimeError;
974 }
975 return type;
976 }
977
978
979
980
981 /* -----------------------------------------------------------------------------
982 * See the LICENSE file for information on copyright, usage and redistribution
983 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
984 *
985 * rubytracking.swg
986 *
987 * This file contains support for tracking mappings from
988 * Ruby objects to C++ objects. This functionality is needed
989 * to implement mark functions for Ruby's mark and sweep
990 * garbage collector.
991 * ----------------------------------------------------------------------------- */
992
993 #ifdef __cplusplus
994 extern "C" {
995 #endif
996
997
998 /* Global Ruby hash table to store Trackings from C/C++
999 structs to Ruby Objects. */
1000 static VALUE swig_ruby_trackings;
1001
1002 /* Global variable that stores a reference to the ruby
1003 hash table delete function. */
1004 static ID swig_ruby_hash_delete = 0;
1005
1006 /* Setup a Ruby hash table to store Trackings */
SWIG_RubyInitializeTrackings(void)1007 SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1008 /* Create a ruby hash table to store Trackings from C++
1009 objects to Ruby objects. Also make sure to tell
1010 the garabage collector about the hash table. */
1011 swig_ruby_trackings = rb_hash_new();
1012 rb_gc_register_address(&swig_ruby_trackings);
1013
1014 /* Now store a reference to the hash table delete function
1015 so that we only have to look it up once.*/
1016 swig_ruby_hash_delete = rb_intern("delete");
1017 }
1018
1019 /* Get a Ruby number to reference a pointer */
SWIG_RubyPtrToReference(void * ptr)1020 SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
1021 /* We cast the pointer to an unsigned long
1022 and then store a reference to it using
1023 a Ruby number object. */
1024
1025 /* Convert the pointer to a Ruby number */
1026 unsigned long value = (unsigned long) ptr;
1027 return LONG2NUM(value);
1028 }
1029
1030 /* Get a Ruby number to reference an object */
SWIG_RubyObjectToReference(VALUE object)1031 SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
1032 /* We cast the object to an unsigned long
1033 and then store a reference to it using
1034 a Ruby number object. */
1035
1036 /* Convert the Object to a Ruby number */
1037 unsigned long value = (unsigned long) object;
1038 return LONG2NUM(value);
1039 }
1040
1041 /* Get a Ruby object from a previously stored reference */
SWIG_RubyReferenceToObject(VALUE reference)1042 SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
1043 /* The provided Ruby number object is a reference
1044 to the Ruby object we want.*/
1045
1046 /* First convert the Ruby number to a C number */
1047 unsigned long value = NUM2LONG(reference);
1048 return (VALUE) value;
1049 }
1050
1051 /* Add a Tracking from a C/C++ struct to a Ruby object */
SWIG_RubyAddTracking(void * ptr,VALUE object)1052 SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
1053 /* In a Ruby hash table we store the pointer and
1054 the associated Ruby object. The trick here is
1055 that we cannot store the Ruby object directly - if
1056 we do then it cannot be garbage collected. So
1057 instead we typecast it as a unsigned long and
1058 convert it to a Ruby number object.*/
1059
1060 /* Get a reference to the pointer as a Ruby number */
1061 VALUE key = SWIG_RubyPtrToReference(ptr);
1062
1063 /* Get a reference to the Ruby object as a Ruby number */
1064 VALUE value = SWIG_RubyObjectToReference(object);
1065
1066 /* Store the mapping to the global hash table. */
1067 rb_hash_aset(swig_ruby_trackings, key, value);
1068 }
1069
1070 /* Get the Ruby object that owns the specified C/C++ struct */
SWIG_RubyInstanceFor(void * ptr)1071 SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1072 /* Get a reference to the pointer as a Ruby number */
1073 VALUE key = SWIG_RubyPtrToReference(ptr);
1074
1075 /* Now lookup the value stored in the global hash table */
1076 VALUE value = rb_hash_aref(swig_ruby_trackings, key);
1077
1078 if (value == Qnil) {
1079 /* No object exists - return nil. */
1080 return Qnil;
1081 }
1082 else {
1083 /* Convert this value to Ruby object */
1084 return SWIG_RubyReferenceToObject(value);
1085 }
1086 }
1087
1088 /* Remove a Tracking from a C/C++ struct to a Ruby object. It
1089 is very important to remove objects once they are destroyed
1090 since the same memory address may be reused later to create
1091 a new object. */
SWIG_RubyRemoveTracking(void * ptr)1092 SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
1093 /* Get a reference to the pointer as a Ruby number */
1094 VALUE key = SWIG_RubyPtrToReference(ptr);
1095
1096 /* Delete the object from the hash table by calling Ruby's
1097 do this we need to call the Hash.delete method.*/
1098 rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
1099 }
1100
1101 /* This is a helper method that unlinks a Ruby object from its
1102 underlying C++ object. This is needed if the lifetime of the
1103 Ruby object is longer than the C++ object */
SWIG_RubyUnlinkObjects(void * ptr)1104 SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1105 VALUE object = SWIG_RubyInstanceFor(ptr);
1106
1107 if (object != Qnil) {
1108 DATA_PTR(object) = 0;
1109 }
1110 }
1111
1112
1113 #ifdef __cplusplus
1114 }
1115 #endif
1116
1117 /* -----------------------------------------------------------------------------
1118 * Ruby API portion that goes into the runtime
1119 * ----------------------------------------------------------------------------- */
1120
1121 #ifdef __cplusplus
1122 extern "C" {
1123 #endif
1124
1125 SWIGINTERN VALUE
SWIG_Ruby_AppendOutput(VALUE target,VALUE o)1126 SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1127 if (NIL_P(target)) {
1128 target = o;
1129 } else {
1130 if (TYPE(target) != T_ARRAY) {
1131 VALUE o2 = target;
1132 target = rb_ary_new();
1133 rb_ary_push(target, o2);
1134 }
1135 rb_ary_push(target, o);
1136 }
1137 return target;
1138 }
1139
1140 #ifdef __cplusplus
1141 }
1142 #endif
1143
1144
1145 /* -----------------------------------------------------------------------------
1146 * See the LICENSE file for information on copyright, usage and redistribution
1147 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
1148 *
1149 * rubyrun.swg
1150 *
1151 * This file contains the runtime support for Ruby modules
1152 * and includes code for managing global variables and pointer
1153 * type checking.
1154 * ----------------------------------------------------------------------------- */
1155
1156 /* For backward compatibility only */
1157 #define SWIG_POINTER_EXCEPTION 0
1158
1159 /* for raw pointers */
1160 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1161 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1162 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
1163 #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
1164 #define swig_owntype ruby_owntype
1165
1166 /* for raw packed data */
1167 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
1168 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1169
1170 /* for class or struct pointers */
1171 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1172 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1173
1174 /* for C or C++ function pointers */
1175 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
1176 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
1177
1178 /* for C++ member pointers, ie, member methods */
1179 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
1180 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1181
1182
1183 /* Runtime API */
1184
1185 #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule()
1186 #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
1187
1188
1189 /* Error manipulation */
1190
1191 #define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
1192 #define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg)
1193 #define SWIG_fail goto fail
1194
1195
1196 /* Ruby-specific SWIG API */
1197
1198 #define SWIG_InitRuntime() SWIG_Ruby_InitRuntime()
1199 #define SWIG_define_class(ty) SWIG_Ruby_define_class(ty)
1200 #define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty)
1201 #define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
1202 #define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
1203
1204
1205 /* -----------------------------------------------------------------------------
1206 * pointers/data manipulation
1207 * ----------------------------------------------------------------------------- */
1208
1209 #ifdef __cplusplus
1210 extern "C" {
1211 #if 0
1212 } /* cc-mode */
1213 #endif
1214 #endif
1215
1216 typedef struct {
1217 VALUE klass;
1218 VALUE mImpl;
1219 void (*mark)(void *);
1220 void (*destroy)(void *);
1221 int trackObjects;
1222 } swig_class;
1223
1224
1225 static VALUE _mSWIG = Qnil;
1226 static VALUE _cSWIG_Pointer = Qnil;
1227 static VALUE swig_runtime_data_type_pointer = Qnil;
1228
1229 SWIGRUNTIME VALUE
getExceptionClass(void)1230 getExceptionClass(void) {
1231 static int init = 0;
1232 static VALUE rubyExceptionClass ;
1233 if (!init) {
1234 init = 1;
1235 rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
1236 }
1237 return rubyExceptionClass;
1238 }
1239
1240 /* This code checks to see if the Ruby object being raised as part
1241 of an exception inherits from the Ruby class Exception. If so,
1242 the object is simply returned. If not, then a new Ruby exception
1243 object is created and that will be returned to Ruby.*/
1244 SWIGRUNTIME VALUE
SWIG_Ruby_ExceptionType(swig_type_info * desc,VALUE obj)1245 SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
1246 VALUE exceptionClass = getExceptionClass();
1247 if (rb_obj_is_kind_of(obj, exceptionClass)) {
1248 return obj;
1249 } else {
1250 return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
1251 }
1252 }
1253
1254 /* Initialize Ruby runtime support */
1255 SWIGRUNTIME void
SWIG_Ruby_InitRuntime(void)1256 SWIG_Ruby_InitRuntime(void)
1257 {
1258 if (_mSWIG == Qnil) {
1259 _mSWIG = rb_define_module("SWIG");
1260 }
1261 }
1262
1263 /* Define Ruby class for C type */
1264 SWIGRUNTIME void
SWIG_Ruby_define_class(swig_type_info * type)1265 SWIG_Ruby_define_class(swig_type_info *type)
1266 {
1267 VALUE klass;
1268 char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1269 sprintf(klass_name, "TYPE%s", type->name);
1270 if (NIL_P(_cSWIG_Pointer)) {
1271 _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1272 rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1273 }
1274 klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1275 free((void *) klass_name);
1276 }
1277
1278 /* Create a new pointer object */
1279 SWIGRUNTIME VALUE
SWIG_Ruby_NewPointerObj(void * ptr,swig_type_info * type,int flags)1280 SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1281 {
1282 int own = flags & SWIG_POINTER_OWN;
1283
1284 char *klass_name;
1285 swig_class *sklass;
1286 VALUE klass;
1287 VALUE obj;
1288
1289 if (!ptr)
1290 return Qnil;
1291
1292 if (type->clientdata) {
1293 sklass = (swig_class *) type->clientdata;
1294
1295 /* Are we tracking this class and have we already returned this Ruby object? */
1296 if (sklass->trackObjects) {
1297 obj = SWIG_RubyInstanceFor(ptr);
1298
1299 /* Check the object's type and make sure it has the correct type.
1300 It might not in cases where methods do things like
1301 downcast methods. */
1302 if (obj != Qnil) {
1303 VALUE value = rb_iv_get(obj, "__swigtype__");
1304 char* type_name = RSTRING_PTR(value);
1305
1306 if (strcmp(type->name, type_name) == 0) {
1307 return obj;
1308 }
1309 }
1310 }
1311
1312 /* Create a new Ruby object */
1313 obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), (own ? VOIDFUNC(sklass->destroy) : 0), ptr);
1314
1315 /* If tracking is on for this class then track this object. */
1316 if (sklass->trackObjects) {
1317 SWIG_RubyAddTracking(ptr, obj);
1318 }
1319 } else {
1320 klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1321 sprintf(klass_name, "TYPE%s", type->name);
1322 klass = rb_const_get(_mSWIG, rb_intern(klass_name));
1323 free((void *) klass_name);
1324 obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1325 }
1326 rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
1327
1328 return obj;
1329 }
1330
1331 /* Create a new class instance (always owned) */
1332 SWIGRUNTIME VALUE
SWIG_Ruby_NewClassInstance(VALUE klass,swig_type_info * type)1333 SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
1334 {
1335 VALUE obj;
1336 swig_class *sklass = (swig_class *) type->clientdata;
1337 obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
1338 rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
1339 return obj;
1340 }
1341
1342 /* Get type mangle from class name */
1343 SWIGRUNTIMEINLINE char *
SWIG_Ruby_MangleStr(VALUE obj)1344 SWIG_Ruby_MangleStr(VALUE obj)
1345 {
1346 VALUE stype = rb_iv_get(obj, "__swigtype__");
1347 return StringValuePtr(stype);
1348 }
1349
1350 /* Acquire a pointer value */
1351 typedef void (*ruby_owntype)(void*);
1352
1353 SWIGRUNTIME ruby_owntype
SWIG_Ruby_AcquirePtr(VALUE obj,ruby_owntype own)1354 SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
1355 if (obj) {
1356 ruby_owntype oldown = RDATA(obj)->dfree;
1357 RDATA(obj)->dfree = own;
1358 return oldown;
1359 } else {
1360 return 0;
1361 }
1362 }
1363
1364 /* Convert a pointer value */
1365 SWIGRUNTIME int
SWIG_Ruby_ConvertPtrAndOwn(VALUE obj,void ** ptr,swig_type_info * ty,int flags,ruby_owntype * own)1366 SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
1367 {
1368 char *c;
1369 swig_cast_info *tc;
1370 void *vptr = 0;
1371
1372 /* Grab the pointer */
1373 if (NIL_P(obj)) {
1374 *ptr = 0;
1375 return SWIG_OK;
1376 } else {
1377 if (TYPE(obj) != T_DATA) {
1378 return SWIG_ERROR;
1379 }
1380 Data_Get_Struct(obj, void, vptr);
1381 }
1382
1383 if (own) *own = RDATA(obj)->dfree;
1384
1385 /* Check to see if the input object is giving up ownership
1386 of the underlying C struct or C++ object. If so then we
1387 need to reset the destructor since the Ruby object no
1388 longer owns the underlying C++ object.*/
1389 if (flags & SWIG_POINTER_DISOWN) {
1390 /* Is tracking on for this class? */
1391 int track = 0;
1392 if (ty && ty->clientdata) {
1393 swig_class *sklass = (swig_class *) ty->clientdata;
1394 track = sklass->trackObjects;
1395 }
1396
1397 if (track) {
1398 /* We are tracking objects for this class. Thus we change the destructor
1399 * to SWIG_RubyRemoveTracking. This allows us to
1400 * remove the mapping from the C++ to Ruby object
1401 * when the Ruby object is garbage collected. If we don't
1402 * do this, then it is possible we will return a reference
1403 * to a Ruby object that no longer exists thereby crashing Ruby. */
1404 RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
1405 } else {
1406 RDATA(obj)->dfree = 0;
1407 }
1408 }
1409
1410 /* Do type-checking if type info was provided */
1411 if (ty) {
1412 if (ty->clientdata) {
1413 if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
1414 if (vptr == 0) {
1415 /* The object has already been deleted */
1416 return SWIG_ObjectPreviouslyDeletedError;
1417 }
1418 *ptr = vptr;
1419 return SWIG_OK;
1420 }
1421 }
1422 if ((c = SWIG_MangleStr(obj)) == NULL) {
1423 return SWIG_ERROR;
1424 }
1425 tc = SWIG_TypeCheck(c, ty);
1426 if (!tc) {
1427 return SWIG_ERROR;
1428 }
1429 *ptr = SWIG_TypeCast(tc, vptr);
1430 } else {
1431 *ptr = vptr;
1432 }
1433
1434 return SWIG_OK;
1435 }
1436
1437 /* Check convert */
1438 SWIGRUNTIMEINLINE int
SWIG_Ruby_CheckConvert(VALUE obj,swig_type_info * ty)1439 SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
1440 {
1441 char *c = SWIG_MangleStr(obj);
1442 if (!c) return 0;
1443 return SWIG_TypeCheck(c,ty) != 0;
1444 }
1445
1446 SWIGRUNTIME VALUE
SWIG_Ruby_NewPackedObj(void * ptr,int sz,swig_type_info * type)1447 SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1448 char result[1024];
1449 char *r = result;
1450 if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
1451 *(r++) = '_';
1452 r = SWIG_PackData(r, ptr, sz);
1453 strcpy(r, type->name);
1454 return rb_str_new2(result);
1455 }
1456
1457 /* Convert a packed value value */
1458 SWIGRUNTIME int
SWIG_Ruby_ConvertPacked(VALUE obj,void * ptr,int sz,swig_type_info * ty)1459 SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1460 swig_cast_info *tc;
1461 const char *c;
1462
1463 if (TYPE(obj) != T_STRING) goto type_error;
1464 c = StringValuePtr(obj);
1465 /* Pointer values must start with leading underscore */
1466 if (*c != '_') goto type_error;
1467 c++;
1468 c = SWIG_UnpackData(c, ptr, sz);
1469 if (ty) {
1470 tc = SWIG_TypeCheck(c, ty);
1471 if (!tc) goto type_error;
1472 }
1473 return SWIG_OK;
1474
1475 type_error:
1476 return SWIG_ERROR;
1477 }
1478
1479 SWIGRUNTIME swig_module_info *
SWIG_Ruby_GetModule(void)1480 SWIG_Ruby_GetModule(void)
1481 {
1482 VALUE pointer;
1483 swig_module_info *ret = 0;
1484 VALUE verbose = rb_gv_get("VERBOSE");
1485
1486 /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
1487 rb_gv_set("VERBOSE", Qfalse);
1488
1489 /* first check if pointer already created */
1490 pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1491 if (pointer != Qnil) {
1492 Data_Get_Struct(pointer, swig_module_info, ret);
1493 }
1494
1495 /* reinstate warnings */
1496 rb_gv_set("VERBOSE", verbose);
1497 return ret;
1498 }
1499
1500 SWIGRUNTIME void
SWIG_Ruby_SetModule(swig_module_info * pointer)1501 SWIG_Ruby_SetModule(swig_module_info *pointer)
1502 {
1503 /* register a new class */
1504 VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1505 /* create and store the structure pointer to a global variable */
1506 swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1507 rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
1508 }
1509
1510 #ifdef __cplusplus
1511 #if 0
1512 { /* cc-mode */
1513 #endif
1514 }
1515 #endif
1516
1517
1518
1519 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1520
1521 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1522
1523
1524
1525 #define SWIG_exception(code, msg) do { SWIG_Error(code, msg);; } while(0)
1526
1527
1528 /* -------- TYPES TABLE (BEGIN) -------- */
1529
1530 #define SWIGTYPE_p_GroupOptarg swig_types[0]
1531 #define SWIGTYPE_p_LoggerInfo swig_types[1]
1532 #define SWIGTYPE_p_SelectOptarg swig_types[2]
1533 #define SWIGTYPE_p_SortOptarg swig_types[3]
1534 #define SWIGTYPE_p__sen_group_optarg swig_types[4]
1535 #define SWIGTYPE_p__sen_logger_info swig_types[5]
1536 #define SWIGTYPE_p__sen_select_optarg swig_types[6]
1537 #define SWIGTYPE_p__sen_sort_optarg swig_types[7]
1538 #define SWIGTYPE_p_char swig_types[8]
1539 #define SWIGTYPE_p_int swig_types[9]
1540 #define SWIGTYPE_p_p_char swig_types[10]
1541 #define SWIGTYPE_p_p_void swig_types[11]
1542 #define SWIGTYPE_p_query_term_callback swig_types[12]
1543 #define SWIGTYPE_p_sen_ctx swig_types[13]
1544 #define SWIGTYPE_p_sen_db swig_types[14]
1545 #define SWIGTYPE_p_sen_encoding swig_types[15]
1546 #define SWIGTYPE_p_sen_group_optarg swig_types[16]
1547 #define SWIGTYPE_p_sen_index swig_types[17]
1548 #define SWIGTYPE_p_sen_inv swig_types[18]
1549 #define SWIGTYPE_p_sen_logger_info swig_types[19]
1550 #define SWIGTYPE_p_sen_query swig_types[20]
1551 #define SWIGTYPE_p_sen_recordh swig_types[21]
1552 #define SWIGTYPE_p_sen_records swig_types[22]
1553 #define SWIGTYPE_p_sen_records_heap swig_types[23]
1554 #define SWIGTYPE_p_sen_select_optarg swig_types[24]
1555 #define SWIGTYPE_p_sen_set swig_types[25]
1556 #define SWIGTYPE_p_sen_set_cursor swig_types[26]
1557 #define SWIGTYPE_p_sen_set_eh swig_types[27]
1558 #define SWIGTYPE_p_sen_set_sort_optarg swig_types[28]
1559 #define SWIGTYPE_p_sen_snip swig_types[29]
1560 #define SWIGTYPE_p_sen_snip_mapping swig_types[30]
1561 #define SWIGTYPE_p_sen_sort_optarg swig_types[31]
1562 #define SWIGTYPE_p_sen_sym swig_types[32]
1563 #define SWIGTYPE_p_sen_values swig_types[33]
1564 #define SWIGTYPE_p_unsigned_int swig_types[34]
1565 #define SWIGTYPE_p_unsigned_long_long swig_types[35]
1566 static swig_type_info *swig_types[37];
1567 static swig_module_info swig_module = {swig_types, 36, 0, 0, 0, 0};
1568 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1569 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1570
1571 /* -------- TYPES TABLE (END) -------- */
1572
1573 #define SWIG_init Init_senna
1574 #define SWIG_name "Senna"
1575
1576 static VALUE mSenna;
1577
1578 #define SWIGVERSION 0x010331
1579 #define SWIG_VERSION SWIGVERSION
1580
1581
1582 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1583 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1584
1585
1586 #define Init_senna Init_senna_api
1587 #include "senna.h"
1588
sen_index_keys(sen_index * i)1589 static sen_sym * sen_index_keys(sen_index *i) { return i->keys; }
sen_index_lexicon(sen_index * i)1590 static sen_sym * sen_index_lexicon(sen_index *i) { return i->lexicon; }
sen_index_inv(sen_index * i)1591 static sen_inv * sen_index_inv(sen_index *i) { return i->inv; }
sen_set_eh_nth(sen_set_eh * eh,int i)1592 static sen_set_eh * sen_set_eh_nth(sen_set_eh *eh, int i) { return eh + i; }
1593
1594 struct LoggerInfo {
1595 int max_level;
1596 int flags;
1597 VALUE func;
1598 struct _sen_logger_info info;
1599 };
1600
1601 struct SelectOptarg {
1602 sen_sel_mode mode;
1603 int similarity_threshold;
1604 int max_interval;
1605 VALUE weight_vector;
1606 VALUE func;
1607 VALUE func_arg;
1608 struct _sen_select_optarg optarg;
1609 };
1610
1611 struct GroupOptarg {
1612 sen_sort_mode mode;
1613 VALUE func;
1614 VALUE func_arg;
1615 int key_size;
1616 struct _sen_group_optarg optarg;
1617 };
1618
1619 struct SortOptarg {
1620 sen_sort_mode mode;
1621 VALUE compar;
1622 VALUE compar_arg;
1623 struct _sen_sort_optarg optarg;
1624 };
1625
1626 static void
logger_handler(int level,const char * time,const char * title,const char * msg,const char * location,void * func_arg)1627 logger_handler(int level, const char *time, const char *title,
1628 const char *msg, const char *location, void *func_arg)
1629 {
1630 struct LoggerInfo *info = (struct LoggerInfo *)func_arg;
1631 rb_funcall(info->func, rb_intern("call"), 5,
1632 INT2FIX(level),
1633 rb_str_new2(time),
1634 rb_str_new2(title),
1635 rb_str_new2(msg),
1636 rb_str_new2(location));
1637 }
1638
1639 static int
select_handler(sen_records * r,const void * key,int sid,void * func_arg)1640 select_handler(sen_records *r, const void *key, int sid, void *func_arg)
1641 {
1642 VALUE result;
1643 struct SelectOptarg *optarg = (struct SelectOptarg *)func_arg;
1644 result = rb_funcall(optarg->func, rb_intern("call"), 4,
1645 SWIG_NewPointerObj(SWIG_as_voidptr(r), SWIGTYPE_p_sen_records, 0),
1646 rb_str_new2(key),
1647 INT2FIX(sid),
1648 optarg->func_arg);
1649 return FIX2INT(result);
1650 }
1651
1652 static int
group_handler(sen_records * r,const sen_recordh * rh,void * gkey,void * func_arg)1653 group_handler(sen_records *r, const sen_recordh *rh, void *gkey, void *func_arg)
1654 {
1655 VALUE result;
1656 struct GroupOptarg *optarg = (struct GroupOptarg *)func_arg;
1657 result = rb_funcall(optarg->func, rb_intern("call"), 3,
1658 SWIG_NewPointerObj(SWIG_as_voidptr(r), SWIGTYPE_p_sen_records, 0),
1659 SWIG_NewPointerObj(SWIG_as_voidptr(rh), SWIGTYPE_p_sen_recordh, 0),
1660 optarg->func_arg);
1661 if (result == Qnil || TYPE(result) != T_STRING) {
1662 return 1;
1663 } else {
1664 memcpy(gkey, rb_string_value_ptr(&result), optarg->key_size);
1665 return 0;
1666 }
1667 }
1668
1669 static int
sort_handler(sen_records * ra,sen_recordh * a,sen_records * rb,sen_recordh * b,void * compar_arg)1670 sort_handler(sen_records *ra, sen_recordh *a, sen_records *rb, sen_recordh *b, void *compar_arg)
1671 {
1672 VALUE result;
1673 struct SortOptarg *optarg = (struct SortOptarg *)compar_arg;
1674 result = rb_funcall(optarg->compar, rb_intern("call"), 5,
1675 SWIG_NewPointerObj(SWIG_as_voidptr(ra), SWIGTYPE_p_sen_records, 0),
1676 SWIG_NewPointerObj(SWIG_as_voidptr(a), SWIGTYPE_p_sen_recordh, 0),
1677 SWIG_NewPointerObj(SWIG_as_voidptr(rb), SWIGTYPE_p_sen_records, 0),
1678 SWIG_NewPointerObj(SWIG_as_voidptr(b), SWIGTYPE_p_sen_recordh, 0),
1679 optarg->compar_arg);
1680 return FIX2INT(result);
1681 }
1682
1683 static int
set_sort_handler(sen_set * sa,sen_set_eh * a,sen_set * sb,sen_set_eh * b,void * compar_arg)1684 set_sort_handler(sen_set *sa, sen_set_eh *a, sen_set *sb, sen_set_eh *b, void *compar_arg)
1685 {
1686 VALUE result;
1687 struct SortOptarg *optarg = (struct SortOptarg *)compar_arg;
1688 result = rb_funcall(optarg->compar, rb_intern("call"), 5,
1689 SWIG_NewPointerObj(SWIG_as_voidptr(sa), SWIGTYPE_p_sen_set, 0),
1690 SWIG_NewPointerObj(SWIG_as_voidptr(a), SWIGTYPE_p_sen_set_eh, 0),
1691 SWIG_NewPointerObj(SWIG_as_voidptr(sb), SWIGTYPE_p_sen_set, 0),
1692 SWIG_NewPointerObj(SWIG_as_voidptr(b), SWIGTYPE_p_sen_set_eh, 0),
1693 optarg->compar_arg);
1694 return FIX2INT(result);
1695 }
1696
1697 static void
mark_logger_info(void * ptr)1698 mark_logger_info(void *ptr) {
1699 struct LoggerInfo *info = (struct LoggerInfo *)ptr;
1700 rb_gc_mark(info->func);
1701 }
1702
1703 static void
mark_select_optarg(void * ptr)1704 mark_select_optarg(void *ptr) {
1705 struct SelectOptarg *optarg = (struct SelectOptarg *)ptr;
1706 rb_gc_mark(optarg->weight_vector);
1707 rb_gc_mark(optarg->func);
1708 rb_gc_mark(optarg->func_arg);
1709 }
1710
1711 static void
mark_group_optarg(void * ptr)1712 mark_group_optarg(void *ptr) {
1713 struct GroupOptarg *optarg = (struct GroupOptarg *)ptr;
1714 rb_gc_mark(optarg->func);
1715 rb_gc_mark(optarg->func_arg);
1716 }
1717
1718 static void
mark_sort_optarg(void * ptr)1719 mark_sort_optarg(void *ptr) {
1720 struct SortOptarg *optarg = (struct SortOptarg *)ptr;
1721 rb_gc_mark(optarg->compar);
1722 rb_gc_mark(optarg->compar_arg);
1723 }
1724
atexit_sen_fin(void)1725 void atexit_sen_fin(void) {
1726 // sen_fin();
1727 }
1728
1729
1730
1731 #ifdef __cplusplus
1732 extern "C" {
1733 #endif
1734 #include "rubyio.h"
1735 #ifdef __cplusplus
1736 }
1737 #endif
1738
1739
1740 #ifdef __cplusplus
1741 extern "C" {
1742 #endif
1743 #ifdef HAVE_SYS_TIME_H
1744 # include <sys/time.h>
1745 struct timeval rb_time_timeval(VALUE);
1746 #endif
1747 #ifdef __cplusplus
1748 }
1749 #endif
1750
1751
1752 #include <limits.h>
1753 #ifndef LLONG_MIN
1754 # define LLONG_MIN LONG_LONG_MIN
1755 #endif
1756 #ifndef LLONG_MAX
1757 # define LLONG_MAX LONG_LONG_MAX
1758 #endif
1759 #ifndef ULLONG_MAX
1760 # define ULLONG_MAX ULONG_LONG_MAX
1761 #endif
1762
1763
1764 SWIGINTERN VALUE
SWIG_ruby_failed(void)1765 SWIG_ruby_failed(void)
1766 {
1767 return Qnil;
1768 }
1769
1770
1771 /*@SWIG:%ruby_aux_method@*/
SWIG_AUX_NUM2LONG(VALUE * args)1772 SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
1773 {
1774 VALUE obj = args[0];
1775 VALUE type = TYPE(obj);
1776 long *res = (long *)(args[1]);
1777 *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
1778 return obj;
1779 }
1780 /*@SWIG@*/
1781
1782 SWIGINTERN int
SWIG_AsVal_long(VALUE obj,long * val)1783 SWIG_AsVal_long (VALUE obj, long* val)
1784 {
1785 VALUE type = TYPE(obj);
1786 if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
1787 long v;
1788 VALUE a[2];
1789 a[0] = obj;
1790 a[1] = (VALUE)(&v);
1791 if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
1792 if (val) *val = v;
1793 return SWIG_OK;
1794 }
1795 }
1796 return SWIG_TypeError;
1797 }
1798
1799
1800 SWIGINTERN int
SWIG_AsVal_int(VALUE obj,int * val)1801 SWIG_AsVal_int (VALUE obj, int *val)
1802 {
1803 long v;
1804 int res = SWIG_AsVal_long (obj, &v);
1805 if (SWIG_IsOK(res)) {
1806 if ((v < INT_MIN || v > INT_MAX)) {
1807 return SWIG_OverflowError;
1808 } else {
1809 if (val) *val = (int)(v);
1810 }
1811 }
1812 return res;
1813 }
1814
1815
1816 #define SWIG_From_long LONG2NUM
1817
1818
1819 SWIGINTERNINLINE VALUE
SWIG_From_int(int value)1820 SWIG_From_int (int value)
1821 {
1822 return SWIG_From_long (value);
1823 }
1824
1825
1826 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)1827 SWIG_pchar_descriptor(void)
1828 {
1829 static int init = 0;
1830 static swig_type_info* info = 0;
1831 if (!init) {
1832 info = SWIG_TypeQuery("_p_char");
1833 init = 1;
1834 }
1835 return info;
1836 }
1837
1838
1839 SWIGINTERN int
SWIG_AsCharPtrAndSize(VALUE obj,char ** cptr,size_t * psize,int * alloc)1840 SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
1841 {
1842 if (TYPE(obj) == T_STRING) {
1843
1844
1845
1846 char *cstr = STR2CSTR(obj);
1847
1848 size_t size = RSTRING_LEN(obj) + 1;
1849 if (cptr) {
1850 if (alloc) {
1851 if (*alloc == SWIG_NEWOBJ) {
1852 *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
1853 } else {
1854 *cptr = cstr;
1855 *alloc = SWIG_OLDOBJ;
1856 }
1857 }
1858 }
1859 if (psize) *psize = size;
1860 return SWIG_OK;
1861 } else {
1862 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1863 if (pchar_descriptor) {
1864 void* vptr = 0;
1865 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
1866 if (cptr) *cptr = (char *)vptr;
1867 if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
1868 if (alloc) *alloc = SWIG_OLDOBJ;
1869 return SWIG_OK;
1870 }
1871 }
1872 }
1873 return SWIG_TypeError;
1874 }
1875
1876
1877
1878
1879
1880 /*@SWIG:%ruby_aux_method@*/
SWIG_AUX_NUM2ULONG(VALUE * args)1881 SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
1882 {
1883 VALUE obj = args[0];
1884 VALUE type = TYPE(obj);
1885 unsigned long *res = (unsigned long *)(args[1]);
1886 *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj);
1887 return obj;
1888 }
1889 /*@SWIG@*/
1890
1891 SWIGINTERN int
SWIG_AsVal_unsigned_SS_long(VALUE obj,unsigned long * val)1892 SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
1893 {
1894 VALUE type = TYPE(obj);
1895 if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
1896 unsigned long v;
1897 VALUE a[2];
1898 a[0] = obj;
1899 a[1] = (VALUE)(&v);
1900 if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
1901 if (val) *val = v;
1902 return SWIG_OK;
1903 }
1904 }
1905 return SWIG_TypeError;
1906 }
1907
1908
1909 SWIGINTERN int
SWIG_AsVal_unsigned_SS_int(VALUE obj,unsigned int * val)1910 SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val)
1911 {
1912 unsigned long v;
1913 int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
1914 if (SWIG_IsOK(res)) {
1915 if ((v > UINT_MAX)) {
1916 return SWIG_OverflowError;
1917 } else {
1918 if (val) *val = (unsigned int)(v);
1919 }
1920 }
1921 return res;
1922 }
1923
1924
1925 SWIGINTERNINLINE VALUE
SWIG_From_unsigned_SS_long(unsigned long value)1926 SWIG_From_unsigned_SS_long (unsigned long value)
1927 {
1928 return ULONG2NUM(value);
1929 }
1930
1931
1932 SWIGINTERNINLINE VALUE
SWIG_From_unsigned_SS_int(unsigned int value)1933 SWIG_From_unsigned_SS_int (unsigned int value)
1934 {
1935 return SWIG_From_unsigned_SS_long (value);
1936 }
1937
1938 swig_class cLoggerInfo;
1939
1940 SWIGINTERN VALUE
_wrap_LoggerInfo_max_level_set(int argc,VALUE * argv,VALUE self)1941 _wrap_LoggerInfo_max_level_set(int argc, VALUE *argv, VALUE self) {
1942 struct LoggerInfo *arg1 = (struct LoggerInfo *) 0 ;
1943 int arg2 ;
1944 void *argp1 = 0 ;
1945 int res1 = 0 ;
1946 int val2 ;
1947 int ecode2 = 0 ;
1948
1949 if ((argc < 1) || (argc > 1)) {
1950 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
1951 }
1952 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LoggerInfo, 0 | 0 );
1953 if (!SWIG_IsOK(res1)) {
1954 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "max_level" "', argument " "1"" of type '" "struct LoggerInfo *""'");
1955 }
1956 arg1 = (struct LoggerInfo *)(argp1);
1957 ecode2 = SWIG_AsVal_int(argv[0], &val2);
1958 if (!SWIG_IsOK(ecode2)) {
1959 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "max_level" "', argument " "2"" of type '" "int""'");
1960 }
1961 arg2 = (int)(val2);
1962 if (arg1) (arg1)->max_level = arg2;
1963
1964 return Qnil;
1965 fail:
1966 return Qnil;
1967 }
1968
1969
1970 SWIGINTERN VALUE
_wrap_LoggerInfo_max_level_get(int argc,VALUE * argv,VALUE self)1971 _wrap_LoggerInfo_max_level_get(int argc, VALUE *argv, VALUE self) {
1972 struct LoggerInfo *arg1 = (struct LoggerInfo *) 0 ;
1973 int result;
1974 void *argp1 = 0 ;
1975 int res1 = 0 ;
1976 VALUE vresult = Qnil;
1977
1978 if ((argc < 0) || (argc > 0)) {
1979 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
1980 }
1981 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LoggerInfo, 0 | 0 );
1982 if (!SWIG_IsOK(res1)) {
1983 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "max_level" "', argument " "1"" of type '" "struct LoggerInfo *""'");
1984 }
1985 arg1 = (struct LoggerInfo *)(argp1);
1986 result = (int) ((arg1)->max_level);
1987 vresult = SWIG_From_int((int)(result));
1988 return vresult;
1989 fail:
1990 return Qnil;
1991 }
1992
1993
1994 SWIGINTERN VALUE
_wrap_LoggerInfo_flags_set(int argc,VALUE * argv,VALUE self)1995 _wrap_LoggerInfo_flags_set(int argc, VALUE *argv, VALUE self) {
1996 struct LoggerInfo *arg1 = (struct LoggerInfo *) 0 ;
1997 int arg2 ;
1998 void *argp1 = 0 ;
1999 int res1 = 0 ;
2000 int val2 ;
2001 int ecode2 = 0 ;
2002
2003 if ((argc < 1) || (argc > 1)) {
2004 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2005 }
2006 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LoggerInfo, 0 | 0 );
2007 if (!SWIG_IsOK(res1)) {
2008 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flags" "', argument " "1"" of type '" "struct LoggerInfo *""'");
2009 }
2010 arg1 = (struct LoggerInfo *)(argp1);
2011 ecode2 = SWIG_AsVal_int(argv[0], &val2);
2012 if (!SWIG_IsOK(ecode2)) {
2013 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flags" "', argument " "2"" of type '" "int""'");
2014 }
2015 arg2 = (int)(val2);
2016 if (arg1) (arg1)->flags = arg2;
2017
2018 return Qnil;
2019 fail:
2020 return Qnil;
2021 }
2022
2023
2024 SWIGINTERN VALUE
_wrap_LoggerInfo_flags_get(int argc,VALUE * argv,VALUE self)2025 _wrap_LoggerInfo_flags_get(int argc, VALUE *argv, VALUE self) {
2026 struct LoggerInfo *arg1 = (struct LoggerInfo *) 0 ;
2027 int result;
2028 void *argp1 = 0 ;
2029 int res1 = 0 ;
2030 VALUE vresult = Qnil;
2031
2032 if ((argc < 0) || (argc > 0)) {
2033 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2034 }
2035 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LoggerInfo, 0 | 0 );
2036 if (!SWIG_IsOK(res1)) {
2037 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flags" "', argument " "1"" of type '" "struct LoggerInfo *""'");
2038 }
2039 arg1 = (struct LoggerInfo *)(argp1);
2040 result = (int) ((arg1)->flags);
2041 vresult = SWIG_From_int((int)(result));
2042 return vresult;
2043 fail:
2044 return Qnil;
2045 }
2046
2047
2048 SWIGINTERN VALUE
_wrap_LoggerInfo_func_set(int argc,VALUE * argv,VALUE self)2049 _wrap_LoggerInfo_func_set(int argc, VALUE *argv, VALUE self) {
2050 struct LoggerInfo *arg1 = (struct LoggerInfo *) 0 ;
2051 VALUE arg2 = (VALUE) 0 ;
2052 void *argp1 = 0 ;
2053 int res1 = 0 ;
2054
2055 if ((argc < 1) || (argc > 1)) {
2056 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2057 }
2058 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LoggerInfo, 0 | 0 );
2059 if (!SWIG_IsOK(res1)) {
2060 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "func" "', argument " "1"" of type '" "struct LoggerInfo *""'");
2061 }
2062 arg1 = (struct LoggerInfo *)(argp1);
2063 arg2 = argv[0];
2064 if (arg1) (arg1)->func = arg2;
2065
2066 return Qnil;
2067 fail:
2068 return Qnil;
2069 }
2070
2071
2072 SWIGINTERN VALUE
_wrap_LoggerInfo_func_get(int argc,VALUE * argv,VALUE self)2073 _wrap_LoggerInfo_func_get(int argc, VALUE *argv, VALUE self) {
2074 struct LoggerInfo *arg1 = (struct LoggerInfo *) 0 ;
2075 VALUE result;
2076 void *argp1 = 0 ;
2077 int res1 = 0 ;
2078 VALUE vresult = Qnil;
2079
2080 if ((argc < 0) || (argc > 0)) {
2081 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2082 }
2083 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LoggerInfo, 0 | 0 );
2084 if (!SWIG_IsOK(res1)) {
2085 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "func" "', argument " "1"" of type '" "struct LoggerInfo *""'");
2086 }
2087 arg1 = (struct LoggerInfo *)(argp1);
2088 result = (VALUE) ((arg1)->func);
2089 vresult = result;
2090 return vresult;
2091 fail:
2092 return Qnil;
2093 }
2094
2095
2096 SWIGINTERN VALUE
_wrap_LoggerInfo_info_set(int argc,VALUE * argv,VALUE self)2097 _wrap_LoggerInfo_info_set(int argc, VALUE *argv, VALUE self) {
2098 struct LoggerInfo *arg1 = (struct LoggerInfo *) 0 ;
2099 struct _sen_logger_info arg2 ;
2100 void *argp1 = 0 ;
2101 int res1 = 0 ;
2102 void *argp2 ;
2103 int res2 = 0 ;
2104
2105 if ((argc < 1) || (argc > 1)) {
2106 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2107 }
2108 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LoggerInfo, 0 | 0 );
2109 if (!SWIG_IsOK(res1)) {
2110 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "info" "', argument " "1"" of type '" "struct LoggerInfo *""'");
2111 }
2112 arg1 = (struct LoggerInfo *)(argp1);
2113 {
2114 res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p__sen_logger_info, 0 );
2115 if (!SWIG_IsOK(res2)) {
2116 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "info" "', argument " "2"" of type '" "struct _sen_logger_info""'");
2117 }
2118 if (!argp2) {
2119 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "info" "', argument " "2"" of type '" "struct _sen_logger_info""'");
2120 } else {
2121 arg2 = *((struct _sen_logger_info *)(argp2));
2122 }
2123 }
2124 if (arg1) (arg1)->info = arg2;
2125
2126 return Qnil;
2127 fail:
2128 return Qnil;
2129 }
2130
2131
2132 SWIGINTERN VALUE
_wrap_LoggerInfo_info_get(int argc,VALUE * argv,VALUE self)2133 _wrap_LoggerInfo_info_get(int argc, VALUE *argv, VALUE self) {
2134 struct LoggerInfo *arg1 = (struct LoggerInfo *) 0 ;
2135 struct _sen_logger_info result;
2136 void *argp1 = 0 ;
2137 int res1 = 0 ;
2138 VALUE vresult = Qnil;
2139
2140 if ((argc < 0) || (argc > 0)) {
2141 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2142 }
2143 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_LoggerInfo, 0 | 0 );
2144 if (!SWIG_IsOK(res1)) {
2145 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "info" "', argument " "1"" of type '" "struct LoggerInfo *""'");
2146 }
2147 arg1 = (struct LoggerInfo *)(argp1);
2148 result = ((arg1)->info);
2149 vresult = SWIG_NewPointerObj((struct _sen_logger_info *)memcpy((struct _sen_logger_info *)malloc(sizeof(struct _sen_logger_info)),&result,sizeof(struct _sen_logger_info)), SWIGTYPE_p__sen_logger_info, SWIG_POINTER_OWN | 0 );
2150 return vresult;
2151 fail:
2152 return Qnil;
2153 }
2154
2155
2156 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2157 SWIGINTERN VALUE
_wrap_LoggerInfo_allocate(VALUE self)2158 _wrap_LoggerInfo_allocate(VALUE self) {
2159 #else
2160 SWIGINTERN VALUE
2161 _wrap_LoggerInfo_allocate(int argc, VALUE *argv, VALUE self) {
2162 #endif
2163
2164
2165 VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_LoggerInfo);
2166 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2167 rb_obj_call_init(vresult, argc, argv);
2168 #endif
2169 return vresult;
2170 }
2171
2172
2173 SWIGINTERN VALUE
2174 _wrap_new_LoggerInfo(int argc, VALUE *argv, VALUE self) {
2175 struct LoggerInfo *result = 0 ;
2176
2177 if ((argc < 0) || (argc > 0)) {
2178 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2179 }
2180 result = (struct LoggerInfo *)(struct LoggerInfo *) calloc(1, sizeof(struct LoggerInfo));DATA_PTR(self) = result;
2181
2182 return self;
2183 fail:
2184 return Qnil;
2185 }
2186
2187
2188 SWIGINTERN void
2189 free_LoggerInfo(struct LoggerInfo *arg1) {
2190 free((char *) arg1);
2191 }
2192
2193 swig_class cSelectOptarg;
2194
2195 SWIGINTERN VALUE
2196 _wrap_SelectOptarg_mode_set(int argc, VALUE *argv, VALUE self) {
2197 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2198 sen_sel_mode arg2 ;
2199 void *argp1 = 0 ;
2200 int res1 = 0 ;
2201 int val2 ;
2202 int ecode2 = 0 ;
2203
2204 if ((argc < 1) || (argc > 1)) {
2205 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2206 }
2207 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2208 if (!SWIG_IsOK(res1)) {
2209 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mode" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2210 }
2211 arg1 = (struct SelectOptarg *)(argp1);
2212 ecode2 = SWIG_AsVal_int(argv[0], &val2);
2213 if (!SWIG_IsOK(ecode2)) {
2214 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mode" "', argument " "2"" of type '" "sen_sel_mode""'");
2215 }
2216 arg2 = (sen_sel_mode)(val2);
2217 if (arg1) (arg1)->mode = arg2;
2218
2219 return Qnil;
2220 fail:
2221 return Qnil;
2222 }
2223
2224
2225 SWIGINTERN VALUE
2226 _wrap_SelectOptarg_mode_get(int argc, VALUE *argv, VALUE self) {
2227 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2228 sen_sel_mode result;
2229 void *argp1 = 0 ;
2230 int res1 = 0 ;
2231 VALUE vresult = Qnil;
2232
2233 if ((argc < 0) || (argc > 0)) {
2234 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2235 }
2236 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2237 if (!SWIG_IsOK(res1)) {
2238 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mode" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2239 }
2240 arg1 = (struct SelectOptarg *)(argp1);
2241 result = (sen_sel_mode) ((arg1)->mode);
2242 vresult = SWIG_From_int((int)(result));
2243 return vresult;
2244 fail:
2245 return Qnil;
2246 }
2247
2248
2249 SWIGINTERN VALUE
2250 _wrap_SelectOptarg_similarity_threshold_set(int argc, VALUE *argv, VALUE self) {
2251 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2252 int arg2 ;
2253 void *argp1 = 0 ;
2254 int res1 = 0 ;
2255 int val2 ;
2256 int ecode2 = 0 ;
2257
2258 if ((argc < 1) || (argc > 1)) {
2259 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2260 }
2261 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2262 if (!SWIG_IsOK(res1)) {
2263 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "similarity_threshold" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2264 }
2265 arg1 = (struct SelectOptarg *)(argp1);
2266 ecode2 = SWIG_AsVal_int(argv[0], &val2);
2267 if (!SWIG_IsOK(ecode2)) {
2268 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "similarity_threshold" "', argument " "2"" of type '" "int""'");
2269 }
2270 arg2 = (int)(val2);
2271 if (arg1) (arg1)->similarity_threshold = arg2;
2272
2273 return Qnil;
2274 fail:
2275 return Qnil;
2276 }
2277
2278
2279 SWIGINTERN VALUE
2280 _wrap_SelectOptarg_similarity_threshold_get(int argc, VALUE *argv, VALUE self) {
2281 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2282 int result;
2283 void *argp1 = 0 ;
2284 int res1 = 0 ;
2285 VALUE vresult = Qnil;
2286
2287 if ((argc < 0) || (argc > 0)) {
2288 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2289 }
2290 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2291 if (!SWIG_IsOK(res1)) {
2292 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "similarity_threshold" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2293 }
2294 arg1 = (struct SelectOptarg *)(argp1);
2295 result = (int) ((arg1)->similarity_threshold);
2296 vresult = SWIG_From_int((int)(result));
2297 return vresult;
2298 fail:
2299 return Qnil;
2300 }
2301
2302
2303 SWIGINTERN VALUE
2304 _wrap_SelectOptarg_max_interval_set(int argc, VALUE *argv, VALUE self) {
2305 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2306 int arg2 ;
2307 void *argp1 = 0 ;
2308 int res1 = 0 ;
2309 int val2 ;
2310 int ecode2 = 0 ;
2311
2312 if ((argc < 1) || (argc > 1)) {
2313 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2314 }
2315 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2316 if (!SWIG_IsOK(res1)) {
2317 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "max_interval" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2318 }
2319 arg1 = (struct SelectOptarg *)(argp1);
2320 ecode2 = SWIG_AsVal_int(argv[0], &val2);
2321 if (!SWIG_IsOK(ecode2)) {
2322 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "max_interval" "', argument " "2"" of type '" "int""'");
2323 }
2324 arg2 = (int)(val2);
2325 if (arg1) (arg1)->max_interval = arg2;
2326
2327 return Qnil;
2328 fail:
2329 return Qnil;
2330 }
2331
2332
2333 SWIGINTERN VALUE
2334 _wrap_SelectOptarg_max_interval_get(int argc, VALUE *argv, VALUE self) {
2335 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2336 int result;
2337 void *argp1 = 0 ;
2338 int res1 = 0 ;
2339 VALUE vresult = Qnil;
2340
2341 if ((argc < 0) || (argc > 0)) {
2342 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2343 }
2344 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2345 if (!SWIG_IsOK(res1)) {
2346 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "max_interval" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2347 }
2348 arg1 = (struct SelectOptarg *)(argp1);
2349 result = (int) ((arg1)->max_interval);
2350 vresult = SWIG_From_int((int)(result));
2351 return vresult;
2352 fail:
2353 return Qnil;
2354 }
2355
2356
2357 SWIGINTERN VALUE
2358 _wrap_SelectOptarg_weight_vector_set(int argc, VALUE *argv, VALUE self) {
2359 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2360 VALUE arg2 = (VALUE) 0 ;
2361 void *argp1 = 0 ;
2362 int res1 = 0 ;
2363
2364 if ((argc < 1) || (argc > 1)) {
2365 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2366 }
2367 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2368 if (!SWIG_IsOK(res1)) {
2369 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "weight_vector" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2370 }
2371 arg1 = (struct SelectOptarg *)(argp1);
2372 arg2 = argv[0];
2373 if (arg1) (arg1)->weight_vector = arg2;
2374
2375 return Qnil;
2376 fail:
2377 return Qnil;
2378 }
2379
2380
2381 SWIGINTERN VALUE
2382 _wrap_SelectOptarg_weight_vector_get(int argc, VALUE *argv, VALUE self) {
2383 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2384 VALUE result;
2385 void *argp1 = 0 ;
2386 int res1 = 0 ;
2387 VALUE vresult = Qnil;
2388
2389 if ((argc < 0) || (argc > 0)) {
2390 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2391 }
2392 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2393 if (!SWIG_IsOK(res1)) {
2394 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "weight_vector" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2395 }
2396 arg1 = (struct SelectOptarg *)(argp1);
2397 result = (VALUE) ((arg1)->weight_vector);
2398 vresult = result;
2399 return vresult;
2400 fail:
2401 return Qnil;
2402 }
2403
2404
2405 SWIGINTERN VALUE
2406 _wrap_SelectOptarg_func_set(int argc, VALUE *argv, VALUE self) {
2407 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2408 VALUE arg2 = (VALUE) 0 ;
2409 void *argp1 = 0 ;
2410 int res1 = 0 ;
2411
2412 if ((argc < 1) || (argc > 1)) {
2413 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2414 }
2415 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2416 if (!SWIG_IsOK(res1)) {
2417 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "func" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2418 }
2419 arg1 = (struct SelectOptarg *)(argp1);
2420 arg2 = argv[0];
2421 if (arg1) (arg1)->func = arg2;
2422
2423 return Qnil;
2424 fail:
2425 return Qnil;
2426 }
2427
2428
2429 SWIGINTERN VALUE
2430 _wrap_SelectOptarg_func_get(int argc, VALUE *argv, VALUE self) {
2431 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2432 VALUE result;
2433 void *argp1 = 0 ;
2434 int res1 = 0 ;
2435 VALUE vresult = Qnil;
2436
2437 if ((argc < 0) || (argc > 0)) {
2438 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2439 }
2440 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2441 if (!SWIG_IsOK(res1)) {
2442 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "func" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2443 }
2444 arg1 = (struct SelectOptarg *)(argp1);
2445 result = (VALUE) ((arg1)->func);
2446 vresult = result;
2447 return vresult;
2448 fail:
2449 return Qnil;
2450 }
2451
2452
2453 SWIGINTERN VALUE
2454 _wrap_SelectOptarg_func_arg_set(int argc, VALUE *argv, VALUE self) {
2455 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2456 VALUE arg2 = (VALUE) 0 ;
2457 void *argp1 = 0 ;
2458 int res1 = 0 ;
2459
2460 if ((argc < 1) || (argc > 1)) {
2461 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2462 }
2463 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2464 if (!SWIG_IsOK(res1)) {
2465 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "func_arg" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2466 }
2467 arg1 = (struct SelectOptarg *)(argp1);
2468 arg2 = argv[0];
2469 if (arg1) (arg1)->func_arg = arg2;
2470
2471 return Qnil;
2472 fail:
2473 return Qnil;
2474 }
2475
2476
2477 SWIGINTERN VALUE
2478 _wrap_SelectOptarg_func_arg_get(int argc, VALUE *argv, VALUE self) {
2479 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2480 VALUE result;
2481 void *argp1 = 0 ;
2482 int res1 = 0 ;
2483 VALUE vresult = Qnil;
2484
2485 if ((argc < 0) || (argc > 0)) {
2486 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2487 }
2488 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2489 if (!SWIG_IsOK(res1)) {
2490 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "func_arg" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2491 }
2492 arg1 = (struct SelectOptarg *)(argp1);
2493 result = (VALUE) ((arg1)->func_arg);
2494 vresult = result;
2495 return vresult;
2496 fail:
2497 return Qnil;
2498 }
2499
2500
2501 SWIGINTERN VALUE
2502 _wrap_SelectOptarg_optarg_set(int argc, VALUE *argv, VALUE self) {
2503 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2504 struct _sen_select_optarg arg2 ;
2505 void *argp1 = 0 ;
2506 int res1 = 0 ;
2507 void *argp2 ;
2508 int res2 = 0 ;
2509
2510 if ((argc < 1) || (argc > 1)) {
2511 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2512 }
2513 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2514 if (!SWIG_IsOK(res1)) {
2515 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "optarg" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2516 }
2517 arg1 = (struct SelectOptarg *)(argp1);
2518 {
2519 res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p__sen_select_optarg, 0 );
2520 if (!SWIG_IsOK(res2)) {
2521 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "optarg" "', argument " "2"" of type '" "struct _sen_select_optarg""'");
2522 }
2523 if (!argp2) {
2524 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "optarg" "', argument " "2"" of type '" "struct _sen_select_optarg""'");
2525 } else {
2526 arg2 = *((struct _sen_select_optarg *)(argp2));
2527 }
2528 }
2529 if (arg1) (arg1)->optarg = arg2;
2530
2531 return Qnil;
2532 fail:
2533 return Qnil;
2534 }
2535
2536
2537 SWIGINTERN VALUE
2538 _wrap_SelectOptarg_optarg_get(int argc, VALUE *argv, VALUE self) {
2539 struct SelectOptarg *arg1 = (struct SelectOptarg *) 0 ;
2540 struct _sen_select_optarg result;
2541 void *argp1 = 0 ;
2542 int res1 = 0 ;
2543 VALUE vresult = Qnil;
2544
2545 if ((argc < 0) || (argc > 0)) {
2546 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2547 }
2548 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SelectOptarg, 0 | 0 );
2549 if (!SWIG_IsOK(res1)) {
2550 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "optarg" "', argument " "1"" of type '" "struct SelectOptarg *""'");
2551 }
2552 arg1 = (struct SelectOptarg *)(argp1);
2553 result = ((arg1)->optarg);
2554 vresult = SWIG_NewPointerObj((struct _sen_select_optarg *)memcpy((struct _sen_select_optarg *)malloc(sizeof(struct _sen_select_optarg)),&result,sizeof(struct _sen_select_optarg)), SWIGTYPE_p__sen_select_optarg, SWIG_POINTER_OWN | 0 );
2555 return vresult;
2556 fail:
2557 return Qnil;
2558 }
2559
2560
2561 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2562 SWIGINTERN VALUE
2563 _wrap_SelectOptarg_allocate(VALUE self) {
2564 #else
2565 SWIGINTERN VALUE
2566 _wrap_SelectOptarg_allocate(int argc, VALUE *argv, VALUE self) {
2567 #endif
2568
2569
2570 VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_SelectOptarg);
2571 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2572 rb_obj_call_init(vresult, argc, argv);
2573 #endif
2574 return vresult;
2575 }
2576
2577
2578 SWIGINTERN VALUE
2579 _wrap_new_SelectOptarg(int argc, VALUE *argv, VALUE self) {
2580 struct SelectOptarg *result = 0 ;
2581
2582 if ((argc < 0) || (argc > 0)) {
2583 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2584 }
2585 result = (struct SelectOptarg *)(struct SelectOptarg *) calloc(1, sizeof(struct SelectOptarg));DATA_PTR(self) = result;
2586
2587 return self;
2588 fail:
2589 return Qnil;
2590 }
2591
2592
2593 SWIGINTERN void
2594 free_SelectOptarg(struct SelectOptarg *arg1) {
2595 free((char *) arg1);
2596 }
2597
2598 swig_class cGroupOptarg;
2599
2600 SWIGINTERN VALUE
2601 _wrap_GroupOptarg_mode_set(int argc, VALUE *argv, VALUE self) {
2602 struct GroupOptarg *arg1 = (struct GroupOptarg *) 0 ;
2603 sen_sort_mode arg2 ;
2604 void *argp1 = 0 ;
2605 int res1 = 0 ;
2606 int val2 ;
2607 int ecode2 = 0 ;
2608
2609 if ((argc < 1) || (argc > 1)) {
2610 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2611 }
2612 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GroupOptarg, 0 | 0 );
2613 if (!SWIG_IsOK(res1)) {
2614 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mode" "', argument " "1"" of type '" "struct GroupOptarg *""'");
2615 }
2616 arg1 = (struct GroupOptarg *)(argp1);
2617 ecode2 = SWIG_AsVal_int(argv[0], &val2);
2618 if (!SWIG_IsOK(ecode2)) {
2619 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mode" "', argument " "2"" of type '" "sen_sort_mode""'");
2620 }
2621 arg2 = (sen_sort_mode)(val2);
2622 if (arg1) (arg1)->mode = arg2;
2623
2624 return Qnil;
2625 fail:
2626 return Qnil;
2627 }
2628
2629
2630 SWIGINTERN VALUE
2631 _wrap_GroupOptarg_mode_get(int argc, VALUE *argv, VALUE self) {
2632 struct GroupOptarg *arg1 = (struct GroupOptarg *) 0 ;
2633 sen_sort_mode result;
2634 void *argp1 = 0 ;
2635 int res1 = 0 ;
2636 VALUE vresult = Qnil;
2637
2638 if ((argc < 0) || (argc > 0)) {
2639 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2640 }
2641 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GroupOptarg, 0 | 0 );
2642 if (!SWIG_IsOK(res1)) {
2643 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mode" "', argument " "1"" of type '" "struct GroupOptarg *""'");
2644 }
2645 arg1 = (struct GroupOptarg *)(argp1);
2646 result = (sen_sort_mode) ((arg1)->mode);
2647 vresult = SWIG_From_int((int)(result));
2648 return vresult;
2649 fail:
2650 return Qnil;
2651 }
2652
2653
2654 SWIGINTERN VALUE
2655 _wrap_GroupOptarg_func_set(int argc, VALUE *argv, VALUE self) {
2656 struct GroupOptarg *arg1 = (struct GroupOptarg *) 0 ;
2657 VALUE arg2 = (VALUE) 0 ;
2658 void *argp1 = 0 ;
2659 int res1 = 0 ;
2660
2661 if ((argc < 1) || (argc > 1)) {
2662 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2663 }
2664 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GroupOptarg, 0 | 0 );
2665 if (!SWIG_IsOK(res1)) {
2666 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "func" "', argument " "1"" of type '" "struct GroupOptarg *""'");
2667 }
2668 arg1 = (struct GroupOptarg *)(argp1);
2669 arg2 = argv[0];
2670 if (arg1) (arg1)->func = arg2;
2671
2672 return Qnil;
2673 fail:
2674 return Qnil;
2675 }
2676
2677
2678 SWIGINTERN VALUE
2679 _wrap_GroupOptarg_func_get(int argc, VALUE *argv, VALUE self) {
2680 struct GroupOptarg *arg1 = (struct GroupOptarg *) 0 ;
2681 VALUE result;
2682 void *argp1 = 0 ;
2683 int res1 = 0 ;
2684 VALUE vresult = Qnil;
2685
2686 if ((argc < 0) || (argc > 0)) {
2687 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2688 }
2689 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GroupOptarg, 0 | 0 );
2690 if (!SWIG_IsOK(res1)) {
2691 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "func" "', argument " "1"" of type '" "struct GroupOptarg *""'");
2692 }
2693 arg1 = (struct GroupOptarg *)(argp1);
2694 result = (VALUE) ((arg1)->func);
2695 vresult = result;
2696 return vresult;
2697 fail:
2698 return Qnil;
2699 }
2700
2701
2702 SWIGINTERN VALUE
2703 _wrap_GroupOptarg_func_arg_set(int argc, VALUE *argv, VALUE self) {
2704 struct GroupOptarg *arg1 = (struct GroupOptarg *) 0 ;
2705 VALUE arg2 = (VALUE) 0 ;
2706 void *argp1 = 0 ;
2707 int res1 = 0 ;
2708
2709 if ((argc < 1) || (argc > 1)) {
2710 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2711 }
2712 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GroupOptarg, 0 | 0 );
2713 if (!SWIG_IsOK(res1)) {
2714 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "func_arg" "', argument " "1"" of type '" "struct GroupOptarg *""'");
2715 }
2716 arg1 = (struct GroupOptarg *)(argp1);
2717 arg2 = argv[0];
2718 if (arg1) (arg1)->func_arg = arg2;
2719
2720 return Qnil;
2721 fail:
2722 return Qnil;
2723 }
2724
2725
2726 SWIGINTERN VALUE
2727 _wrap_GroupOptarg_func_arg_get(int argc, VALUE *argv, VALUE self) {
2728 struct GroupOptarg *arg1 = (struct GroupOptarg *) 0 ;
2729 VALUE result;
2730 void *argp1 = 0 ;
2731 int res1 = 0 ;
2732 VALUE vresult = Qnil;
2733
2734 if ((argc < 0) || (argc > 0)) {
2735 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2736 }
2737 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GroupOptarg, 0 | 0 );
2738 if (!SWIG_IsOK(res1)) {
2739 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "func_arg" "', argument " "1"" of type '" "struct GroupOptarg *""'");
2740 }
2741 arg1 = (struct GroupOptarg *)(argp1);
2742 result = (VALUE) ((arg1)->func_arg);
2743 vresult = result;
2744 return vresult;
2745 fail:
2746 return Qnil;
2747 }
2748
2749
2750 SWIGINTERN VALUE
2751 _wrap_GroupOptarg_key_size_set(int argc, VALUE *argv, VALUE self) {
2752 struct GroupOptarg *arg1 = (struct GroupOptarg *) 0 ;
2753 int arg2 ;
2754 void *argp1 = 0 ;
2755 int res1 = 0 ;
2756 int val2 ;
2757 int ecode2 = 0 ;
2758
2759 if ((argc < 1) || (argc > 1)) {
2760 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2761 }
2762 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GroupOptarg, 0 | 0 );
2763 if (!SWIG_IsOK(res1)) {
2764 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "key_size" "', argument " "1"" of type '" "struct GroupOptarg *""'");
2765 }
2766 arg1 = (struct GroupOptarg *)(argp1);
2767 ecode2 = SWIG_AsVal_int(argv[0], &val2);
2768 if (!SWIG_IsOK(ecode2)) {
2769 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "key_size" "', argument " "2"" of type '" "int""'");
2770 }
2771 arg2 = (int)(val2);
2772 if (arg1) (arg1)->key_size = arg2;
2773
2774 return Qnil;
2775 fail:
2776 return Qnil;
2777 }
2778
2779
2780 SWIGINTERN VALUE
2781 _wrap_GroupOptarg_key_size_get(int argc, VALUE *argv, VALUE self) {
2782 struct GroupOptarg *arg1 = (struct GroupOptarg *) 0 ;
2783 int result;
2784 void *argp1 = 0 ;
2785 int res1 = 0 ;
2786 VALUE vresult = Qnil;
2787
2788 if ((argc < 0) || (argc > 0)) {
2789 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2790 }
2791 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GroupOptarg, 0 | 0 );
2792 if (!SWIG_IsOK(res1)) {
2793 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "key_size" "', argument " "1"" of type '" "struct GroupOptarg *""'");
2794 }
2795 arg1 = (struct GroupOptarg *)(argp1);
2796 result = (int) ((arg1)->key_size);
2797 vresult = SWIG_From_int((int)(result));
2798 return vresult;
2799 fail:
2800 return Qnil;
2801 }
2802
2803
2804 SWIGINTERN VALUE
2805 _wrap_GroupOptarg_optarg_set(int argc, VALUE *argv, VALUE self) {
2806 struct GroupOptarg *arg1 = (struct GroupOptarg *) 0 ;
2807 struct _sen_group_optarg arg2 ;
2808 void *argp1 = 0 ;
2809 int res1 = 0 ;
2810 void *argp2 ;
2811 int res2 = 0 ;
2812
2813 if ((argc < 1) || (argc > 1)) {
2814 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2815 }
2816 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GroupOptarg, 0 | 0 );
2817 if (!SWIG_IsOK(res1)) {
2818 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "optarg" "', argument " "1"" of type '" "struct GroupOptarg *""'");
2819 }
2820 arg1 = (struct GroupOptarg *)(argp1);
2821 {
2822 res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p__sen_group_optarg, 0 );
2823 if (!SWIG_IsOK(res2)) {
2824 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "optarg" "', argument " "2"" of type '" "struct _sen_group_optarg""'");
2825 }
2826 if (!argp2) {
2827 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "optarg" "', argument " "2"" of type '" "struct _sen_group_optarg""'");
2828 } else {
2829 arg2 = *((struct _sen_group_optarg *)(argp2));
2830 }
2831 }
2832 if (arg1) (arg1)->optarg = arg2;
2833
2834 return Qnil;
2835 fail:
2836 return Qnil;
2837 }
2838
2839
2840 SWIGINTERN VALUE
2841 _wrap_GroupOptarg_optarg_get(int argc, VALUE *argv, VALUE self) {
2842 struct GroupOptarg *arg1 = (struct GroupOptarg *) 0 ;
2843 struct _sen_group_optarg result;
2844 void *argp1 = 0 ;
2845 int res1 = 0 ;
2846 VALUE vresult = Qnil;
2847
2848 if ((argc < 0) || (argc > 0)) {
2849 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2850 }
2851 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GroupOptarg, 0 | 0 );
2852 if (!SWIG_IsOK(res1)) {
2853 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "optarg" "', argument " "1"" of type '" "struct GroupOptarg *""'");
2854 }
2855 arg1 = (struct GroupOptarg *)(argp1);
2856 result = ((arg1)->optarg);
2857 vresult = SWIG_NewPointerObj((struct _sen_group_optarg *)memcpy((struct _sen_group_optarg *)malloc(sizeof(struct _sen_group_optarg)),&result,sizeof(struct _sen_group_optarg)), SWIGTYPE_p__sen_group_optarg, SWIG_POINTER_OWN | 0 );
2858 return vresult;
2859 fail:
2860 return Qnil;
2861 }
2862
2863
2864 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2865 SWIGINTERN VALUE
2866 _wrap_GroupOptarg_allocate(VALUE self) {
2867 #else
2868 SWIGINTERN VALUE
2869 _wrap_GroupOptarg_allocate(int argc, VALUE *argv, VALUE self) {
2870 #endif
2871
2872
2873 VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_GroupOptarg);
2874 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2875 rb_obj_call_init(vresult, argc, argv);
2876 #endif
2877 return vresult;
2878 }
2879
2880
2881 SWIGINTERN VALUE
2882 _wrap_new_GroupOptarg(int argc, VALUE *argv, VALUE self) {
2883 struct GroupOptarg *result = 0 ;
2884
2885 if ((argc < 0) || (argc > 0)) {
2886 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2887 }
2888 result = (struct GroupOptarg *)(struct GroupOptarg *) calloc(1, sizeof(struct GroupOptarg));DATA_PTR(self) = result;
2889
2890 return self;
2891 fail:
2892 return Qnil;
2893 }
2894
2895
2896 SWIGINTERN void
2897 free_GroupOptarg(struct GroupOptarg *arg1) {
2898 free((char *) arg1);
2899 }
2900
2901 swig_class cSortOptarg;
2902
2903 SWIGINTERN VALUE
2904 _wrap_SortOptarg_mode_set(int argc, VALUE *argv, VALUE self) {
2905 struct SortOptarg *arg1 = (struct SortOptarg *) 0 ;
2906 sen_sort_mode arg2 ;
2907 void *argp1 = 0 ;
2908 int res1 = 0 ;
2909 int val2 ;
2910 int ecode2 = 0 ;
2911
2912 if ((argc < 1) || (argc > 1)) {
2913 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2914 }
2915 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SortOptarg, 0 | 0 );
2916 if (!SWIG_IsOK(res1)) {
2917 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mode" "', argument " "1"" of type '" "struct SortOptarg *""'");
2918 }
2919 arg1 = (struct SortOptarg *)(argp1);
2920 ecode2 = SWIG_AsVal_int(argv[0], &val2);
2921 if (!SWIG_IsOK(ecode2)) {
2922 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mode" "', argument " "2"" of type '" "sen_sort_mode""'");
2923 }
2924 arg2 = (sen_sort_mode)(val2);
2925 if (arg1) (arg1)->mode = arg2;
2926
2927 return Qnil;
2928 fail:
2929 return Qnil;
2930 }
2931
2932
2933 SWIGINTERN VALUE
2934 _wrap_SortOptarg_mode_get(int argc, VALUE *argv, VALUE self) {
2935 struct SortOptarg *arg1 = (struct SortOptarg *) 0 ;
2936 sen_sort_mode result;
2937 void *argp1 = 0 ;
2938 int res1 = 0 ;
2939 VALUE vresult = Qnil;
2940
2941 if ((argc < 0) || (argc > 0)) {
2942 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2943 }
2944 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SortOptarg, 0 | 0 );
2945 if (!SWIG_IsOK(res1)) {
2946 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mode" "', argument " "1"" of type '" "struct SortOptarg *""'");
2947 }
2948 arg1 = (struct SortOptarg *)(argp1);
2949 result = (sen_sort_mode) ((arg1)->mode);
2950 vresult = SWIG_From_int((int)(result));
2951 return vresult;
2952 fail:
2953 return Qnil;
2954 }
2955
2956
2957 SWIGINTERN VALUE
2958 _wrap_SortOptarg_compar_set(int argc, VALUE *argv, VALUE self) {
2959 struct SortOptarg *arg1 = (struct SortOptarg *) 0 ;
2960 VALUE arg2 = (VALUE) 0 ;
2961 void *argp1 = 0 ;
2962 int res1 = 0 ;
2963
2964 if ((argc < 1) || (argc > 1)) {
2965 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2966 }
2967 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SortOptarg, 0 | 0 );
2968 if (!SWIG_IsOK(res1)) {
2969 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "compar" "', argument " "1"" of type '" "struct SortOptarg *""'");
2970 }
2971 arg1 = (struct SortOptarg *)(argp1);
2972 arg2 = argv[0];
2973 if (arg1) (arg1)->compar = arg2;
2974
2975 return Qnil;
2976 fail:
2977 return Qnil;
2978 }
2979
2980
2981 SWIGINTERN VALUE
2982 _wrap_SortOptarg_compar_get(int argc, VALUE *argv, VALUE self) {
2983 struct SortOptarg *arg1 = (struct SortOptarg *) 0 ;
2984 VALUE result;
2985 void *argp1 = 0 ;
2986 int res1 = 0 ;
2987 VALUE vresult = Qnil;
2988
2989 if ((argc < 0) || (argc > 0)) {
2990 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2991 }
2992 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SortOptarg, 0 | 0 );
2993 if (!SWIG_IsOK(res1)) {
2994 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "compar" "', argument " "1"" of type '" "struct SortOptarg *""'");
2995 }
2996 arg1 = (struct SortOptarg *)(argp1);
2997 result = (VALUE) ((arg1)->compar);
2998 vresult = result;
2999 return vresult;
3000 fail:
3001 return Qnil;
3002 }
3003
3004
3005 SWIGINTERN VALUE
3006 _wrap_SortOptarg_compar_arg_set(int argc, VALUE *argv, VALUE self) {
3007 struct SortOptarg *arg1 = (struct SortOptarg *) 0 ;
3008 VALUE arg2 = (VALUE) 0 ;
3009 void *argp1 = 0 ;
3010 int res1 = 0 ;
3011
3012 if ((argc < 1) || (argc > 1)) {
3013 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3014 }
3015 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SortOptarg, 0 | 0 );
3016 if (!SWIG_IsOK(res1)) {
3017 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "compar_arg" "', argument " "1"" of type '" "struct SortOptarg *""'");
3018 }
3019 arg1 = (struct SortOptarg *)(argp1);
3020 arg2 = argv[0];
3021 if (arg1) (arg1)->compar_arg = arg2;
3022
3023 return Qnil;
3024 fail:
3025 return Qnil;
3026 }
3027
3028
3029 SWIGINTERN VALUE
3030 _wrap_SortOptarg_compar_arg_get(int argc, VALUE *argv, VALUE self) {
3031 struct SortOptarg *arg1 = (struct SortOptarg *) 0 ;
3032 VALUE result;
3033 void *argp1 = 0 ;
3034 int res1 = 0 ;
3035 VALUE vresult = Qnil;
3036
3037 if ((argc < 0) || (argc > 0)) {
3038 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3039 }
3040 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SortOptarg, 0 | 0 );
3041 if (!SWIG_IsOK(res1)) {
3042 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "compar_arg" "', argument " "1"" of type '" "struct SortOptarg *""'");
3043 }
3044 arg1 = (struct SortOptarg *)(argp1);
3045 result = (VALUE) ((arg1)->compar_arg);
3046 vresult = result;
3047 return vresult;
3048 fail:
3049 return Qnil;
3050 }
3051
3052
3053 SWIGINTERN VALUE
3054 _wrap_SortOptarg_optarg_set(int argc, VALUE *argv, VALUE self) {
3055 struct SortOptarg *arg1 = (struct SortOptarg *) 0 ;
3056 struct _sen_sort_optarg arg2 ;
3057 void *argp1 = 0 ;
3058 int res1 = 0 ;
3059 void *argp2 ;
3060 int res2 = 0 ;
3061
3062 if ((argc < 1) || (argc > 1)) {
3063 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3064 }
3065 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SortOptarg, 0 | 0 );
3066 if (!SWIG_IsOK(res1)) {
3067 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "optarg" "', argument " "1"" of type '" "struct SortOptarg *""'");
3068 }
3069 arg1 = (struct SortOptarg *)(argp1);
3070 {
3071 res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p__sen_sort_optarg, 0 );
3072 if (!SWIG_IsOK(res2)) {
3073 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "optarg" "', argument " "2"" of type '" "struct _sen_sort_optarg""'");
3074 }
3075 if (!argp2) {
3076 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "optarg" "', argument " "2"" of type '" "struct _sen_sort_optarg""'");
3077 } else {
3078 arg2 = *((struct _sen_sort_optarg *)(argp2));
3079 }
3080 }
3081 if (arg1) (arg1)->optarg = arg2;
3082
3083 return Qnil;
3084 fail:
3085 return Qnil;
3086 }
3087
3088
3089 SWIGINTERN VALUE
3090 _wrap_SortOptarg_optarg_get(int argc, VALUE *argv, VALUE self) {
3091 struct SortOptarg *arg1 = (struct SortOptarg *) 0 ;
3092 struct _sen_sort_optarg result;
3093 void *argp1 = 0 ;
3094 int res1 = 0 ;
3095 VALUE vresult = Qnil;
3096
3097 if ((argc < 0) || (argc > 0)) {
3098 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3099 }
3100 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_SortOptarg, 0 | 0 );
3101 if (!SWIG_IsOK(res1)) {
3102 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "optarg" "', argument " "1"" of type '" "struct SortOptarg *""'");
3103 }
3104 arg1 = (struct SortOptarg *)(argp1);
3105 result = ((arg1)->optarg);
3106 vresult = SWIG_NewPointerObj((struct _sen_sort_optarg *)memcpy((struct _sen_sort_optarg *)malloc(sizeof(struct _sen_sort_optarg)),&result,sizeof(struct _sen_sort_optarg)), SWIGTYPE_p__sen_sort_optarg, SWIG_POINTER_OWN | 0 );
3107 return vresult;
3108 fail:
3109 return Qnil;
3110 }
3111
3112
3113 #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
3114 SWIGINTERN VALUE
3115 _wrap_SortOptarg_allocate(VALUE self) {
3116 #else
3117 SWIGINTERN VALUE
3118 _wrap_SortOptarg_allocate(int argc, VALUE *argv, VALUE self) {
3119 #endif
3120
3121
3122 VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_SortOptarg);
3123 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
3124 rb_obj_call_init(vresult, argc, argv);
3125 #endif
3126 return vresult;
3127 }
3128
3129
3130 SWIGINTERN VALUE
3131 _wrap_new_SortOptarg(int argc, VALUE *argv, VALUE self) {
3132 struct SortOptarg *result = 0 ;
3133
3134 if ((argc < 0) || (argc > 0)) {
3135 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3136 }
3137 result = (struct SortOptarg *)(struct SortOptarg *) calloc(1, sizeof(struct SortOptarg));DATA_PTR(self) = result;
3138
3139 return self;
3140 fail:
3141 return Qnil;
3142 }
3143
3144
3145 SWIGINTERN void
3146 free_SortOptarg(struct SortOptarg *arg1) {
3147 free((char *) arg1);
3148 }
3149
3150 SWIGINTERN VALUE
3151 _wrap_sen_index_keys(int argc, VALUE *argv, VALUE self) {
3152 sen_index *arg1 = (sen_index *) 0 ;
3153 sen_sym *result = 0 ;
3154 void *argp1 = 0 ;
3155 int res1 = 0 ;
3156 VALUE vresult = Qnil;
3157
3158 if ((argc < 1) || (argc > 1)) {
3159 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3160 }
3161 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_index, 0 | 0 );
3162 if (!SWIG_IsOK(res1)) {
3163 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_keys" "', argument " "1"" of type '" "sen_index *""'");
3164 }
3165 arg1 = (sen_index *)(argp1);
3166 result = (sen_sym *)sen_index_keys(arg1);
3167 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_sym, 0 | 0 );
3168 return vresult;
3169 fail:
3170 return Qnil;
3171 }
3172
3173
3174 SWIGINTERN VALUE
3175 _wrap_sen_index_lexicon(int argc, VALUE *argv, VALUE self) {
3176 sen_index *arg1 = (sen_index *) 0 ;
3177 sen_sym *result = 0 ;
3178 void *argp1 = 0 ;
3179 int res1 = 0 ;
3180 VALUE vresult = Qnil;
3181
3182 if ((argc < 1) || (argc > 1)) {
3183 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3184 }
3185 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_index, 0 | 0 );
3186 if (!SWIG_IsOK(res1)) {
3187 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_lexicon" "', argument " "1"" of type '" "sen_index *""'");
3188 }
3189 arg1 = (sen_index *)(argp1);
3190 result = (sen_sym *)sen_index_lexicon(arg1);
3191 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_sym, 0 | 0 );
3192 return vresult;
3193 fail:
3194 return Qnil;
3195 }
3196
3197
3198 SWIGINTERN VALUE
3199 _wrap_sen_index_inv(int argc, VALUE *argv, VALUE self) {
3200 sen_index *arg1 = (sen_index *) 0 ;
3201 sen_inv *result = 0 ;
3202 void *argp1 = 0 ;
3203 int res1 = 0 ;
3204 VALUE vresult = Qnil;
3205
3206 if ((argc < 1) || (argc > 1)) {
3207 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3208 }
3209 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_index, 0 | 0 );
3210 if (!SWIG_IsOK(res1)) {
3211 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_inv" "', argument " "1"" of type '" "sen_index *""'");
3212 }
3213 arg1 = (sen_index *)(argp1);
3214 result = (sen_inv *)sen_index_inv(arg1);
3215 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_inv, 0 | 0 );
3216 return vresult;
3217 fail:
3218 return Qnil;
3219 }
3220
3221
3222 SWIGINTERN VALUE
3223 _wrap_sen_set_eh_nth(int argc, VALUE *argv, VALUE self) {
3224 sen_set_eh *arg1 = (sen_set_eh *) 0 ;
3225 int arg2 ;
3226 sen_set_eh *result = 0 ;
3227 void *argp1 = 0 ;
3228 int res1 = 0 ;
3229 int val2 ;
3230 int ecode2 = 0 ;
3231 VALUE vresult = Qnil;
3232
3233 if ((argc < 2) || (argc > 2)) {
3234 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3235 }
3236 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set_eh, 0 | 0 );
3237 if (!SWIG_IsOK(res1)) {
3238 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_eh_nth" "', argument " "1"" of type '" "sen_set_eh *""'");
3239 }
3240 arg1 = (sen_set_eh *)(argp1);
3241 ecode2 = SWIG_AsVal_int(argv[1], &val2);
3242 if (!SWIG_IsOK(ecode2)) {
3243 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_set_eh_nth" "', argument " "2"" of type '" "int""'");
3244 }
3245 arg2 = (int)(val2);
3246 result = (sen_set_eh *)sen_set_eh_nth(arg1,arg2);
3247 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_set_eh, 0 | 0 );
3248 return vresult;
3249 fail:
3250 return Qnil;
3251 }
3252
3253
3254 SWIGINTERN VALUE
3255 _wrap_sen_init(int argc, VALUE *argv, VALUE self) {
3256 sen_rc result;
3257 VALUE vresult = Qnil;
3258
3259 if ((argc < 0) || (argc > 0)) {
3260 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3261 }
3262 result = (sen_rc)sen_init();
3263 vresult = SWIG_From_int((int)(result));
3264 return vresult;
3265 fail:
3266 return Qnil;
3267 }
3268
3269
3270 SWIGINTERN VALUE
3271 _wrap_sen_fin(int argc, VALUE *argv, VALUE self) {
3272 sen_rc result;
3273 VALUE vresult = Qnil;
3274
3275 if ((argc < 0) || (argc > 0)) {
3276 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3277 }
3278 result = (sen_rc)sen_fin();
3279 vresult = SWIG_From_int((int)(result));
3280 return vresult;
3281 fail:
3282 return Qnil;
3283 }
3284
3285
3286 SWIGINTERN VALUE
3287 _wrap_sen_index_create(int argc, VALUE *argv, VALUE self) {
3288 char *arg1 = (char *) 0 ;
3289 int arg2 ;
3290 int arg3 ;
3291 int arg4 ;
3292 sen_encoding arg5 ;
3293 sen_index *result = 0 ;
3294 int res1 ;
3295 char *buf1 = 0 ;
3296 int alloc1 = 0 ;
3297 int val2 ;
3298 int ecode2 = 0 ;
3299 int val3 ;
3300 int ecode3 = 0 ;
3301 int val4 ;
3302 int ecode4 = 0 ;
3303 int val5 ;
3304 int ecode5 = 0 ;
3305 VALUE vresult = Qnil;
3306
3307 if ((argc < 5) || (argc > 5)) {
3308 rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
3309 }
3310 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
3311 if (!SWIG_IsOK(res1)) {
3312 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_create" "', argument " "1"" of type '" "char const *""'");
3313 }
3314 arg1 = (char *)(buf1);
3315 ecode2 = SWIG_AsVal_int(argv[1], &val2);
3316 if (!SWIG_IsOK(ecode2)) {
3317 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_index_create" "', argument " "2"" of type '" "int""'");
3318 }
3319 arg2 = (int)(val2);
3320 ecode3 = SWIG_AsVal_int(argv[2], &val3);
3321 if (!SWIG_IsOK(ecode3)) {
3322 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_index_create" "', argument " "3"" of type '" "int""'");
3323 }
3324 arg3 = (int)(val3);
3325 ecode4 = SWIG_AsVal_int(argv[3], &val4);
3326 if (!SWIG_IsOK(ecode4)) {
3327 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_index_create" "', argument " "4"" of type '" "int""'");
3328 }
3329 arg4 = (int)(val4);
3330 ecode5 = SWIG_AsVal_int(argv[4], &val5);
3331 if (!SWIG_IsOK(ecode5)) {
3332 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sen_index_create" "', argument " "5"" of type '" "sen_encoding""'");
3333 }
3334 arg5 = (sen_encoding)(val5);
3335 result = (sen_index *)sen_index_create((char const *)arg1,arg2,arg3,arg4,arg5);
3336 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_index, 0 | 0 );
3337 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3338 return vresult;
3339 fail:
3340 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3341 return Qnil;
3342 }
3343
3344
3345 SWIGINTERN VALUE
3346 _wrap_sen_index_open(int argc, VALUE *argv, VALUE self) {
3347 char *arg1 = (char *) 0 ;
3348 sen_index *result = 0 ;
3349 int res1 ;
3350 char *buf1 = 0 ;
3351 int alloc1 = 0 ;
3352 VALUE vresult = Qnil;
3353
3354 if ((argc < 1) || (argc > 1)) {
3355 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3356 }
3357 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
3358 if (!SWIG_IsOK(res1)) {
3359 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_open" "', argument " "1"" of type '" "char const *""'");
3360 }
3361 arg1 = (char *)(buf1);
3362 result = (sen_index *)sen_index_open((char const *)arg1);
3363 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_index, 0 | 0 );
3364 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3365 return vresult;
3366 fail:
3367 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3368 return Qnil;
3369 }
3370
3371
3372 SWIGINTERN VALUE
3373 _wrap_sen_index_close(int argc, VALUE *argv, VALUE self) {
3374 sen_index *arg1 = (sen_index *) 0 ;
3375 sen_rc result;
3376 void *argp1 = 0 ;
3377 int res1 = 0 ;
3378 VALUE vresult = Qnil;
3379
3380 if ((argc < 1) || (argc > 1)) {
3381 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3382 }
3383 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_index, 0 | 0 );
3384 if (!SWIG_IsOK(res1)) {
3385 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_close" "', argument " "1"" of type '" "sen_index *""'");
3386 }
3387 arg1 = (sen_index *)(argp1);
3388 result = (sen_rc)sen_index_close(arg1);
3389 vresult = SWIG_From_int((int)(result));
3390 return vresult;
3391 fail:
3392 return Qnil;
3393 }
3394
3395
3396 SWIGINTERN VALUE
3397 _wrap_sen_index_remove(int argc, VALUE *argv, VALUE self) {
3398 char *arg1 = (char *) 0 ;
3399 sen_rc result;
3400 int res1 ;
3401 char *buf1 = 0 ;
3402 int alloc1 = 0 ;
3403 VALUE vresult = Qnil;
3404
3405 if ((argc < 1) || (argc > 1)) {
3406 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3407 }
3408 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
3409 if (!SWIG_IsOK(res1)) {
3410 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_remove" "', argument " "1"" of type '" "char const *""'");
3411 }
3412 arg1 = (char *)(buf1);
3413 result = (sen_rc)sen_index_remove((char const *)arg1);
3414 vresult = SWIG_From_int((int)(result));
3415 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3416 return vresult;
3417 fail:
3418 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3419 return Qnil;
3420 }
3421
3422
3423 SWIGINTERN VALUE
3424 _wrap_sen_index_rename(int argc, VALUE *argv, VALUE self) {
3425 char *arg1 = (char *) 0 ;
3426 char *arg2 = (char *) 0 ;
3427 sen_rc result;
3428 int res1 ;
3429 char *buf1 = 0 ;
3430 int alloc1 = 0 ;
3431 int res2 ;
3432 char *buf2 = 0 ;
3433 int alloc2 = 0 ;
3434 VALUE vresult = Qnil;
3435
3436 if ((argc < 2) || (argc > 2)) {
3437 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3438 }
3439 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
3440 if (!SWIG_IsOK(res1)) {
3441 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_rename" "', argument " "1"" of type '" "char const *""'");
3442 }
3443 arg1 = (char *)(buf1);
3444 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3445 if (!SWIG_IsOK(res2)) {
3446 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_index_rename" "', argument " "2"" of type '" "char const *""'");
3447 }
3448 arg2 = (char *)(buf2);
3449 result = (sen_rc)sen_index_rename((char const *)arg1,(char const *)arg2);
3450 vresult = SWIG_From_int((int)(result));
3451 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3452 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3453 return vresult;
3454 fail:
3455 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3456 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3457 return Qnil;
3458 }
3459
3460
3461 SWIGINTERN VALUE
3462 _wrap_sen_index_upd(int argc, VALUE *argv, VALUE self) {
3463 sen_index *arg1 = (sen_index *) 0 ;
3464 void *arg2 = (void *) 0 ;
3465 char *arg3 = (char *) 0 ;
3466 unsigned int arg4 ;
3467 char *arg5 = (char *) 0 ;
3468 unsigned int arg6 ;
3469 sen_rc result;
3470 void *argp1 = 0 ;
3471 int res1 = 0 ;
3472 int res3 ;
3473 char *buf3 = 0 ;
3474 int alloc3 = 0 ;
3475 unsigned int val4 ;
3476 int ecode4 = 0 ;
3477 int res5 ;
3478 char *buf5 = 0 ;
3479 int alloc5 = 0 ;
3480 unsigned int val6 ;
3481 int ecode6 = 0 ;
3482 VALUE vresult = Qnil;
3483
3484 if ((argc < 6) || (argc > 6)) {
3485 rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
3486 }
3487 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_index, 0 | 0 );
3488 if (!SWIG_IsOK(res1)) {
3489 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_upd" "', argument " "1"" of type '" "sen_index *""'");
3490 }
3491 arg1 = (sen_index *)(argp1);
3492 {
3493 if (TYPE(argv[1]) == T_STRING) {
3494 arg2 = (void *)StringValuePtr(argv[1]);
3495 } else {
3496 SWIG_exception_fail(SWIG_TypeError, "Expected string");
3497 }
3498 }
3499 res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
3500 if (!SWIG_IsOK(res3)) {
3501 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sen_index_upd" "', argument " "3"" of type '" "char const *""'");
3502 }
3503 arg3 = (char *)(buf3);
3504 ecode4 = SWIG_AsVal_unsigned_SS_int(argv[3], &val4);
3505 if (!SWIG_IsOK(ecode4)) {
3506 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_index_upd" "', argument " "4"" of type '" "unsigned int""'");
3507 }
3508 arg4 = (unsigned int)(val4);
3509 res5 = SWIG_AsCharPtrAndSize(argv[4], &buf5, NULL, &alloc5);
3510 if (!SWIG_IsOK(res5)) {
3511 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sen_index_upd" "', argument " "5"" of type '" "char const *""'");
3512 }
3513 arg5 = (char *)(buf5);
3514 ecode6 = SWIG_AsVal_unsigned_SS_int(argv[5], &val6);
3515 if (!SWIG_IsOK(ecode6)) {
3516 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "sen_index_upd" "', argument " "6"" of type '" "unsigned int""'");
3517 }
3518 arg6 = (unsigned int)(val6);
3519 result = (sen_rc)sen_index_upd(arg1,(void const *)arg2,(char const *)arg3,arg4,(char const *)arg5,arg6);
3520 vresult = SWIG_From_int((int)(result));
3521 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3522 if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
3523 return vresult;
3524 fail:
3525 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3526 if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
3527 return Qnil;
3528 }
3529
3530
3531 SWIGINTERN VALUE
3532 _wrap_sen_index_sel(int argc, VALUE *argv, VALUE self) {
3533 sen_index *arg1 = (sen_index *) 0 ;
3534 char *arg2 = (char *) 0 ;
3535 unsigned int arg3 ;
3536 sen_records *result = 0 ;
3537 void *argp1 = 0 ;
3538 int res1 = 0 ;
3539 int res2 ;
3540 char *buf2 = 0 ;
3541 int alloc2 = 0 ;
3542 unsigned int val3 ;
3543 int ecode3 = 0 ;
3544 VALUE vresult = Qnil;
3545
3546 if ((argc < 3) || (argc > 3)) {
3547 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3548 }
3549 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_index, 0 | 0 );
3550 if (!SWIG_IsOK(res1)) {
3551 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_sel" "', argument " "1"" of type '" "sen_index *""'");
3552 }
3553 arg1 = (sen_index *)(argp1);
3554 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3555 if (!SWIG_IsOK(res2)) {
3556 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_index_sel" "', argument " "2"" of type '" "char const *""'");
3557 }
3558 arg2 = (char *)(buf2);
3559 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
3560 if (!SWIG_IsOK(ecode3)) {
3561 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_index_sel" "', argument " "3"" of type '" "unsigned int""'");
3562 }
3563 arg3 = (unsigned int)(val3);
3564 result = (sen_records *)sen_index_sel(arg1,(char const *)arg2,arg3);
3565 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_records, 0 | 0 );
3566 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3567 return vresult;
3568 fail:
3569 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3570 return Qnil;
3571 }
3572
3573
3574 SWIGINTERN VALUE
3575 _wrap_sen_records_next(int argc, VALUE *argv, VALUE self) {
3576 sen_records *arg1 = (sen_records *) 0 ;
3577 void *arg2 = (void *) 0 ;
3578 int arg3 ;
3579 int *arg4 = (int *) 0 ;
3580 int result;
3581 void *argp1 = 0 ;
3582 int res1 = 0 ;
3583 VALUE vresult = Qnil;
3584
3585 {
3586 arg4 = (int *)calloc(1, sizeof(int));
3587 }
3588 if ((argc < 2) || (argc > 2)) {
3589 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3590 }
3591 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
3592 if (!SWIG_IsOK(res1)) {
3593 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_next" "', argument " "1"" of type '" "sen_records *""'");
3594 }
3595 arg1 = (sen_records *)(argp1);
3596 {
3597 int size = NUM2INT(argv[1]);
3598 arg2 = (size) ? calloc(size, 1) : NULL;
3599 arg3 = size;
3600 }
3601 result = (int)sen_records_next(arg1,arg2,arg3,arg4);
3602 vresult = SWIG_From_int((int)(result));
3603 {
3604 VALUE ary;
3605 if (TYPE(vresult) == T_ARRAY) {
3606 ary = vresult;
3607 } else {
3608 ary = rb_ary_new2(2);
3609 rb_ary_push(ary, vresult);
3610 }
3611 if (arg2) {
3612 rb_ary_push(ary, rb_str_new2(arg2));
3613 free(arg2);
3614 } else {
3615 rb_ary_push(ary, Qnil);
3616 }
3617 vresult = ary;
3618 }
3619 {
3620 VALUE ary;
3621 if (TYPE(vresult) == T_ARRAY) {
3622 ary = vresult;
3623 } else {
3624 ary = rb_ary_new2(2);
3625 rb_ary_push(ary, vresult);
3626 }
3627 rb_ary_push(ary, INT2NUM(*arg4));
3628 free(arg4);
3629 vresult = ary;
3630 }
3631 return vresult;
3632 fail:
3633 return Qnil;
3634 }
3635
3636
3637 SWIGINTERN VALUE
3638 _wrap_sen_records_rewind(int argc, VALUE *argv, VALUE self) {
3639 sen_records *arg1 = (sen_records *) 0 ;
3640 sen_rc result;
3641 void *argp1 = 0 ;
3642 int res1 = 0 ;
3643 VALUE vresult = Qnil;
3644
3645 if ((argc < 1) || (argc > 1)) {
3646 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3647 }
3648 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
3649 if (!SWIG_IsOK(res1)) {
3650 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_rewind" "', argument " "1"" of type '" "sen_records *""'");
3651 }
3652 arg1 = (sen_records *)(argp1);
3653 result = (sen_rc)sen_records_rewind(arg1);
3654 vresult = SWIG_From_int((int)(result));
3655 return vresult;
3656 fail:
3657 return Qnil;
3658 }
3659
3660
3661 SWIGINTERN VALUE
3662 _wrap_sen_records_curr_score(int argc, VALUE *argv, VALUE self) {
3663 sen_records *arg1 = (sen_records *) 0 ;
3664 int result;
3665 void *argp1 = 0 ;
3666 int res1 = 0 ;
3667 VALUE vresult = Qnil;
3668
3669 if ((argc < 1) || (argc > 1)) {
3670 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3671 }
3672 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
3673 if (!SWIG_IsOK(res1)) {
3674 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_curr_score" "', argument " "1"" of type '" "sen_records *""'");
3675 }
3676 arg1 = (sen_records *)(argp1);
3677 result = (int)sen_records_curr_score(arg1);
3678 vresult = SWIG_From_int((int)(result));
3679 return vresult;
3680 fail:
3681 return Qnil;
3682 }
3683
3684
3685 SWIGINTERN VALUE
3686 _wrap_sen_records_curr_key(int argc, VALUE *argv, VALUE self) {
3687 sen_records *arg1 = (sen_records *) 0 ;
3688 void *arg2 = (void *) 0 ;
3689 int arg3 ;
3690 int result;
3691 void *argp1 = 0 ;
3692 int res1 = 0 ;
3693 VALUE vresult = Qnil;
3694
3695 if ((argc < 2) || (argc > 2)) {
3696 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3697 }
3698 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
3699 if (!SWIG_IsOK(res1)) {
3700 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_curr_key" "', argument " "1"" of type '" "sen_records *""'");
3701 }
3702 arg1 = (sen_records *)(argp1);
3703 {
3704 int size = NUM2INT(argv[1]);
3705 arg2 = (size) ? calloc(size, 1) : NULL;
3706 arg3 = size;
3707 }
3708 result = (int)sen_records_curr_key(arg1,arg2,arg3);
3709 vresult = SWIG_From_int((int)(result));
3710 {
3711 VALUE ary;
3712 if (TYPE(vresult) == T_ARRAY) {
3713 ary = vresult;
3714 } else {
3715 ary = rb_ary_new2(2);
3716 rb_ary_push(ary, vresult);
3717 }
3718 if (arg2) {
3719 rb_ary_push(ary, rb_str_new2(arg2));
3720 free(arg2);
3721 } else {
3722 rb_ary_push(ary, Qnil);
3723 }
3724 vresult = ary;
3725 }
3726 return vresult;
3727 fail:
3728 return Qnil;
3729 }
3730
3731
3732 SWIGINTERN VALUE
3733 _wrap_sen_records_nhits(int argc, VALUE *argv, VALUE self) {
3734 sen_records *arg1 = (sen_records *) 0 ;
3735 int result;
3736 void *argp1 = 0 ;
3737 int res1 = 0 ;
3738 VALUE vresult = Qnil;
3739
3740 if ((argc < 1) || (argc > 1)) {
3741 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3742 }
3743 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
3744 if (!SWIG_IsOK(res1)) {
3745 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_nhits" "', argument " "1"" of type '" "sen_records *""'");
3746 }
3747 arg1 = (sen_records *)(argp1);
3748 result = (int)sen_records_nhits(arg1);
3749 vresult = SWIG_From_int((int)(result));
3750 return vresult;
3751 fail:
3752 return Qnil;
3753 }
3754
3755
3756 SWIGINTERN VALUE
3757 _wrap_sen_records_find(int argc, VALUE *argv, VALUE self) {
3758 sen_records *arg1 = (sen_records *) 0 ;
3759 void *arg2 = (void *) 0 ;
3760 int result;
3761 void *argp1 = 0 ;
3762 int res1 = 0 ;
3763 VALUE vresult = Qnil;
3764
3765 if ((argc < 2) || (argc > 2)) {
3766 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3767 }
3768 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
3769 if (!SWIG_IsOK(res1)) {
3770 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_find" "', argument " "1"" of type '" "sen_records *""'");
3771 }
3772 arg1 = (sen_records *)(argp1);
3773 {
3774 if (TYPE(argv[1]) == T_STRING) {
3775 arg2 = (void *)StringValuePtr(argv[1]);
3776 } else {
3777 SWIG_exception_fail(SWIG_TypeError, "Expected string");
3778 }
3779 }
3780 result = (int)sen_records_find(arg1,(void const *)arg2);
3781 vresult = SWIG_From_int((int)(result));
3782 return vresult;
3783 fail:
3784 return Qnil;
3785 }
3786
3787
3788 SWIGINTERN VALUE
3789 _wrap_sen_records_close(int argc, VALUE *argv, VALUE self) {
3790 sen_records *arg1 = (sen_records *) 0 ;
3791 sen_rc result;
3792 void *argp1 = 0 ;
3793 int res1 = 0 ;
3794 VALUE vresult = Qnil;
3795
3796 if ((argc < 1) || (argc > 1)) {
3797 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3798 }
3799 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
3800 if (!SWIG_IsOK(res1)) {
3801 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_close" "', argument " "1"" of type '" "sen_records *""'");
3802 }
3803 arg1 = (sen_records *)(argp1);
3804 result = (sen_rc)sen_records_close(arg1);
3805 vresult = SWIG_From_int((int)(result));
3806 return vresult;
3807 fail:
3808 return Qnil;
3809 }
3810
3811
3812 SWIGINTERN VALUE
3813 _wrap_sen_values_open(int argc, VALUE *argv, VALUE self) {
3814 sen_values *result = 0 ;
3815 VALUE vresult = Qnil;
3816
3817 if ((argc < 0) || (argc > 0)) {
3818 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3819 }
3820 result = (sen_values *)sen_values_open();
3821 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_values, 0 | 0 );
3822 return vresult;
3823 fail:
3824 return Qnil;
3825 }
3826
3827
3828 SWIGINTERN VALUE
3829 _wrap_sen_values_close(int argc, VALUE *argv, VALUE self) {
3830 sen_values *arg1 = (sen_values *) 0 ;
3831 sen_rc result;
3832 void *argp1 = 0 ;
3833 int res1 = 0 ;
3834 VALUE vresult = Qnil;
3835
3836 if ((argc < 1) || (argc > 1)) {
3837 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3838 }
3839 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_values, 0 | 0 );
3840 if (!SWIG_IsOK(res1)) {
3841 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_values_close" "', argument " "1"" of type '" "sen_values *""'");
3842 }
3843 arg1 = (sen_values *)(argp1);
3844 result = (sen_rc)sen_values_close(arg1);
3845 vresult = SWIG_From_int((int)(result));
3846 return vresult;
3847 fail:
3848 return Qnil;
3849 }
3850
3851
3852 SWIGINTERN VALUE
3853 _wrap_sen_values_add(int argc, VALUE *argv, VALUE self) {
3854 sen_values *arg1 = (sen_values *) 0 ;
3855 char *arg2 = (char *) 0 ;
3856 unsigned int arg3 ;
3857 unsigned int arg4 ;
3858 sen_rc result;
3859 void *argp1 = 0 ;
3860 int res1 = 0 ;
3861 int res2 ;
3862 char *buf2 = 0 ;
3863 int alloc2 = 0 ;
3864 unsigned int val3 ;
3865 int ecode3 = 0 ;
3866 unsigned int val4 ;
3867 int ecode4 = 0 ;
3868 VALUE vresult = Qnil;
3869
3870 if ((argc < 4) || (argc > 4)) {
3871 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
3872 }
3873 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_values, 0 | 0 );
3874 if (!SWIG_IsOK(res1)) {
3875 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_values_add" "', argument " "1"" of type '" "sen_values *""'");
3876 }
3877 arg1 = (sen_values *)(argp1);
3878 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3879 if (!SWIG_IsOK(res2)) {
3880 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_values_add" "', argument " "2"" of type '" "char const *""'");
3881 }
3882 arg2 = (char *)(buf2);
3883 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
3884 if (!SWIG_IsOK(ecode3)) {
3885 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_values_add" "', argument " "3"" of type '" "unsigned int""'");
3886 }
3887 arg3 = (unsigned int)(val3);
3888 ecode4 = SWIG_AsVal_unsigned_SS_int(argv[3], &val4);
3889 if (!SWIG_IsOK(ecode4)) {
3890 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_values_add" "', argument " "4"" of type '" "unsigned int""'");
3891 }
3892 arg4 = (unsigned int)(val4);
3893 result = (sen_rc)sen_values_add(arg1,(char const *)arg2,arg3,arg4);
3894 vresult = SWIG_From_int((int)(result));
3895 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3896 return vresult;
3897 fail:
3898 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3899 return Qnil;
3900 }
3901
3902
3903 SWIGINTERN VALUE
3904 _wrap_sen_records_open(int argc, VALUE *argv, VALUE self) {
3905 sen_rec_unit arg1 ;
3906 sen_rec_unit arg2 ;
3907 unsigned int arg3 ;
3908 sen_records *result = 0 ;
3909 int val1 ;
3910 int ecode1 = 0 ;
3911 int val2 ;
3912 int ecode2 = 0 ;
3913 unsigned int val3 ;
3914 int ecode3 = 0 ;
3915 VALUE vresult = Qnil;
3916
3917 if ((argc < 3) || (argc > 3)) {
3918 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3919 }
3920 ecode1 = SWIG_AsVal_int(argv[0], &val1);
3921 if (!SWIG_IsOK(ecode1)) {
3922 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sen_records_open" "', argument " "1"" of type '" "sen_rec_unit""'");
3923 }
3924 arg1 = (sen_rec_unit)(val1);
3925 ecode2 = SWIG_AsVal_int(argv[1], &val2);
3926 if (!SWIG_IsOK(ecode2)) {
3927 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_records_open" "', argument " "2"" of type '" "sen_rec_unit""'");
3928 }
3929 arg2 = (sen_rec_unit)(val2);
3930 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
3931 if (!SWIG_IsOK(ecode3)) {
3932 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_records_open" "', argument " "3"" of type '" "unsigned int""'");
3933 }
3934 arg3 = (unsigned int)(val3);
3935 result = (sen_records *)sen_records_open(arg1,arg2,arg3);
3936 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_records, 0 | 0 );
3937 return vresult;
3938 fail:
3939 return Qnil;
3940 }
3941
3942
3943 SWIGINTERN VALUE
3944 _wrap_sen_records_union(int argc, VALUE *argv, VALUE self) {
3945 sen_records *arg1 = (sen_records *) 0 ;
3946 sen_records *arg2 = (sen_records *) 0 ;
3947 sen_records *result = 0 ;
3948 void *argp1 = 0 ;
3949 int res1 = 0 ;
3950 void *argp2 = 0 ;
3951 int res2 = 0 ;
3952 VALUE vresult = Qnil;
3953
3954 if ((argc < 2) || (argc > 2)) {
3955 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3956 }
3957 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
3958 if (!SWIG_IsOK(res1)) {
3959 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_union" "', argument " "1"" of type '" "sen_records *""'");
3960 }
3961 arg1 = (sen_records *)(argp1);
3962 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_records, 0 | 0 );
3963 if (!SWIG_IsOK(res2)) {
3964 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_records_union" "', argument " "2"" of type '" "sen_records *""'");
3965 }
3966 arg2 = (sen_records *)(argp2);
3967 result = (sen_records *)sen_records_union(arg1,arg2);
3968 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_records, 0 | 0 );
3969 return vresult;
3970 fail:
3971 return Qnil;
3972 }
3973
3974
3975 SWIGINTERN VALUE
3976 _wrap_sen_records_subtract(int argc, VALUE *argv, VALUE self) {
3977 sen_records *arg1 = (sen_records *) 0 ;
3978 sen_records *arg2 = (sen_records *) 0 ;
3979 sen_records *result = 0 ;
3980 void *argp1 = 0 ;
3981 int res1 = 0 ;
3982 void *argp2 = 0 ;
3983 int res2 = 0 ;
3984 VALUE vresult = Qnil;
3985
3986 if ((argc < 2) || (argc > 2)) {
3987 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3988 }
3989 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
3990 if (!SWIG_IsOK(res1)) {
3991 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_subtract" "', argument " "1"" of type '" "sen_records *""'");
3992 }
3993 arg1 = (sen_records *)(argp1);
3994 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_records, 0 | 0 );
3995 if (!SWIG_IsOK(res2)) {
3996 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_records_subtract" "', argument " "2"" of type '" "sen_records *""'");
3997 }
3998 arg2 = (sen_records *)(argp2);
3999 result = (sen_records *)sen_records_subtract(arg1,arg2);
4000 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_records, 0 | 0 );
4001 return vresult;
4002 fail:
4003 return Qnil;
4004 }
4005
4006
4007 SWIGINTERN VALUE
4008 _wrap_sen_records_intersect(int argc, VALUE *argv, VALUE self) {
4009 sen_records *arg1 = (sen_records *) 0 ;
4010 sen_records *arg2 = (sen_records *) 0 ;
4011 sen_records *result = 0 ;
4012 void *argp1 = 0 ;
4013 int res1 = 0 ;
4014 void *argp2 = 0 ;
4015 int res2 = 0 ;
4016 VALUE vresult = Qnil;
4017
4018 if ((argc < 2) || (argc > 2)) {
4019 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4020 }
4021 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
4022 if (!SWIG_IsOK(res1)) {
4023 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_intersect" "', argument " "1"" of type '" "sen_records *""'");
4024 }
4025 arg1 = (sen_records *)(argp1);
4026 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_records, 0 | 0 );
4027 if (!SWIG_IsOK(res2)) {
4028 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_records_intersect" "', argument " "2"" of type '" "sen_records *""'");
4029 }
4030 arg2 = (sen_records *)(argp2);
4031 result = (sen_records *)sen_records_intersect(arg1,arg2);
4032 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_records, 0 | 0 );
4033 return vresult;
4034 fail:
4035 return Qnil;
4036 }
4037
4038
4039 SWIGINTERN VALUE
4040 _wrap_sen_records_difference(int argc, VALUE *argv, VALUE self) {
4041 sen_records *arg1 = (sen_records *) 0 ;
4042 sen_records *arg2 = (sen_records *) 0 ;
4043 int result;
4044 void *argp1 = 0 ;
4045 int res1 = 0 ;
4046 void *argp2 = 0 ;
4047 int res2 = 0 ;
4048 VALUE vresult = Qnil;
4049
4050 if ((argc < 2) || (argc > 2)) {
4051 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4052 }
4053 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
4054 if (!SWIG_IsOK(res1)) {
4055 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_difference" "', argument " "1"" of type '" "sen_records *""'");
4056 }
4057 arg1 = (sen_records *)(argp1);
4058 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_records, 0 | 0 );
4059 if (!SWIG_IsOK(res2)) {
4060 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_records_difference" "', argument " "2"" of type '" "sen_records *""'");
4061 }
4062 arg2 = (sen_records *)(argp2);
4063 result = (int)sen_records_difference(arg1,arg2);
4064 vresult = SWIG_From_int((int)(result));
4065 return vresult;
4066 fail:
4067 return Qnil;
4068 }
4069
4070
4071 SWIGINTERN VALUE
4072 _wrap_sen_records_sort(int argc, VALUE *argv, VALUE self) {
4073 sen_records *arg1 = (sen_records *) 0 ;
4074 int arg2 ;
4075 sen_sort_optarg *arg3 = (sen_sort_optarg *) 0 ;
4076 sen_rc result;
4077 void *argp1 = 0 ;
4078 int res1 = 0 ;
4079 int val2 ;
4080 int ecode2 = 0 ;
4081 VALUE vresult = Qnil;
4082
4083 if ((argc < 3) || (argc > 3)) {
4084 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
4085 }
4086 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
4087 if (!SWIG_IsOK(res1)) {
4088 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_sort" "', argument " "1"" of type '" "sen_records *""'");
4089 }
4090 arg1 = (sen_records *)(argp1);
4091 ecode2 = SWIG_AsVal_int(argv[1], &val2);
4092 if (!SWIG_IsOK(ecode2)) {
4093 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_records_sort" "', argument " "2"" of type '" "int""'");
4094 }
4095 arg2 = (int)(val2);
4096 {
4097 struct SortOptarg *w;
4098 int res = SWIG_ConvertPtr(argv[2], (void *)&w, SWIGTYPE_p_SortOptarg, 0);
4099 if (!SWIG_IsOK(res)) {
4100 SWIG_exception_fail(SWIG_ArgError(res), "SortOptarg expected");
4101 }
4102 if (w) {
4103 arg3 = &w->optarg;
4104 w->optarg.mode = w->mode;
4105 if (CLASS_OF(w->compar) == rb_cProc) {
4106 w->optarg.compar = sort_handler;
4107 w->optarg.compar_arg = w;
4108 } else {
4109 w->optarg.compar = NULL;
4110 w->optarg.compar_arg = FIXNUM_P(w->compar_arg) ? (void *)(FIX2INT(w->compar_arg)) : NULL;
4111 }
4112 } else {
4113 arg3 = NULL;
4114 }
4115 }
4116 result = (sen_rc)sen_records_sort(arg1,arg2,arg3);
4117 vresult = SWIG_From_int((int)(result));
4118 return vresult;
4119 fail:
4120 return Qnil;
4121 }
4122
4123
4124 SWIGINTERN VALUE
4125 _wrap_sen_records_group(int argc, VALUE *argv, VALUE self) {
4126 sen_records *arg1 = (sen_records *) 0 ;
4127 int arg2 ;
4128 sen_group_optarg *arg3 = (sen_group_optarg *) 0 ;
4129 sen_rc result;
4130 void *argp1 = 0 ;
4131 int res1 = 0 ;
4132 int val2 ;
4133 int ecode2 = 0 ;
4134 VALUE vresult = Qnil;
4135
4136 if ((argc < 3) || (argc > 3)) {
4137 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
4138 }
4139 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
4140 if (!SWIG_IsOK(res1)) {
4141 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_group" "', argument " "1"" of type '" "sen_records *""'");
4142 }
4143 arg1 = (sen_records *)(argp1);
4144 ecode2 = SWIG_AsVal_int(argv[1], &val2);
4145 if (!SWIG_IsOK(ecode2)) {
4146 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_records_group" "', argument " "2"" of type '" "int""'");
4147 }
4148 arg2 = (int)(val2);
4149 {
4150 struct GroupOptarg *w;
4151 int res = SWIG_ConvertPtr(argv[2], (void *)&w, SWIGTYPE_p_GroupOptarg, 0);
4152 if (!SWIG_IsOK(res)) {
4153 SWIG_exception_fail(SWIG_ArgError(res), "GroupOptarg expected");
4154 }
4155 if (w) {
4156 arg3 = &w->optarg;
4157 w->optarg.mode = w->mode;
4158 w->optarg.func = CLASS_OF(w->func) == rb_cProc ? group_handler : NULL;
4159 w->optarg.func_arg = w;
4160 w->optarg.key_size = w->key_size;
4161 } else {
4162 arg3 = NULL;
4163 }
4164 }
4165 result = (sen_rc)sen_records_group(arg1,arg2,arg3);
4166 vresult = SWIG_From_int((int)(result));
4167 return vresult;
4168 fail:
4169 return Qnil;
4170 }
4171
4172
4173 SWIGINTERN VALUE
4174 _wrap_sen_records_curr_rec(int argc, VALUE *argv, VALUE self) {
4175 sen_records *arg1 = (sen_records *) 0 ;
4176 sen_recordh *result = 0 ;
4177 void *argp1 = 0 ;
4178 int res1 = 0 ;
4179 VALUE vresult = Qnil;
4180
4181 if ((argc < 1) || (argc > 1)) {
4182 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4183 }
4184 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
4185 if (!SWIG_IsOK(res1)) {
4186 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_curr_rec" "', argument " "1"" of type '" "sen_records *""'");
4187 }
4188 arg1 = (sen_records *)(argp1);
4189 result = (sen_recordh *)sen_records_curr_rec(arg1);
4190 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_recordh, 0 | 0 );
4191 return vresult;
4192 fail:
4193 return Qnil;
4194 }
4195
4196
4197 SWIGINTERN VALUE
4198 _wrap_sen_records_at(int argc, VALUE *argv, VALUE self) {
4199 sen_records *arg1 = (sen_records *) 0 ;
4200 void *arg2 = (void *) 0 ;
4201 unsigned int arg3 ;
4202 unsigned int arg4 ;
4203 int *arg5 = (int *) 0 ;
4204 int *arg6 = (int *) 0 ;
4205 sen_recordh *result = 0 ;
4206 void *argp1 = 0 ;
4207 int res1 = 0 ;
4208 unsigned int val3 ;
4209 int ecode3 = 0 ;
4210 unsigned int val4 ;
4211 int ecode4 = 0 ;
4212 VALUE vresult = Qnil;
4213
4214 {
4215 arg5 = (int *)calloc(1, sizeof(int));
4216 }
4217 {
4218 arg6 = (int *)calloc(1, sizeof(int));
4219 }
4220 if ((argc < 4) || (argc > 4)) {
4221 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
4222 }
4223 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
4224 if (!SWIG_IsOK(res1)) {
4225 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_at" "', argument " "1"" of type '" "sen_records *""'");
4226 }
4227 arg1 = (sen_records *)(argp1);
4228 {
4229 if (TYPE(argv[1]) == T_STRING) {
4230 arg2 = (void *)StringValuePtr(argv[1]);
4231 } else {
4232 SWIG_exception_fail(SWIG_TypeError, "Expected string");
4233 }
4234 }
4235 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
4236 if (!SWIG_IsOK(ecode3)) {
4237 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_records_at" "', argument " "3"" of type '" "unsigned int""'");
4238 }
4239 arg3 = (unsigned int)(val3);
4240 ecode4 = SWIG_AsVal_unsigned_SS_int(argv[3], &val4);
4241 if (!SWIG_IsOK(ecode4)) {
4242 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_records_at" "', argument " "4"" of type '" "unsigned int""'");
4243 }
4244 arg4 = (unsigned int)(val4);
4245 result = (sen_recordh *)sen_records_at(arg1,(void const *)arg2,arg3,arg4,arg5,arg6);
4246 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_recordh, 0 | 0 );
4247 {
4248 VALUE ary;
4249 if (TYPE(vresult) == T_ARRAY) {
4250 ary = vresult;
4251 } else {
4252 ary = rb_ary_new2(2);
4253 rb_ary_push(ary, vresult);
4254 }
4255 rb_ary_push(ary, INT2NUM(*arg5));
4256 free(arg5);
4257 vresult = ary;
4258 }
4259 {
4260 VALUE ary;
4261 if (TYPE(vresult) == T_ARRAY) {
4262 ary = vresult;
4263 } else {
4264 ary = rb_ary_new2(2);
4265 rb_ary_push(ary, vresult);
4266 }
4267 rb_ary_push(ary, INT2NUM(*arg6));
4268 free(arg6);
4269 vresult = ary;
4270 }
4271 return vresult;
4272 fail:
4273 return Qnil;
4274 }
4275
4276
4277 SWIGINTERN VALUE
4278 _wrap_sen_record_info(int argc, VALUE *argv, VALUE self) {
4279 sen_records *arg1 = (sen_records *) 0 ;
4280 sen_recordh *arg2 = (sen_recordh *) 0 ;
4281 void *arg3 = (void *) 0 ;
4282 int arg4 ;
4283 int *arg5 = (int *) 0 ;
4284 int *arg6 = (int *) 0 ;
4285 int *arg7 = (int *) 0 ;
4286 int *arg8 = (int *) 0 ;
4287 int *arg9 = (int *) 0 ;
4288 sen_rc result;
4289 void *argp1 = 0 ;
4290 int res1 = 0 ;
4291 void *argp2 = 0 ;
4292 int res2 = 0 ;
4293 VALUE vresult = Qnil;
4294
4295 {
4296 arg5 = (int *)calloc(1, sizeof(int));
4297 }
4298 {
4299 arg6 = (int *)calloc(1, sizeof(int));
4300 }
4301 {
4302 arg7 = (int *)calloc(1, sizeof(int));
4303 }
4304 {
4305 arg8 = (int *)calloc(1, sizeof(int));
4306 }
4307 {
4308 arg9 = (int *)calloc(1, sizeof(int));
4309 }
4310 if ((argc < 3) || (argc > 3)) {
4311 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
4312 }
4313 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
4314 if (!SWIG_IsOK(res1)) {
4315 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_record_info" "', argument " "1"" of type '" "sen_records *""'");
4316 }
4317 arg1 = (sen_records *)(argp1);
4318 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_recordh, 0 | 0 );
4319 if (!SWIG_IsOK(res2)) {
4320 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_record_info" "', argument " "2"" of type '" "sen_recordh const *""'");
4321 }
4322 arg2 = (sen_recordh *)(argp2);
4323 {
4324 int size = NUM2INT(argv[2]);
4325 arg3 = (size) ? calloc(size, 1) : NULL;
4326 arg4 = size;
4327 }
4328 result = (sen_rc)sen_record_info(arg1,(sen_recordh const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
4329 vresult = SWIG_From_int((int)(result));
4330 {
4331 VALUE ary;
4332 if (TYPE(vresult) == T_ARRAY) {
4333 ary = vresult;
4334 } else {
4335 ary = rb_ary_new2(2);
4336 rb_ary_push(ary, vresult);
4337 }
4338 if (arg3) {
4339 rb_ary_push(ary, rb_str_new2(arg3));
4340 free(arg3);
4341 } else {
4342 rb_ary_push(ary, Qnil);
4343 }
4344 vresult = ary;
4345 }
4346 {
4347 VALUE ary;
4348 if (TYPE(vresult) == T_ARRAY) {
4349 ary = vresult;
4350 } else {
4351 ary = rb_ary_new2(2);
4352 rb_ary_push(ary, vresult);
4353 }
4354 rb_ary_push(ary, INT2NUM(*arg5));
4355 free(arg5);
4356 vresult = ary;
4357 }
4358 {
4359 VALUE ary;
4360 if (TYPE(vresult) == T_ARRAY) {
4361 ary = vresult;
4362 } else {
4363 ary = rb_ary_new2(2);
4364 rb_ary_push(ary, vresult);
4365 }
4366 rb_ary_push(ary, INT2NUM(*arg6));
4367 free(arg6);
4368 vresult = ary;
4369 }
4370 {
4371 VALUE ary;
4372 if (TYPE(vresult) == T_ARRAY) {
4373 ary = vresult;
4374 } else {
4375 ary = rb_ary_new2(2);
4376 rb_ary_push(ary, vresult);
4377 }
4378 rb_ary_push(ary, INT2NUM(*arg7));
4379 free(arg7);
4380 vresult = ary;
4381 }
4382 {
4383 VALUE ary;
4384 if (TYPE(vresult) == T_ARRAY) {
4385 ary = vresult;
4386 } else {
4387 ary = rb_ary_new2(2);
4388 rb_ary_push(ary, vresult);
4389 }
4390 rb_ary_push(ary, INT2NUM(*arg8));
4391 free(arg8);
4392 vresult = ary;
4393 }
4394 {
4395 VALUE ary;
4396 if (TYPE(vresult) == T_ARRAY) {
4397 ary = vresult;
4398 } else {
4399 ary = rb_ary_new2(2);
4400 rb_ary_push(ary, vresult);
4401 }
4402 rb_ary_push(ary, INT2NUM(*arg9));
4403 free(arg9);
4404 vresult = ary;
4405 }
4406 return vresult;
4407 fail:
4408 return Qnil;
4409 }
4410
4411
4412 SWIGINTERN VALUE
4413 _wrap_sen_record_subrec_info(int argc, VALUE *argv, VALUE self) {
4414 sen_records *arg1 = (sen_records *) 0 ;
4415 sen_recordh *arg2 = (sen_recordh *) 0 ;
4416 int arg3 ;
4417 void *arg4 = (void *) 0 ;
4418 int arg5 ;
4419 int *arg6 = (int *) 0 ;
4420 int *arg7 = (int *) 0 ;
4421 int *arg8 = (int *) 0 ;
4422 int *arg9 = (int *) 0 ;
4423 sen_rc result;
4424 void *argp1 = 0 ;
4425 int res1 = 0 ;
4426 void *argp2 = 0 ;
4427 int res2 = 0 ;
4428 int val3 ;
4429 int ecode3 = 0 ;
4430 VALUE vresult = Qnil;
4431
4432 {
4433 arg6 = (int *)calloc(1, sizeof(int));
4434 }
4435 {
4436 arg7 = (int *)calloc(1, sizeof(int));
4437 }
4438 {
4439 arg8 = (int *)calloc(1, sizeof(int));
4440 }
4441 {
4442 arg9 = (int *)calloc(1, sizeof(int));
4443 }
4444 if ((argc < 4) || (argc > 4)) {
4445 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
4446 }
4447 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records, 0 | 0 );
4448 if (!SWIG_IsOK(res1)) {
4449 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_record_subrec_info" "', argument " "1"" of type '" "sen_records *""'");
4450 }
4451 arg1 = (sen_records *)(argp1);
4452 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_recordh, 0 | 0 );
4453 if (!SWIG_IsOK(res2)) {
4454 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_record_subrec_info" "', argument " "2"" of type '" "sen_recordh const *""'");
4455 }
4456 arg2 = (sen_recordh *)(argp2);
4457 ecode3 = SWIG_AsVal_int(argv[2], &val3);
4458 if (!SWIG_IsOK(ecode3)) {
4459 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_record_subrec_info" "', argument " "3"" of type '" "int""'");
4460 }
4461 arg3 = (int)(val3);
4462 {
4463 int size = NUM2INT(argv[3]);
4464 arg4 = (size) ? calloc(size, 1) : NULL;
4465 arg5 = size;
4466 }
4467 result = (sen_rc)sen_record_subrec_info(arg1,(sen_recordh const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
4468 vresult = SWIG_From_int((int)(result));
4469 {
4470 VALUE ary;
4471 if (TYPE(vresult) == T_ARRAY) {
4472 ary = vresult;
4473 } else {
4474 ary = rb_ary_new2(2);
4475 rb_ary_push(ary, vresult);
4476 }
4477 if (arg4) {
4478 rb_ary_push(ary, rb_str_new2(arg4));
4479 free(arg4);
4480 } else {
4481 rb_ary_push(ary, Qnil);
4482 }
4483 vresult = ary;
4484 }
4485 {
4486 VALUE ary;
4487 if (TYPE(vresult) == T_ARRAY) {
4488 ary = vresult;
4489 } else {
4490 ary = rb_ary_new2(2);
4491 rb_ary_push(ary, vresult);
4492 }
4493 rb_ary_push(ary, INT2NUM(*arg6));
4494 free(arg6);
4495 vresult = ary;
4496 }
4497 {
4498 VALUE ary;
4499 if (TYPE(vresult) == T_ARRAY) {
4500 ary = vresult;
4501 } else {
4502 ary = rb_ary_new2(2);
4503 rb_ary_push(ary, vresult);
4504 }
4505 rb_ary_push(ary, INT2NUM(*arg7));
4506 free(arg7);
4507 vresult = ary;
4508 }
4509 {
4510 VALUE ary;
4511 if (TYPE(vresult) == T_ARRAY) {
4512 ary = vresult;
4513 } else {
4514 ary = rb_ary_new2(2);
4515 rb_ary_push(ary, vresult);
4516 }
4517 rb_ary_push(ary, INT2NUM(*arg8));
4518 free(arg8);
4519 vresult = ary;
4520 }
4521 {
4522 VALUE ary;
4523 if (TYPE(vresult) == T_ARRAY) {
4524 ary = vresult;
4525 } else {
4526 ary = rb_ary_new2(2);
4527 rb_ary_push(ary, vresult);
4528 }
4529 rb_ary_push(ary, INT2NUM(*arg9));
4530 free(arg9);
4531 vresult = ary;
4532 }
4533 return vresult;
4534 fail:
4535 return Qnil;
4536 }
4537
4538
4539 SWIGINTERN VALUE
4540 _wrap_sen_index_create_with_keys(int argc, VALUE *argv, VALUE self) {
4541 char *arg1 = (char *) 0 ;
4542 sen_sym *arg2 = (sen_sym *) 0 ;
4543 int arg3 ;
4544 int arg4 ;
4545 sen_encoding arg5 ;
4546 sen_index *result = 0 ;
4547 int res1 ;
4548 char *buf1 = 0 ;
4549 int alloc1 = 0 ;
4550 void *argp2 = 0 ;
4551 int res2 = 0 ;
4552 int val3 ;
4553 int ecode3 = 0 ;
4554 int val4 ;
4555 int ecode4 = 0 ;
4556 int val5 ;
4557 int ecode5 = 0 ;
4558 VALUE vresult = Qnil;
4559
4560 if ((argc < 5) || (argc > 5)) {
4561 rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
4562 }
4563 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
4564 if (!SWIG_IsOK(res1)) {
4565 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_create_with_keys" "', argument " "1"" of type '" "char const *""'");
4566 }
4567 arg1 = (char *)(buf1);
4568 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_sym, 0 | 0 );
4569 if (!SWIG_IsOK(res2)) {
4570 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_index_create_with_keys" "', argument " "2"" of type '" "sen_sym *""'");
4571 }
4572 arg2 = (sen_sym *)(argp2);
4573 ecode3 = SWIG_AsVal_int(argv[2], &val3);
4574 if (!SWIG_IsOK(ecode3)) {
4575 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_index_create_with_keys" "', argument " "3"" of type '" "int""'");
4576 }
4577 arg3 = (int)(val3);
4578 ecode4 = SWIG_AsVal_int(argv[3], &val4);
4579 if (!SWIG_IsOK(ecode4)) {
4580 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_index_create_with_keys" "', argument " "4"" of type '" "int""'");
4581 }
4582 arg4 = (int)(val4);
4583 ecode5 = SWIG_AsVal_int(argv[4], &val5);
4584 if (!SWIG_IsOK(ecode5)) {
4585 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sen_index_create_with_keys" "', argument " "5"" of type '" "sen_encoding""'");
4586 }
4587 arg5 = (sen_encoding)(val5);
4588 result = (sen_index *)sen_index_create_with_keys((char const *)arg1,arg2,arg3,arg4,arg5);
4589 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_index, 0 | 0 );
4590 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
4591 return vresult;
4592 fail:
4593 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
4594 return Qnil;
4595 }
4596
4597
4598 SWIGINTERN VALUE
4599 _wrap_sen_index_open_with_keys(int argc, VALUE *argv, VALUE self) {
4600 char *arg1 = (char *) 0 ;
4601 sen_sym *arg2 = (sen_sym *) 0 ;
4602 sen_index *result = 0 ;
4603 int res1 ;
4604 char *buf1 = 0 ;
4605 int alloc1 = 0 ;
4606 void *argp2 = 0 ;
4607 int res2 = 0 ;
4608 VALUE vresult = Qnil;
4609
4610 if ((argc < 2) || (argc > 2)) {
4611 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4612 }
4613 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
4614 if (!SWIG_IsOK(res1)) {
4615 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_open_with_keys" "', argument " "1"" of type '" "char const *""'");
4616 }
4617 arg1 = (char *)(buf1);
4618 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_sym, 0 | 0 );
4619 if (!SWIG_IsOK(res2)) {
4620 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_index_open_with_keys" "', argument " "2"" of type '" "sen_sym *""'");
4621 }
4622 arg2 = (sen_sym *)(argp2);
4623 result = (sen_index *)sen_index_open_with_keys((char const *)arg1,arg2);
4624 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_index, 0 | 0 );
4625 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
4626 return vresult;
4627 fail:
4628 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
4629 return Qnil;
4630 }
4631
4632
4633 SWIGINTERN VALUE
4634 _wrap_sen_index_update(int argc, VALUE *argv, VALUE self) {
4635 sen_index *arg1 = (sen_index *) 0 ;
4636 void *arg2 = (void *) 0 ;
4637 unsigned int arg3 ;
4638 sen_values *arg4 = (sen_values *) 0 ;
4639 sen_values *arg5 = (sen_values *) 0 ;
4640 sen_rc result;
4641 void *argp1 = 0 ;
4642 int res1 = 0 ;
4643 unsigned int val3 ;
4644 int ecode3 = 0 ;
4645 void *argp4 = 0 ;
4646 int res4 = 0 ;
4647 void *argp5 = 0 ;
4648 int res5 = 0 ;
4649 VALUE vresult = Qnil;
4650
4651 if ((argc < 5) || (argc > 5)) {
4652 rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
4653 }
4654 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_index, 0 | 0 );
4655 if (!SWIG_IsOK(res1)) {
4656 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_update" "', argument " "1"" of type '" "sen_index *""'");
4657 }
4658 arg1 = (sen_index *)(argp1);
4659 {
4660 if (TYPE(argv[1]) == T_STRING) {
4661 arg2 = (void *)StringValuePtr(argv[1]);
4662 } else {
4663 SWIG_exception_fail(SWIG_TypeError, "Expected string");
4664 }
4665 }
4666 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
4667 if (!SWIG_IsOK(ecode3)) {
4668 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_index_update" "', argument " "3"" of type '" "unsigned int""'");
4669 }
4670 arg3 = (unsigned int)(val3);
4671 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_sen_values, 0 | 0 );
4672 if (!SWIG_IsOK(res4)) {
4673 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sen_index_update" "', argument " "4"" of type '" "sen_values *""'");
4674 }
4675 arg4 = (sen_values *)(argp4);
4676 res5 = SWIG_ConvertPtr(argv[4], &argp5,SWIGTYPE_p_sen_values, 0 | 0 );
4677 if (!SWIG_IsOK(res5)) {
4678 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sen_index_update" "', argument " "5"" of type '" "sen_values *""'");
4679 }
4680 arg5 = (sen_values *)(argp5);
4681 result = (sen_rc)sen_index_update(arg1,(void const *)arg2,arg3,arg4,arg5);
4682 vresult = SWIG_From_int((int)(result));
4683 return vresult;
4684 fail:
4685 return Qnil;
4686 }
4687
4688
4689 SWIGINTERN VALUE
4690 _wrap_sen_index_select(int argc, VALUE *argv, VALUE self) {
4691 sen_index *arg1 = (sen_index *) 0 ;
4692 char *arg2 = (char *) 0 ;
4693 unsigned int arg3 ;
4694 sen_records *arg4 = (sen_records *) 0 ;
4695 sen_sel_operator arg5 ;
4696 sen_select_optarg *arg6 = (sen_select_optarg *) 0 ;
4697 sen_rc result;
4698 void *argp1 = 0 ;
4699 int res1 = 0 ;
4700 int res2 ;
4701 char *buf2 = 0 ;
4702 int alloc2 = 0 ;
4703 unsigned int val3 ;
4704 int ecode3 = 0 ;
4705 void *argp4 = 0 ;
4706 int res4 = 0 ;
4707 int val5 ;
4708 int ecode5 = 0 ;
4709 VALUE vresult = Qnil;
4710
4711 if ((argc < 6) || (argc > 6)) {
4712 rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
4713 }
4714 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_index, 0 | 0 );
4715 if (!SWIG_IsOK(res1)) {
4716 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_select" "', argument " "1"" of type '" "sen_index *""'");
4717 }
4718 arg1 = (sen_index *)(argp1);
4719 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
4720 if (!SWIG_IsOK(res2)) {
4721 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_index_select" "', argument " "2"" of type '" "char const *""'");
4722 }
4723 arg2 = (char *)(buf2);
4724 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
4725 if (!SWIG_IsOK(ecode3)) {
4726 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_index_select" "', argument " "3"" of type '" "unsigned int""'");
4727 }
4728 arg3 = (unsigned int)(val3);
4729 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_sen_records, 0 | 0 );
4730 if (!SWIG_IsOK(res4)) {
4731 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sen_index_select" "', argument " "4"" of type '" "sen_records *""'");
4732 }
4733 arg4 = (sen_records *)(argp4);
4734 ecode5 = SWIG_AsVal_int(argv[4], &val5);
4735 if (!SWIG_IsOK(ecode5)) {
4736 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sen_index_select" "', argument " "5"" of type '" "sen_sel_operator""'");
4737 }
4738 arg5 = (sen_sel_operator)(val5);
4739 {
4740 struct SelectOptarg *w;
4741 int res = SWIG_ConvertPtr(argv[5], (void *)&w, SWIGTYPE_p_SelectOptarg, 0);
4742 if (!SWIG_IsOK(res)) {
4743 SWIG_exception_fail(SWIG_ArgError(res), "SelectOptarg expected");
4744 }
4745 if (w) {
4746 arg6 = &w->optarg;
4747 w->optarg.mode = w->mode;
4748 w->optarg.similarity_threshold = w->similarity_threshold;
4749 w->optarg.max_interval = w->max_interval;
4750 if (TYPE(w->weight_vector) == T_ARRAY) {
4751 int i, size = FIX2INT(rb_funcall(w->weight_vector, rb_intern("size"), 0));
4752 w->optarg.vector_size = size;
4753 w->optarg.weight_vector = malloc(sizeof(int) * size);
4754 for (i = 0; i < size; i++) {
4755 w->optarg.weight_vector[i] =
4756 FIX2INT(rb_funcall(w->weight_vector, rb_intern("[]"), 1, INT2NUM(i)));
4757 }
4758 } else {
4759 w->optarg.vector_size = 0;
4760 w->optarg.weight_vector = NULL;
4761 }
4762 w->optarg.func = CLASS_OF(w->func) == rb_cProc ? select_handler : NULL;
4763 w->optarg.func_arg = w;
4764 } else {
4765 arg6 = NULL;
4766 }
4767 }
4768 result = (sen_rc)sen_index_select(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
4769 vresult = SWIG_From_int((int)(result));
4770 {
4771 if (arg6 && (arg6)->weight_vector) {
4772 free((arg6)->weight_vector);
4773 }
4774 }
4775 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4776 return vresult;
4777 fail:
4778 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4779 return Qnil;
4780 }
4781
4782
4783 SWIGINTERN VALUE
4784 _wrap_sen_index_info(int argc, VALUE *argv, VALUE self) {
4785 sen_index *arg1 = (sen_index *) 0 ;
4786 int *arg2 = (int *) 0 ;
4787 int *arg3 = (int *) 0 ;
4788 int *arg4 = (int *) 0 ;
4789 sen_encoding *arg5 = (sen_encoding *) 0 ;
4790 unsigned int *arg6 = (unsigned int *) 0 ;
4791 unsigned int *arg7 = (unsigned int *) 0 ;
4792 unsigned int *arg8 = (unsigned int *) 0 ;
4793 unsigned int *arg9 = (unsigned int *) 0 ;
4794 unsigned long long *arg10 = (unsigned long long *) 0 ;
4795 unsigned long long *arg11 = (unsigned long long *) 0 ;
4796 sen_rc result;
4797 void *argp1 = 0 ;
4798 int res1 = 0 ;
4799 int temp2 ;
4800 int res2 = SWIG_TMPOBJ ;
4801 int temp3 ;
4802 int res3 = SWIG_TMPOBJ ;
4803 int temp4 ;
4804 int res4 = SWIG_TMPOBJ ;
4805 sen_encoding temp5 ;
4806 int res5 = SWIG_TMPOBJ ;
4807 unsigned int temp6 ;
4808 int res6 = SWIG_TMPOBJ ;
4809 unsigned int temp7 ;
4810 int res7 = SWIG_TMPOBJ ;
4811 unsigned int temp8 ;
4812 int res8 = SWIG_TMPOBJ ;
4813 unsigned int temp9 ;
4814 int res9 = SWIG_TMPOBJ ;
4815 unsigned long long temp10 ;
4816 int res10 = SWIG_TMPOBJ ;
4817 unsigned long long temp11 ;
4818 int res11 = SWIG_TMPOBJ ;
4819 VALUE vresult = Qnil;
4820
4821 arg2 = &temp2;
4822 arg3 = &temp3;
4823 arg4 = &temp4;
4824 arg5 = &temp5;
4825 arg6 = &temp6;
4826 arg7 = &temp7;
4827 arg8 = &temp8;
4828 arg9 = &temp9;
4829 arg10 = &temp10;
4830 arg11 = &temp11;
4831 if ((argc < 1) || (argc > 1)) {
4832 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4833 }
4834 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_index, 0 | 0 );
4835 if (!SWIG_IsOK(res1)) {
4836 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_info" "', argument " "1"" of type '" "sen_index *""'");
4837 }
4838 arg1 = (sen_index *)(argp1);
4839 result = (sen_rc)sen_index_info(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
4840 vresult = SWIG_From_int((int)(result));
4841 if (SWIG_IsTmpObj(res2)) {
4842 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2)));
4843 } else {
4844 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
4845 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
4846 }
4847 if (SWIG_IsTmpObj(res3)) {
4848 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3)));
4849 } else {
4850 int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
4851 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
4852 }
4853 if (SWIG_IsTmpObj(res4)) {
4854 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg4)));
4855 } else {
4856 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
4857 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
4858 }
4859 if (SWIG_IsTmpObj(res5)) {
4860 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg5)));
4861 } else {
4862 int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
4863 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_sen_encoding, new_flags));
4864 }
4865 if (SWIG_IsTmpObj(res6)) {
4866 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg6)));
4867 } else {
4868 int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
4869 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_unsigned_int, new_flags));
4870 }
4871 if (SWIG_IsTmpObj(res7)) {
4872 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg7)));
4873 } else {
4874 int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
4875 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_unsigned_int, new_flags));
4876 }
4877 if (SWIG_IsTmpObj(res8)) {
4878 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg8)));
4879 } else {
4880 int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
4881 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_unsigned_int, new_flags));
4882 }
4883 if (SWIG_IsTmpObj(res9)) {
4884 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg9)));
4885 } else {
4886 int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
4887 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_unsigned_int, new_flags));
4888 }
4889 if (SWIG_IsTmpObj(res10)) {
4890 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg10)));
4891 } else {
4892 int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
4893 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_unsigned_long_long, new_flags));
4894 }
4895 if (SWIG_IsTmpObj(res11)) {
4896 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg11)));
4897 } else {
4898 int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
4899 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_unsigned_long_long, new_flags));
4900 }
4901 return vresult;
4902 fail:
4903 return Qnil;
4904 }
4905
4906
4907 SWIGINTERN VALUE
4908 _wrap_sen_index_path(int argc, VALUE *argv, VALUE self) {
4909 sen_index *arg1 = (sen_index *) 0 ;
4910 char *arg2 = (char *) 0 ;
4911 int arg3 ;
4912 int result;
4913 void *argp1 = 0 ;
4914 int res1 = 0 ;
4915 VALUE vresult = Qnil;
4916
4917 if ((argc < 2) || (argc > 2)) {
4918 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4919 }
4920 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_index, 0 | 0 );
4921 if (!SWIG_IsOK(res1)) {
4922 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_path" "', argument " "1"" of type '" "sen_index *""'");
4923 }
4924 arg1 = (sen_index *)(argp1);
4925 {
4926 int size = NUM2INT(argv[1]);
4927 arg2 = (size) ? calloc(size, 1) : NULL;
4928 arg3 = size;
4929 }
4930 result = (int)sen_index_path(arg1,arg2,arg3);
4931 vresult = SWIG_From_int((int)(result));
4932 {
4933 VALUE ary;
4934 if (TYPE(vresult) == T_ARRAY) {
4935 ary = vresult;
4936 } else {
4937 ary = rb_ary_new2(2);
4938 rb_ary_push(ary, vresult);
4939 }
4940 if (arg2) {
4941 rb_ary_push(ary, rb_str_new2(arg2));
4942 free(arg2);
4943 } else {
4944 rb_ary_push(ary, Qnil);
4945 }
4946 vresult = ary;
4947 }
4948 return vresult;
4949 fail:
4950 return Qnil;
4951 }
4952
4953
4954 SWIGINTERN VALUE
4955 _wrap_sen_query_open(int argc, VALUE *argv, VALUE self) {
4956 char *arg1 = (char *) 0 ;
4957 unsigned int arg2 ;
4958 sen_sel_operator arg3 ;
4959 int arg4 ;
4960 sen_encoding arg5 ;
4961 sen_query *result = 0 ;
4962 int res1 ;
4963 char *buf1 = 0 ;
4964 int alloc1 = 0 ;
4965 unsigned int val2 ;
4966 int ecode2 = 0 ;
4967 int val3 ;
4968 int ecode3 = 0 ;
4969 int val4 ;
4970 int ecode4 = 0 ;
4971 int val5 ;
4972 int ecode5 = 0 ;
4973 VALUE vresult = Qnil;
4974
4975 if ((argc < 5) || (argc > 5)) {
4976 rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
4977 }
4978 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
4979 if (!SWIG_IsOK(res1)) {
4980 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_query_open" "', argument " "1"" of type '" "char const *""'");
4981 }
4982 arg1 = (char *)(buf1);
4983 ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
4984 if (!SWIG_IsOK(ecode2)) {
4985 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_query_open" "', argument " "2"" of type '" "unsigned int""'");
4986 }
4987 arg2 = (unsigned int)(val2);
4988 ecode3 = SWIG_AsVal_int(argv[2], &val3);
4989 if (!SWIG_IsOK(ecode3)) {
4990 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_query_open" "', argument " "3"" of type '" "sen_sel_operator""'");
4991 }
4992 arg3 = (sen_sel_operator)(val3);
4993 ecode4 = SWIG_AsVal_int(argv[3], &val4);
4994 if (!SWIG_IsOK(ecode4)) {
4995 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_query_open" "', argument " "4"" of type '" "int""'");
4996 }
4997 arg4 = (int)(val4);
4998 ecode5 = SWIG_AsVal_int(argv[4], &val5);
4999 if (!SWIG_IsOK(ecode5)) {
5000 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sen_query_open" "', argument " "5"" of type '" "sen_encoding""'");
5001 }
5002 arg5 = (sen_encoding)(val5);
5003 result = (sen_query *)sen_query_open((char const *)arg1,arg2,arg3,arg4,arg5);
5004 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_query, 0 | 0 );
5005 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5006 return vresult;
5007 fail:
5008 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5009 return Qnil;
5010 }
5011
5012
5013 SWIGINTERN VALUE
5014 _wrap_sen_query_rest(int argc, VALUE *argv, VALUE self) {
5015 sen_query *arg1 = (sen_query *) 0 ;
5016 char **arg2 = (char **) (char **)0 ;
5017 unsigned int result;
5018 void *argp1 = 0 ;
5019 int res1 = 0 ;
5020 VALUE vresult = Qnil;
5021
5022 if ((argc < 2) || (argc > 2)) {
5023 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5024 }
5025 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_query, 0 | 0 );
5026 if (!SWIG_IsOK(res1)) {
5027 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_query_rest" "', argument " "1"" of type '" "sen_query *""'");
5028 }
5029 arg1 = (sen_query *)(argp1);
5030 {
5031 int size = NUM2INT(argv[1]);
5032 arg2 = size ? calloc(1, sizeof(char *)) : NULL;
5033 }
5034 result = (unsigned int)sen_query_rest(arg1,(char const **)arg2);
5035 vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
5036 {
5037 VALUE ary;
5038 VALUE res;
5039 if (arg2) {
5040 res = rb_str_new(*(arg2), NUM2INT(vresult));
5041 free(arg2);
5042 } else {
5043 res = Qnil;
5044 }
5045 ary = rb_ary_new2(2);
5046 rb_ary_push(ary, vresult);
5047 rb_ary_push(ary, res);
5048 vresult = ary;
5049 }
5050 return vresult;
5051 fail:
5052 return Qnil;
5053 }
5054
5055
5056 SWIGINTERN VALUE
5057 _wrap_sen_query_close(int argc, VALUE *argv, VALUE self) {
5058 sen_query *arg1 = (sen_query *) 0 ;
5059 sen_rc result;
5060 void *argp1 = 0 ;
5061 int res1 = 0 ;
5062 VALUE vresult = Qnil;
5063
5064 if ((argc < 1) || (argc > 1)) {
5065 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5066 }
5067 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_query, 0 | 0 );
5068 if (!SWIG_IsOK(res1)) {
5069 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_query_close" "', argument " "1"" of type '" "sen_query *""'");
5070 }
5071 arg1 = (sen_query *)(argp1);
5072 result = (sen_rc)sen_query_close(arg1);
5073 vresult = SWIG_From_int((int)(result));
5074 return vresult;
5075 fail:
5076 return Qnil;
5077 }
5078
5079
5080 SWIGINTERN VALUE
5081 _wrap_sen_query_exec(int argc, VALUE *argv, VALUE self) {
5082 sen_index *arg1 = (sen_index *) 0 ;
5083 sen_query *arg2 = (sen_query *) 0 ;
5084 sen_records *arg3 = (sen_records *) 0 ;
5085 sen_sel_operator arg4 ;
5086 sen_rc result;
5087 void *argp1 = 0 ;
5088 int res1 = 0 ;
5089 void *argp2 = 0 ;
5090 int res2 = 0 ;
5091 void *argp3 = 0 ;
5092 int res3 = 0 ;
5093 int val4 ;
5094 int ecode4 = 0 ;
5095 VALUE vresult = Qnil;
5096
5097 if ((argc < 4) || (argc > 4)) {
5098 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
5099 }
5100 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_index, 0 | 0 );
5101 if (!SWIG_IsOK(res1)) {
5102 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_query_exec" "', argument " "1"" of type '" "sen_index *""'");
5103 }
5104 arg1 = (sen_index *)(argp1);
5105 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_query, 0 | 0 );
5106 if (!SWIG_IsOK(res2)) {
5107 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_query_exec" "', argument " "2"" of type '" "sen_query *""'");
5108 }
5109 arg2 = (sen_query *)(argp2);
5110 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_sen_records, 0 | 0 );
5111 if (!SWIG_IsOK(res3)) {
5112 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sen_query_exec" "', argument " "3"" of type '" "sen_records *""'");
5113 }
5114 arg3 = (sen_records *)(argp3);
5115 ecode4 = SWIG_AsVal_int(argv[3], &val4);
5116 if (!SWIG_IsOK(ecode4)) {
5117 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_query_exec" "', argument " "4"" of type '" "sen_sel_operator""'");
5118 }
5119 arg4 = (sen_sel_operator)(val4);
5120 result = (sen_rc)sen_query_exec(arg1,arg2,arg3,arg4);
5121 vresult = SWIG_From_int((int)(result));
5122 return vresult;
5123 fail:
5124 return Qnil;
5125 }
5126
5127
5128 SWIGINTERN VALUE
5129 _wrap_sen_query_term(int argc, VALUE *argv, VALUE self) {
5130 sen_query *arg1 = (sen_query *) 0 ;
5131 query_term_callback arg2 ;
5132 void *arg3 = (void *) 0 ;
5133 void *argp1 = 0 ;
5134 int res1 = 0 ;
5135 void *argp2 ;
5136 int res2 = 0 ;
5137 int res3 ;
5138
5139 if ((argc < 3) || (argc > 3)) {
5140 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
5141 }
5142 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_query, 0 | 0 );
5143 if (!SWIG_IsOK(res1)) {
5144 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_query_term" "', argument " "1"" of type '" "sen_query *""'");
5145 }
5146 arg1 = (sen_query *)(argp1);
5147 {
5148 res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_query_term_callback, 0 );
5149 if (!SWIG_IsOK(res2)) {
5150 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_query_term" "', argument " "2"" of type '" "query_term_callback""'");
5151 }
5152 if (!argp2) {
5153 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sen_query_term" "', argument " "2"" of type '" "query_term_callback""'");
5154 } else {
5155 arg2 = *((query_term_callback *)(argp2));
5156 }
5157 }
5158 res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0);
5159 if (!SWIG_IsOK(res3)) {
5160 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sen_query_term" "', argument " "3"" of type '" "void *""'");
5161 }
5162 sen_query_term(arg1,arg2,arg3);
5163 return Qnil;
5164 fail:
5165 return Qnil;
5166 }
5167
5168
5169 SWIGINTERN VALUE
5170 _wrap_sen_query_scan(int argc, VALUE *argv, VALUE self) {
5171 sen_query *arg1 = (sen_query *) 0 ;
5172 char **arg2 = (char **) 0 ;
5173 unsigned int *arg3 = (unsigned int *) 0 ;
5174 unsigned int arg4 ;
5175 int arg5 ;
5176 int *arg6 = (int *) 0 ;
5177 int *arg7 = (int *) 0 ;
5178 sen_rc result;
5179 void *argp1 = 0 ;
5180 int res1 = 0 ;
5181 void *argp2 = 0 ;
5182 int res2 = 0 ;
5183 unsigned int val4 ;
5184 int ecode4 = 0 ;
5185 int val5 ;
5186 int ecode5 = 0 ;
5187 VALUE vresult = Qnil;
5188
5189 {
5190 arg3 = (unsigned int *)calloc(1, sizeof(unsigned int));
5191 }
5192 {
5193 arg6 = (int *)calloc(1, sizeof(int));
5194 }
5195 {
5196 arg7 = (int *)calloc(1, sizeof(int));
5197 }
5198 if ((argc < 4) || (argc > 4)) {
5199 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
5200 }
5201 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_query, 0 | 0 );
5202 if (!SWIG_IsOK(res1)) {
5203 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_query_scan" "', argument " "1"" of type '" "sen_query *""'");
5204 }
5205 arg1 = (sen_query *)(argp1);
5206 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_p_char, 0 | 0 );
5207 if (!SWIG_IsOK(res2)) {
5208 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_query_scan" "', argument " "2"" of type '" "char const **""'");
5209 }
5210 arg2 = (char **)(argp2);
5211 ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4);
5212 if (!SWIG_IsOK(ecode4)) {
5213 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_query_scan" "', argument " "4"" of type '" "unsigned int""'");
5214 }
5215 arg4 = (unsigned int)(val4);
5216 ecode5 = SWIG_AsVal_int(argv[3], &val5);
5217 if (!SWIG_IsOK(ecode5)) {
5218 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sen_query_scan" "', argument " "5"" of type '" "int""'");
5219 }
5220 arg5 = (int)(val5);
5221 result = (sen_rc)sen_query_scan(arg1,(char const **)arg2,arg3,arg4,arg5,arg6,arg7);
5222 vresult = SWIG_From_int((int)(result));
5223 {
5224 VALUE ary;
5225 if (TYPE(vresult) == T_ARRAY) {
5226 ary = vresult;
5227 } else {
5228 ary = rb_ary_new2(2);
5229 rb_ary_push(ary, vresult);
5230 }
5231 rb_ary_push(ary, UINT2NUM(*arg3));
5232 free(arg3);
5233 vresult = ary;
5234 }
5235 {
5236 VALUE ary;
5237 if (TYPE(vresult) == T_ARRAY) {
5238 ary = vresult;
5239 } else {
5240 ary = rb_ary_new2(2);
5241 rb_ary_push(ary, vresult);
5242 }
5243 rb_ary_push(ary, INT2NUM(*arg6));
5244 free(arg6);
5245 vresult = ary;
5246 }
5247 {
5248 VALUE ary;
5249 if (TYPE(vresult) == T_ARRAY) {
5250 ary = vresult;
5251 } else {
5252 ary = rb_ary_new2(2);
5253 rb_ary_push(ary, vresult);
5254 }
5255 rb_ary_push(ary, INT2NUM(*arg7));
5256 free(arg7);
5257 vresult = ary;
5258 }
5259 return vresult;
5260 fail:
5261 return Qnil;
5262 }
5263
5264
5265 SWIGINTERN VALUE
5266 _wrap_sen_query_snip(int argc, VALUE *argv, VALUE self) {
5267 sen_query *arg1 = (sen_query *) 0 ;
5268 int arg2 ;
5269 unsigned int arg3 ;
5270 unsigned int arg4 ;
5271 unsigned int arg5 ;
5272 char **arg6 = (char **) 0 ;
5273 unsigned int *arg7 = (unsigned int *) 0 ;
5274 char **arg8 = (char **) 0 ;
5275 unsigned int *arg9 = (unsigned int *) 0 ;
5276 sen_snip_mapping *arg10 = (sen_snip_mapping *) 0 ;
5277 sen_snip *result = 0 ;
5278 void *argp1 = 0 ;
5279 int res1 = 0 ;
5280 int val2 ;
5281 int ecode2 = 0 ;
5282 unsigned int val3 ;
5283 int ecode3 = 0 ;
5284 unsigned int val4 ;
5285 int ecode4 = 0 ;
5286 unsigned int val5 ;
5287 int ecode5 = 0 ;
5288 void *argp6 = 0 ;
5289 int res6 = 0 ;
5290 void *argp8 = 0 ;
5291 int res8 = 0 ;
5292 VALUE vresult = Qnil;
5293
5294 {
5295 arg7 = (unsigned int *)calloc(1, sizeof(unsigned int));
5296 }
5297 {
5298 arg9 = (unsigned int *)calloc(1, sizeof(unsigned int));
5299 }
5300 if ((argc < 8) || (argc > 8)) {
5301 rb_raise(rb_eArgError, "wrong # of arguments(%d for 8)",argc); SWIG_fail;
5302 }
5303 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_query, 0 | 0 );
5304 if (!SWIG_IsOK(res1)) {
5305 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_query_snip" "', argument " "1"" of type '" "sen_query *""'");
5306 }
5307 arg1 = (sen_query *)(argp1);
5308 ecode2 = SWIG_AsVal_int(argv[1], &val2);
5309 if (!SWIG_IsOK(ecode2)) {
5310 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_query_snip" "', argument " "2"" of type '" "int""'");
5311 }
5312 arg2 = (int)(val2);
5313 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
5314 if (!SWIG_IsOK(ecode3)) {
5315 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_query_snip" "', argument " "3"" of type '" "unsigned int""'");
5316 }
5317 arg3 = (unsigned int)(val3);
5318 ecode4 = SWIG_AsVal_unsigned_SS_int(argv[3], &val4);
5319 if (!SWIG_IsOK(ecode4)) {
5320 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_query_snip" "', argument " "4"" of type '" "unsigned int""'");
5321 }
5322 arg4 = (unsigned int)(val4);
5323 ecode5 = SWIG_AsVal_unsigned_SS_int(argv[4], &val5);
5324 if (!SWIG_IsOK(ecode5)) {
5325 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sen_query_snip" "', argument " "5"" of type '" "unsigned int""'");
5326 }
5327 arg5 = (unsigned int)(val5);
5328 res6 = SWIG_ConvertPtr(argv[5], &argp6,SWIGTYPE_p_p_char, 0 | 0 );
5329 if (!SWIG_IsOK(res6)) {
5330 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "sen_query_snip" "', argument " "6"" of type '" "char const **""'");
5331 }
5332 arg6 = (char **)(argp6);
5333 res8 = SWIG_ConvertPtr(argv[6], &argp8,SWIGTYPE_p_p_char, 0 | 0 );
5334 if (!SWIG_IsOK(res8)) {
5335 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "sen_query_snip" "', argument " "8"" of type '" "char const **""'");
5336 }
5337 arg8 = (char **)(argp8);
5338 {
5339 arg10 = FIXNUM_P(argv[7]) ? (sen_snip_mapping *)(FIX2INT(argv[7])) : NULL;
5340 }
5341 result = (sen_snip *)sen_query_snip(arg1,arg2,arg3,arg4,arg5,(char const **)arg6,arg7,(char const **)arg8,arg9,arg10);
5342 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_snip, 0 | 0 );
5343 {
5344 VALUE ary;
5345 if (TYPE(vresult) == T_ARRAY) {
5346 ary = vresult;
5347 } else {
5348 ary = rb_ary_new2(2);
5349 rb_ary_push(ary, vresult);
5350 }
5351 rb_ary_push(ary, UINT2NUM(*arg7));
5352 free(arg7);
5353 vresult = ary;
5354 }
5355 {
5356 VALUE ary;
5357 if (TYPE(vresult) == T_ARRAY) {
5358 ary = vresult;
5359 } else {
5360 ary = rb_ary_new2(2);
5361 rb_ary_push(ary, vresult);
5362 }
5363 rb_ary_push(ary, UINT2NUM(*arg9));
5364 free(arg9);
5365 vresult = ary;
5366 }
5367 return vresult;
5368 fail:
5369 return Qnil;
5370 }
5371
5372
5373 SWIGINTERN VALUE
5374 _wrap_sen_index_del(int argc, VALUE *argv, VALUE self) {
5375 sen_index *arg1 = (sen_index *) 0 ;
5376 void *arg2 = (void *) 0 ;
5377 sen_rc result;
5378 void *argp1 = 0 ;
5379 int res1 = 0 ;
5380 VALUE vresult = Qnil;
5381
5382 if ((argc < 2) || (argc > 2)) {
5383 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5384 }
5385 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_index, 0 | 0 );
5386 if (!SWIG_IsOK(res1)) {
5387 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_index_del" "', argument " "1"" of type '" "sen_index *""'");
5388 }
5389 arg1 = (sen_index *)(argp1);
5390 {
5391 if (TYPE(argv[1]) == T_STRING) {
5392 arg2 = (void *)StringValuePtr(argv[1]);
5393 } else {
5394 SWIG_exception_fail(SWIG_TypeError, "Expected string");
5395 }
5396 }
5397 result = (sen_rc)sen_index_del(arg1,(void const *)arg2);
5398 vresult = SWIG_From_int((int)(result));
5399 return vresult;
5400 fail:
5401 return Qnil;
5402 }
5403
5404
5405 SWIGINTERN VALUE
5406 _wrap_sen_set_open(int argc, VALUE *argv, VALUE self) {
5407 unsigned int arg1 ;
5408 unsigned int arg2 ;
5409 unsigned int arg3 ;
5410 sen_set *result = 0 ;
5411 unsigned int val1 ;
5412 int ecode1 = 0 ;
5413 unsigned int val2 ;
5414 int ecode2 = 0 ;
5415 unsigned int val3 ;
5416 int ecode3 = 0 ;
5417 VALUE vresult = Qnil;
5418
5419 if ((argc < 3) || (argc > 3)) {
5420 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
5421 }
5422 ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
5423 if (!SWIG_IsOK(ecode1)) {
5424 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sen_set_open" "', argument " "1"" of type '" "unsigned int""'");
5425 }
5426 arg1 = (unsigned int)(val1);
5427 ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
5428 if (!SWIG_IsOK(ecode2)) {
5429 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_set_open" "', argument " "2"" of type '" "unsigned int""'");
5430 }
5431 arg2 = (unsigned int)(val2);
5432 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
5433 if (!SWIG_IsOK(ecode3)) {
5434 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_set_open" "', argument " "3"" of type '" "unsigned int""'");
5435 }
5436 arg3 = (unsigned int)(val3);
5437 result = (sen_set *)sen_set_open(arg1,arg2,arg3);
5438 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_set, 0 | 0 );
5439 return vresult;
5440 fail:
5441 return Qnil;
5442 }
5443
5444
5445 SWIGINTERN VALUE
5446 _wrap_sen_set_close(int argc, VALUE *argv, VALUE self) {
5447 sen_set *arg1 = (sen_set *) 0 ;
5448 sen_rc result;
5449 void *argp1 = 0 ;
5450 int res1 = 0 ;
5451 VALUE vresult = Qnil;
5452
5453 if ((argc < 1) || (argc > 1)) {
5454 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5455 }
5456 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set, 0 | 0 );
5457 if (!SWIG_IsOK(res1)) {
5458 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_close" "', argument " "1"" of type '" "sen_set *""'");
5459 }
5460 arg1 = (sen_set *)(argp1);
5461 result = (sen_rc)sen_set_close(arg1);
5462 vresult = SWIG_From_int((int)(result));
5463 return vresult;
5464 fail:
5465 return Qnil;
5466 }
5467
5468
5469 SWIGINTERN VALUE
5470 _wrap_sen_set_info(int argc, VALUE *argv, VALUE self) {
5471 sen_set *arg1 = (sen_set *) 0 ;
5472 unsigned int *arg2 = (unsigned int *) 0 ;
5473 unsigned int *arg3 = (unsigned int *) 0 ;
5474 unsigned int *arg4 = (unsigned int *) 0 ;
5475 sen_rc result;
5476 void *argp1 = 0 ;
5477 int res1 = 0 ;
5478 VALUE vresult = Qnil;
5479
5480 {
5481 arg2 = (unsigned int *)calloc(1, sizeof(unsigned int));
5482 }
5483 {
5484 arg3 = (unsigned int *)calloc(1, sizeof(unsigned int));
5485 }
5486 {
5487 arg4 = (unsigned int *)calloc(1, sizeof(unsigned int));
5488 }
5489 if ((argc < 1) || (argc > 1)) {
5490 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5491 }
5492 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set, 0 | 0 );
5493 if (!SWIG_IsOK(res1)) {
5494 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_info" "', argument " "1"" of type '" "sen_set *""'");
5495 }
5496 arg1 = (sen_set *)(argp1);
5497 result = (sen_rc)sen_set_info(arg1,arg2,arg3,arg4);
5498 vresult = SWIG_From_int((int)(result));
5499 {
5500 VALUE ary;
5501 if (TYPE(vresult) == T_ARRAY) {
5502 ary = vresult;
5503 } else {
5504 ary = rb_ary_new2(2);
5505 rb_ary_push(ary, vresult);
5506 }
5507 rb_ary_push(ary, UINT2NUM(*arg2));
5508 free(arg2);
5509 vresult = ary;
5510 }
5511 {
5512 VALUE ary;
5513 if (TYPE(vresult) == T_ARRAY) {
5514 ary = vresult;
5515 } else {
5516 ary = rb_ary_new2(2);
5517 rb_ary_push(ary, vresult);
5518 }
5519 rb_ary_push(ary, UINT2NUM(*arg3));
5520 free(arg3);
5521 vresult = ary;
5522 }
5523 {
5524 VALUE ary;
5525 if (TYPE(vresult) == T_ARRAY) {
5526 ary = vresult;
5527 } else {
5528 ary = rb_ary_new2(2);
5529 rb_ary_push(ary, vresult);
5530 }
5531 rb_ary_push(ary, UINT2NUM(*arg4));
5532 free(arg4);
5533 vresult = ary;
5534 }
5535 return vresult;
5536 fail:
5537 return Qnil;
5538 }
5539
5540
5541 SWIGINTERN VALUE
5542 _wrap_sen_set_get(int argc, VALUE *argv, VALUE self) {
5543 sen_set *arg1 = (sen_set *) 0 ;
5544 void *arg2 = (void *) 0 ;
5545 void **arg3 = (void **) 0 ;
5546 sen_set_eh *result = 0 ;
5547 void *argp1 = 0 ;
5548 int res1 = 0 ;
5549 VALUE vresult = Qnil;
5550
5551 if ((argc < 3) || (argc > 3)) {
5552 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
5553 }
5554 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set, 0 | 0 );
5555 if (!SWIG_IsOK(res1)) {
5556 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_get" "', argument " "1"" of type '" "sen_set *""'");
5557 }
5558 arg1 = (sen_set *)(argp1);
5559 {
5560 if (TYPE(argv[1]) == T_STRING) {
5561 arg2 = (void *)StringValuePtr(argv[1]);
5562 } else {
5563 SWIG_exception_fail(SWIG_TypeError, "Expected string");
5564 }
5565 }
5566 {
5567 int size = NUM2INT(argv[2]);
5568 arg3 = (size > -1) ? calloc(1, sizeof(void *)) : NULL;
5569 }
5570 result = (sen_set_eh *)sen_set_get(arg1,(void const *)arg2,arg3);
5571 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_set_eh, 0 | 0 );
5572 {
5573 VALUE ary;
5574 VALUE res;
5575 if (arg3) {
5576 int size = NUM2INT(argv[2]);
5577 res = size ? rb_str_new(*(arg3), size) : rb_str_new2(*(arg3));
5578 free(arg3);
5579 } else {
5580 res = Qnil;
5581 }
5582 if (TYPE(vresult) == T_ARRAY) {
5583 ary = vresult;
5584 } else {
5585 ary = rb_ary_new2(2);
5586 rb_ary_push(ary, vresult);
5587 }
5588 rb_ary_push(ary, res);
5589 vresult = ary;
5590 }
5591 return vresult;
5592 fail:
5593 return Qnil;
5594 }
5595
5596
5597 SWIGINTERN VALUE
5598 _wrap_sen_set_at(int argc, VALUE *argv, VALUE self) {
5599 sen_set *arg1 = (sen_set *) 0 ;
5600 void *arg2 = (void *) 0 ;
5601 void **arg3 = (void **) 0 ;
5602 sen_set_eh *result = 0 ;
5603 void *argp1 = 0 ;
5604 int res1 = 0 ;
5605 VALUE vresult = Qnil;
5606
5607 if ((argc < 3) || (argc > 3)) {
5608 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
5609 }
5610 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set, 0 | 0 );
5611 if (!SWIG_IsOK(res1)) {
5612 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_at" "', argument " "1"" of type '" "sen_set *""'");
5613 }
5614 arg1 = (sen_set *)(argp1);
5615 {
5616 if (TYPE(argv[1]) == T_STRING) {
5617 arg2 = (void *)StringValuePtr(argv[1]);
5618 } else {
5619 SWIG_exception_fail(SWIG_TypeError, "Expected string");
5620 }
5621 }
5622 {
5623 int size = NUM2INT(argv[2]);
5624 arg3 = (size > -1) ? calloc(1, sizeof(void *)) : NULL;
5625 }
5626 result = (sen_set_eh *)sen_set_at(arg1,(void const *)arg2,arg3);
5627 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_set_eh, 0 | 0 );
5628 {
5629 VALUE ary;
5630 VALUE res;
5631 if (arg3) {
5632 int size = NUM2INT(argv[2]);
5633 res = size ? rb_str_new(*(arg3), size) : rb_str_new2(*(arg3));
5634 free(arg3);
5635 } else {
5636 res = Qnil;
5637 }
5638 if (TYPE(vresult) == T_ARRAY) {
5639 ary = vresult;
5640 } else {
5641 ary = rb_ary_new2(2);
5642 rb_ary_push(ary, vresult);
5643 }
5644 rb_ary_push(ary, res);
5645 vresult = ary;
5646 }
5647 return vresult;
5648 fail:
5649 return Qnil;
5650 }
5651
5652
5653 SWIGINTERN VALUE
5654 _wrap_sen_set_del(int argc, VALUE *argv, VALUE self) {
5655 sen_set *arg1 = (sen_set *) 0 ;
5656 sen_set_eh *arg2 = (sen_set_eh *) 0 ;
5657 sen_rc result;
5658 void *argp1 = 0 ;
5659 int res1 = 0 ;
5660 void *argp2 = 0 ;
5661 int res2 = 0 ;
5662 VALUE vresult = Qnil;
5663
5664 if ((argc < 2) || (argc > 2)) {
5665 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5666 }
5667 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set, 0 | 0 );
5668 if (!SWIG_IsOK(res1)) {
5669 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_del" "', argument " "1"" of type '" "sen_set *""'");
5670 }
5671 arg1 = (sen_set *)(argp1);
5672 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_set_eh, 0 | 0 );
5673 if (!SWIG_IsOK(res2)) {
5674 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_set_del" "', argument " "2"" of type '" "sen_set_eh *""'");
5675 }
5676 arg2 = (sen_set_eh *)(argp2);
5677 result = (sen_rc)sen_set_del(arg1,arg2);
5678 vresult = SWIG_From_int((int)(result));
5679 return vresult;
5680 fail:
5681 return Qnil;
5682 }
5683
5684
5685 SWIGINTERN VALUE
5686 _wrap_sen_set_cursor_open(int argc, VALUE *argv, VALUE self) {
5687 sen_set *arg1 = (sen_set *) 0 ;
5688 sen_set_cursor *result = 0 ;
5689 void *argp1 = 0 ;
5690 int res1 = 0 ;
5691 VALUE vresult = Qnil;
5692
5693 if ((argc < 1) || (argc > 1)) {
5694 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5695 }
5696 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set, 0 | 0 );
5697 if (!SWIG_IsOK(res1)) {
5698 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_cursor_open" "', argument " "1"" of type '" "sen_set *""'");
5699 }
5700 arg1 = (sen_set *)(argp1);
5701 result = (sen_set_cursor *)sen_set_cursor_open(arg1);
5702 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_set_cursor, 0 | 0 );
5703 return vresult;
5704 fail:
5705 return Qnil;
5706 }
5707
5708
5709 SWIGINTERN VALUE
5710 _wrap_sen_set_cursor_next(int argc, VALUE *argv, VALUE self) {
5711 sen_set_cursor *arg1 = (sen_set_cursor *) 0 ;
5712 void **arg2 = (void **) 0 ;
5713 void **arg3 = (void **) 0 ;
5714 sen_set_eh *result = 0 ;
5715 void *argp1 = 0 ;
5716 int res1 = 0 ;
5717 VALUE vresult = Qnil;
5718
5719 if ((argc < 3) || (argc > 3)) {
5720 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
5721 }
5722 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set_cursor, 0 | 0 );
5723 if (!SWIG_IsOK(res1)) {
5724 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_cursor_next" "', argument " "1"" of type '" "sen_set_cursor *""'");
5725 }
5726 arg1 = (sen_set_cursor *)(argp1);
5727 {
5728 int size = NUM2INT(argv[1]);
5729 arg2 = (size > -1) ? calloc(1, sizeof(void *)) : NULL;
5730 }
5731 {
5732 int size = NUM2INT(argv[2]);
5733 arg3 = (size > -1) ? calloc(1, sizeof(void *)) : NULL;
5734 }
5735 result = (sen_set_eh *)sen_set_cursor_next(arg1,arg2,arg3);
5736 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_set_eh, 0 | 0 );
5737 {
5738 VALUE ary;
5739 VALUE res;
5740 if (arg2) {
5741 int size = NUM2INT(argv[1]);
5742 res = size ? rb_str_new(*(arg2), size) : rb_str_new2(*(arg2));
5743 free(arg2);
5744 } else {
5745 res = Qnil;
5746 }
5747 if (TYPE(vresult) == T_ARRAY) {
5748 ary = vresult;
5749 } else {
5750 ary = rb_ary_new2(2);
5751 rb_ary_push(ary, vresult);
5752 }
5753 rb_ary_push(ary, res);
5754 vresult = ary;
5755 }
5756 {
5757 VALUE ary;
5758 VALUE res;
5759 if (arg3) {
5760 int size = NUM2INT(argv[2]);
5761 res = size ? rb_str_new(*(arg3), size) : rb_str_new2(*(arg3));
5762 free(arg3);
5763 } else {
5764 res = Qnil;
5765 }
5766 if (TYPE(vresult) == T_ARRAY) {
5767 ary = vresult;
5768 } else {
5769 ary = rb_ary_new2(2);
5770 rb_ary_push(ary, vresult);
5771 }
5772 rb_ary_push(ary, res);
5773 vresult = ary;
5774 }
5775 return vresult;
5776 fail:
5777 return Qnil;
5778 }
5779
5780
5781 SWIGINTERN VALUE
5782 _wrap_sen_set_cursor_close(int argc, VALUE *argv, VALUE self) {
5783 sen_set_cursor *arg1 = (sen_set_cursor *) 0 ;
5784 sen_rc result;
5785 void *argp1 = 0 ;
5786 int res1 = 0 ;
5787 VALUE vresult = Qnil;
5788
5789 if ((argc < 1) || (argc > 1)) {
5790 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5791 }
5792 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set_cursor, 0 | 0 );
5793 if (!SWIG_IsOK(res1)) {
5794 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_cursor_close" "', argument " "1"" of type '" "sen_set_cursor *""'");
5795 }
5796 arg1 = (sen_set_cursor *)(argp1);
5797 result = (sen_rc)sen_set_cursor_close(arg1);
5798 vresult = SWIG_From_int((int)(result));
5799 return vresult;
5800 fail:
5801 return Qnil;
5802 }
5803
5804
5805 SWIGINTERN VALUE
5806 _wrap_sen_set_element_info(int argc, VALUE *argv, VALUE self) {
5807 sen_set *arg1 = (sen_set *) 0 ;
5808 sen_set_eh *arg2 = (sen_set_eh *) 0 ;
5809 void **arg3 = (void **) 0 ;
5810 void **arg4 = (void **) 0 ;
5811 sen_rc result;
5812 void *argp1 = 0 ;
5813 int res1 = 0 ;
5814 void *argp2 = 0 ;
5815 int res2 = 0 ;
5816 VALUE vresult = Qnil;
5817
5818 if ((argc < 4) || (argc > 4)) {
5819 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
5820 }
5821 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set, 0 | 0 );
5822 if (!SWIG_IsOK(res1)) {
5823 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_element_info" "', argument " "1"" of type '" "sen_set *""'");
5824 }
5825 arg1 = (sen_set *)(argp1);
5826 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_set_eh, 0 | 0 );
5827 if (!SWIG_IsOK(res2)) {
5828 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_set_element_info" "', argument " "2"" of type '" "sen_set_eh const *""'");
5829 }
5830 arg2 = (sen_set_eh *)(argp2);
5831 {
5832 int size = NUM2INT(argv[2]);
5833 arg3 = (size > -1) ? calloc(1, sizeof(void *)) : NULL;
5834 }
5835 {
5836 int size = NUM2INT(argv[3]);
5837 arg4 = (size > -1) ? calloc(1, sizeof(void *)) : NULL;
5838 }
5839 result = (sen_rc)sen_set_element_info(arg1,(sen_set_eh const *)arg2,arg3,arg4);
5840 vresult = SWIG_From_int((int)(result));
5841 {
5842 VALUE ary;
5843 VALUE res;
5844 if (arg3) {
5845 int size = NUM2INT(argv[2]);
5846 res = size ? rb_str_new(*(arg3), size) : rb_str_new2(*(arg3));
5847 free(arg3);
5848 } else {
5849 res = Qnil;
5850 }
5851 if (TYPE(vresult) == T_ARRAY) {
5852 ary = vresult;
5853 } else {
5854 ary = rb_ary_new2(2);
5855 rb_ary_push(ary, vresult);
5856 }
5857 rb_ary_push(ary, res);
5858 vresult = ary;
5859 }
5860 {
5861 VALUE ary;
5862 VALUE res;
5863 if (arg4) {
5864 int size = NUM2INT(argv[3]);
5865 res = size ? rb_str_new(*(arg4), size) : rb_str_new2(*(arg4));
5866 free(arg4);
5867 } else {
5868 res = Qnil;
5869 }
5870 if (TYPE(vresult) == T_ARRAY) {
5871 ary = vresult;
5872 } else {
5873 ary = rb_ary_new2(2);
5874 rb_ary_push(ary, vresult);
5875 }
5876 rb_ary_push(ary, res);
5877 vresult = ary;
5878 }
5879 return vresult;
5880 fail:
5881 return Qnil;
5882 }
5883
5884
5885 SWIGINTERN VALUE
5886 _wrap_sen_set_union(int argc, VALUE *argv, VALUE self) {
5887 sen_set *arg1 = (sen_set *) 0 ;
5888 sen_set *arg2 = (sen_set *) 0 ;
5889 sen_set *result = 0 ;
5890 void *argp1 = 0 ;
5891 int res1 = 0 ;
5892 void *argp2 = 0 ;
5893 int res2 = 0 ;
5894 VALUE vresult = Qnil;
5895
5896 if ((argc < 2) || (argc > 2)) {
5897 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5898 }
5899 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set, 0 | 0 );
5900 if (!SWIG_IsOK(res1)) {
5901 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_union" "', argument " "1"" of type '" "sen_set *""'");
5902 }
5903 arg1 = (sen_set *)(argp1);
5904 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_set, 0 | 0 );
5905 if (!SWIG_IsOK(res2)) {
5906 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_set_union" "', argument " "2"" of type '" "sen_set *""'");
5907 }
5908 arg2 = (sen_set *)(argp2);
5909 result = (sen_set *)sen_set_union(arg1,arg2);
5910 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_set, 0 | 0 );
5911 return vresult;
5912 fail:
5913 return Qnil;
5914 }
5915
5916
5917 SWIGINTERN VALUE
5918 _wrap_sen_set_subtract(int argc, VALUE *argv, VALUE self) {
5919 sen_set *arg1 = (sen_set *) 0 ;
5920 sen_set *arg2 = (sen_set *) 0 ;
5921 sen_set *result = 0 ;
5922 void *argp1 = 0 ;
5923 int res1 = 0 ;
5924 void *argp2 = 0 ;
5925 int res2 = 0 ;
5926 VALUE vresult = Qnil;
5927
5928 if ((argc < 2) || (argc > 2)) {
5929 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5930 }
5931 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set, 0 | 0 );
5932 if (!SWIG_IsOK(res1)) {
5933 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_subtract" "', argument " "1"" of type '" "sen_set *""'");
5934 }
5935 arg1 = (sen_set *)(argp1);
5936 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_set, 0 | 0 );
5937 if (!SWIG_IsOK(res2)) {
5938 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_set_subtract" "', argument " "2"" of type '" "sen_set *""'");
5939 }
5940 arg2 = (sen_set *)(argp2);
5941 result = (sen_set *)sen_set_subtract(arg1,arg2);
5942 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_set, 0 | 0 );
5943 return vresult;
5944 fail:
5945 return Qnil;
5946 }
5947
5948
5949 SWIGINTERN VALUE
5950 _wrap_sen_set_intersect(int argc, VALUE *argv, VALUE self) {
5951 sen_set *arg1 = (sen_set *) 0 ;
5952 sen_set *arg2 = (sen_set *) 0 ;
5953 sen_set *result = 0 ;
5954 void *argp1 = 0 ;
5955 int res1 = 0 ;
5956 void *argp2 = 0 ;
5957 int res2 = 0 ;
5958 VALUE vresult = Qnil;
5959
5960 if ((argc < 2) || (argc > 2)) {
5961 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5962 }
5963 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set, 0 | 0 );
5964 if (!SWIG_IsOK(res1)) {
5965 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_intersect" "', argument " "1"" of type '" "sen_set *""'");
5966 }
5967 arg1 = (sen_set *)(argp1);
5968 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_set, 0 | 0 );
5969 if (!SWIG_IsOK(res2)) {
5970 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_set_intersect" "', argument " "2"" of type '" "sen_set *""'");
5971 }
5972 arg2 = (sen_set *)(argp2);
5973 result = (sen_set *)sen_set_intersect(arg1,arg2);
5974 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_set, 0 | 0 );
5975 return vresult;
5976 fail:
5977 return Qnil;
5978 }
5979
5980
5981 SWIGINTERN VALUE
5982 _wrap_sen_set_difference(int argc, VALUE *argv, VALUE self) {
5983 sen_set *arg1 = (sen_set *) 0 ;
5984 sen_set *arg2 = (sen_set *) 0 ;
5985 int result;
5986 void *argp1 = 0 ;
5987 int res1 = 0 ;
5988 void *argp2 = 0 ;
5989 int res2 = 0 ;
5990 VALUE vresult = Qnil;
5991
5992 if ((argc < 2) || (argc > 2)) {
5993 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5994 }
5995 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set, 0 | 0 );
5996 if (!SWIG_IsOK(res1)) {
5997 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_difference" "', argument " "1"" of type '" "sen_set *""'");
5998 }
5999 arg1 = (sen_set *)(argp1);
6000 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_set, 0 | 0 );
6001 if (!SWIG_IsOK(res2)) {
6002 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_set_difference" "', argument " "2"" of type '" "sen_set *""'");
6003 }
6004 arg2 = (sen_set *)(argp2);
6005 result = (int)sen_set_difference(arg1,arg2);
6006 vresult = SWIG_From_int((int)(result));
6007 return vresult;
6008 fail:
6009 return Qnil;
6010 }
6011
6012
6013 SWIGINTERN VALUE
6014 _wrap_sen_set_sort(int argc, VALUE *argv, VALUE self) {
6015 sen_set *arg1 = (sen_set *) 0 ;
6016 int arg2 ;
6017 sen_set_sort_optarg *arg3 = (sen_set_sort_optarg *) 0 ;
6018 sen_set_eh *result = 0 ;
6019 void *argp1 = 0 ;
6020 int res1 = 0 ;
6021 int val2 ;
6022 int ecode2 = 0 ;
6023 VALUE vresult = Qnil;
6024
6025 if ((argc < 3) || (argc > 3)) {
6026 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
6027 }
6028 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_set, 0 | 0 );
6029 if (!SWIG_IsOK(res1)) {
6030 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_set_sort" "', argument " "1"" of type '" "sen_set *""'");
6031 }
6032 arg1 = (sen_set *)(argp1);
6033 ecode2 = SWIG_AsVal_int(argv[1], &val2);
6034 if (!SWIG_IsOK(ecode2)) {
6035 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_set_sort" "', argument " "2"" of type '" "int""'");
6036 }
6037 arg2 = (int)(val2);
6038 {
6039 struct SortOptarg *w;
6040 int res = SWIG_ConvertPtr(argv[2], (void *)&w, SWIGTYPE_p_SortOptarg, 0);
6041 if (!SWIG_IsOK(res)) {
6042 SWIG_exception_fail(SWIG_ArgError(res), "SortOptarg expected");
6043 }
6044 if (w) {
6045 arg3 = &w->optarg;
6046 w->optarg.mode = w->mode;
6047 if (CLASS_OF(w->compar) == rb_cProc) {
6048 w->optarg.compar = set_sort_handler;
6049 w->optarg.compar_arg = w;
6050 } else {
6051 w->optarg.compar = NULL;
6052 w->optarg.compar_arg = FIXNUM_P(w->compar_arg) ? (void *)(FIX2INT(w->compar_arg)) : NULL;
6053 }
6054 } else {
6055 arg3 = NULL;
6056 }
6057 }
6058 result = (sen_set_eh *)sen_set_sort(arg1,arg2,arg3);
6059 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_set_eh, 0 | 0 );
6060 return vresult;
6061 fail:
6062 return Qnil;
6063 }
6064
6065
6066 SWIGINTERN VALUE
6067 _wrap_sen_sym_create(int argc, VALUE *argv, VALUE self) {
6068 char *arg1 = (char *) 0 ;
6069 unsigned int arg2 ;
6070 unsigned int arg3 ;
6071 sen_encoding arg4 ;
6072 sen_sym *result = 0 ;
6073 int res1 ;
6074 char *buf1 = 0 ;
6075 int alloc1 = 0 ;
6076 unsigned int val2 ;
6077 int ecode2 = 0 ;
6078 unsigned int val3 ;
6079 int ecode3 = 0 ;
6080 int val4 ;
6081 int ecode4 = 0 ;
6082 VALUE vresult = Qnil;
6083
6084 if ((argc < 4) || (argc > 4)) {
6085 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
6086 }
6087 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
6088 if (!SWIG_IsOK(res1)) {
6089 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_create" "', argument " "1"" of type '" "char const *""'");
6090 }
6091 arg1 = (char *)(buf1);
6092 ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
6093 if (!SWIG_IsOK(ecode2)) {
6094 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_sym_create" "', argument " "2"" of type '" "unsigned int""'");
6095 }
6096 arg2 = (unsigned int)(val2);
6097 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
6098 if (!SWIG_IsOK(ecode3)) {
6099 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_sym_create" "', argument " "3"" of type '" "unsigned int""'");
6100 }
6101 arg3 = (unsigned int)(val3);
6102 ecode4 = SWIG_AsVal_int(argv[3], &val4);
6103 if (!SWIG_IsOK(ecode4)) {
6104 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_sym_create" "', argument " "4"" of type '" "sen_encoding""'");
6105 }
6106 arg4 = (sen_encoding)(val4);
6107 result = (sen_sym *)sen_sym_create((char const *)arg1,arg2,arg3,arg4);
6108 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_sym, 0 | 0 );
6109 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
6110 return vresult;
6111 fail:
6112 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
6113 return Qnil;
6114 }
6115
6116
6117 SWIGINTERN VALUE
6118 _wrap_sen_sym_open(int argc, VALUE *argv, VALUE self) {
6119 char *arg1 = (char *) 0 ;
6120 sen_sym *result = 0 ;
6121 int res1 ;
6122 char *buf1 = 0 ;
6123 int alloc1 = 0 ;
6124 VALUE vresult = Qnil;
6125
6126 if ((argc < 1) || (argc > 1)) {
6127 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6128 }
6129 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
6130 if (!SWIG_IsOK(res1)) {
6131 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_open" "', argument " "1"" of type '" "char const *""'");
6132 }
6133 arg1 = (char *)(buf1);
6134 result = (sen_sym *)sen_sym_open((char const *)arg1);
6135 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_sym, 0 | 0 );
6136 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
6137 return vresult;
6138 fail:
6139 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
6140 return Qnil;
6141 }
6142
6143
6144 SWIGINTERN VALUE
6145 _wrap_sen_sym_info(int argc, VALUE *argv, VALUE self) {
6146 sen_sym *arg1 = (sen_sym *) 0 ;
6147 int *arg2 = (int *) 0 ;
6148 unsigned int *arg3 = (unsigned int *) 0 ;
6149 sen_encoding *arg4 = (sen_encoding *) 0 ;
6150 unsigned int *arg5 = (unsigned int *) 0 ;
6151 unsigned int *arg6 = (unsigned int *) 0 ;
6152 sen_rc result;
6153 void *argp1 = 0 ;
6154 int res1 = 0 ;
6155 int temp2 ;
6156 int res2 = SWIG_TMPOBJ ;
6157 sen_encoding temp4 ;
6158 int res4 = SWIG_TMPOBJ ;
6159 VALUE vresult = Qnil;
6160
6161 arg2 = &temp2;
6162 {
6163 arg3 = (unsigned int *)calloc(1, sizeof(unsigned int));
6164 }
6165 arg4 = &temp4;
6166 {
6167 arg5 = (unsigned int *)calloc(1, sizeof(unsigned int));
6168 }
6169 {
6170 arg6 = (unsigned int *)calloc(1, sizeof(unsigned int));
6171 }
6172 if ((argc < 1) || (argc > 1)) {
6173 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6174 }
6175 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6176 if (!SWIG_IsOK(res1)) {
6177 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_info" "', argument " "1"" of type '" "sen_sym *""'");
6178 }
6179 arg1 = (sen_sym *)(argp1);
6180 result = (sen_rc)sen_sym_info(arg1,arg2,arg3,arg4,arg5,arg6);
6181 vresult = SWIG_From_int((int)(result));
6182 if (SWIG_IsTmpObj(res2)) {
6183 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2)));
6184 } else {
6185 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
6186 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
6187 }
6188 {
6189 VALUE ary;
6190 if (TYPE(vresult) == T_ARRAY) {
6191 ary = vresult;
6192 } else {
6193 ary = rb_ary_new2(2);
6194 rb_ary_push(ary, vresult);
6195 }
6196 rb_ary_push(ary, UINT2NUM(*arg3));
6197 free(arg3);
6198 vresult = ary;
6199 }
6200 if (SWIG_IsTmpObj(res4)) {
6201 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg4)));
6202 } else {
6203 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
6204 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_sen_encoding, new_flags));
6205 }
6206 {
6207 VALUE ary;
6208 if (TYPE(vresult) == T_ARRAY) {
6209 ary = vresult;
6210 } else {
6211 ary = rb_ary_new2(2);
6212 rb_ary_push(ary, vresult);
6213 }
6214 rb_ary_push(ary, UINT2NUM(*arg5));
6215 free(arg5);
6216 vresult = ary;
6217 }
6218 {
6219 VALUE ary;
6220 if (TYPE(vresult) == T_ARRAY) {
6221 ary = vresult;
6222 } else {
6223 ary = rb_ary_new2(2);
6224 rb_ary_push(ary, vresult);
6225 }
6226 rb_ary_push(ary, UINT2NUM(*arg6));
6227 free(arg6);
6228 vresult = ary;
6229 }
6230 return vresult;
6231 fail:
6232 return Qnil;
6233 }
6234
6235
6236 SWIGINTERN VALUE
6237 _wrap_sen_sym_close(int argc, VALUE *argv, VALUE self) {
6238 sen_sym *arg1 = (sen_sym *) 0 ;
6239 sen_rc result;
6240 void *argp1 = 0 ;
6241 int res1 = 0 ;
6242 VALUE vresult = Qnil;
6243
6244 if ((argc < 1) || (argc > 1)) {
6245 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6246 }
6247 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6248 if (!SWIG_IsOK(res1)) {
6249 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_close" "', argument " "1"" of type '" "sen_sym *""'");
6250 }
6251 arg1 = (sen_sym *)(argp1);
6252 result = (sen_rc)sen_sym_close(arg1);
6253 vresult = SWIG_From_int((int)(result));
6254 return vresult;
6255 fail:
6256 return Qnil;
6257 }
6258
6259
6260 SWIGINTERN VALUE
6261 _wrap_sen_sym_remove(int argc, VALUE *argv, VALUE self) {
6262 char *arg1 = (char *) 0 ;
6263 sen_rc result;
6264 int res1 ;
6265 char *buf1 = 0 ;
6266 int alloc1 = 0 ;
6267 VALUE vresult = Qnil;
6268
6269 if ((argc < 1) || (argc > 1)) {
6270 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6271 }
6272 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
6273 if (!SWIG_IsOK(res1)) {
6274 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_remove" "', argument " "1"" of type '" "char const *""'");
6275 }
6276 arg1 = (char *)(buf1);
6277 result = (sen_rc)sen_sym_remove((char const *)arg1);
6278 vresult = SWIG_From_int((int)(result));
6279 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
6280 return vresult;
6281 fail:
6282 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
6283 return Qnil;
6284 }
6285
6286
6287 SWIGINTERN VALUE
6288 _wrap_sen_sym_get(int argc, VALUE *argv, VALUE self) {
6289 sen_sym *arg1 = (sen_sym *) 0 ;
6290 void *arg2 = (void *) 0 ;
6291 sen_id result;
6292 void *argp1 = 0 ;
6293 int res1 = 0 ;
6294 VALUE vresult = Qnil;
6295
6296 if ((argc < 2) || (argc > 2)) {
6297 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6298 }
6299 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6300 if (!SWIG_IsOK(res1)) {
6301 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_get" "', argument " "1"" of type '" "sen_sym *""'");
6302 }
6303 arg1 = (sen_sym *)(argp1);
6304 {
6305 if (TYPE(argv[1]) == T_STRING) {
6306 arg2 = (void *)StringValuePtr(argv[1]);
6307 } else {
6308 SWIG_exception_fail(SWIG_TypeError, "Expected string");
6309 }
6310 }
6311 result = (sen_id)sen_sym_get(arg1,(void const *)arg2);
6312 vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
6313 return vresult;
6314 fail:
6315 return Qnil;
6316 }
6317
6318
6319 SWIGINTERN VALUE
6320 _wrap_sen_sym_at(int argc, VALUE *argv, VALUE self) {
6321 sen_sym *arg1 = (sen_sym *) 0 ;
6322 void *arg2 = (void *) 0 ;
6323 sen_id result;
6324 void *argp1 = 0 ;
6325 int res1 = 0 ;
6326 VALUE vresult = Qnil;
6327
6328 if ((argc < 2) || (argc > 2)) {
6329 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6330 }
6331 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6332 if (!SWIG_IsOK(res1)) {
6333 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_at" "', argument " "1"" of type '" "sen_sym *""'");
6334 }
6335 arg1 = (sen_sym *)(argp1);
6336 {
6337 if (TYPE(argv[1]) == T_STRING) {
6338 arg2 = (void *)StringValuePtr(argv[1]);
6339 } else {
6340 SWIG_exception_fail(SWIG_TypeError, "Expected string");
6341 }
6342 }
6343 result = (sen_id)sen_sym_at(arg1,(void const *)arg2);
6344 vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
6345 return vresult;
6346 fail:
6347 return Qnil;
6348 }
6349
6350
6351 SWIGINTERN VALUE
6352 _wrap_sen_sym_del(int argc, VALUE *argv, VALUE self) {
6353 sen_sym *arg1 = (sen_sym *) 0 ;
6354 void *arg2 = (void *) 0 ;
6355 sen_rc result;
6356 void *argp1 = 0 ;
6357 int res1 = 0 ;
6358 VALUE vresult = Qnil;
6359
6360 if ((argc < 2) || (argc > 2)) {
6361 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6362 }
6363 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6364 if (!SWIG_IsOK(res1)) {
6365 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_del" "', argument " "1"" of type '" "sen_sym *""'");
6366 }
6367 arg1 = (sen_sym *)(argp1);
6368 {
6369 if (TYPE(argv[1]) == T_STRING) {
6370 arg2 = (void *)StringValuePtr(argv[1]);
6371 } else {
6372 SWIG_exception_fail(SWIG_TypeError, "Expected string");
6373 }
6374 }
6375 result = (sen_rc)sen_sym_del(arg1,(void const *)arg2);
6376 vresult = SWIG_From_int((int)(result));
6377 return vresult;
6378 fail:
6379 return Qnil;
6380 }
6381
6382
6383 SWIGINTERN VALUE
6384 _wrap_sen_sym_size(int argc, VALUE *argv, VALUE self) {
6385 sen_sym *arg1 = (sen_sym *) 0 ;
6386 unsigned int result;
6387 void *argp1 = 0 ;
6388 int res1 = 0 ;
6389 VALUE vresult = Qnil;
6390
6391 if ((argc < 1) || (argc > 1)) {
6392 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6393 }
6394 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6395 if (!SWIG_IsOK(res1)) {
6396 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_size" "', argument " "1"" of type '" "sen_sym *""'");
6397 }
6398 arg1 = (sen_sym *)(argp1);
6399 result = (unsigned int)sen_sym_size(arg1);
6400 vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
6401 return vresult;
6402 fail:
6403 return Qnil;
6404 }
6405
6406
6407 SWIGINTERN VALUE
6408 _wrap_sen_sym_key(int argc, VALUE *argv, VALUE self) {
6409 sen_sym *arg1 = (sen_sym *) 0 ;
6410 sen_id arg2 ;
6411 void *arg3 = (void *) 0 ;
6412 int arg4 ;
6413 int result;
6414 void *argp1 = 0 ;
6415 int res1 = 0 ;
6416 unsigned int val2 ;
6417 int ecode2 = 0 ;
6418 VALUE vresult = Qnil;
6419
6420 if ((argc < 3) || (argc > 3)) {
6421 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
6422 }
6423 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6424 if (!SWIG_IsOK(res1)) {
6425 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_key" "', argument " "1"" of type '" "sen_sym *""'");
6426 }
6427 arg1 = (sen_sym *)(argp1);
6428 ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
6429 if (!SWIG_IsOK(ecode2)) {
6430 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_sym_key" "', argument " "2"" of type '" "sen_id""'");
6431 }
6432 arg2 = (sen_id)(val2);
6433 {
6434 int size = NUM2INT(argv[2]);
6435 arg3 = (size) ? calloc(size, 1) : NULL;
6436 arg4 = size;
6437 }
6438 result = (int)sen_sym_key(arg1,arg2,arg3,arg4);
6439 vresult = SWIG_From_int((int)(result));
6440 {
6441 VALUE ary;
6442 if (TYPE(vresult) == T_ARRAY) {
6443 ary = vresult;
6444 } else {
6445 ary = rb_ary_new2(2);
6446 rb_ary_push(ary, vresult);
6447 }
6448 if (arg3) {
6449 rb_ary_push(ary, rb_str_new2(arg3));
6450 free(arg3);
6451 } else {
6452 rb_ary_push(ary, Qnil);
6453 }
6454 vresult = ary;
6455 }
6456 return vresult;
6457 fail:
6458 return Qnil;
6459 }
6460
6461
6462 SWIGINTERN VALUE
6463 _wrap_sen_sym_prefix_search(int argc, VALUE *argv, VALUE self) {
6464 sen_sym *arg1 = (sen_sym *) 0 ;
6465 void *arg2 = (void *) 0 ;
6466 sen_set *result = 0 ;
6467 void *argp1 = 0 ;
6468 int res1 = 0 ;
6469 VALUE vresult = Qnil;
6470
6471 if ((argc < 2) || (argc > 2)) {
6472 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6473 }
6474 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6475 if (!SWIG_IsOK(res1)) {
6476 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_prefix_search" "', argument " "1"" of type '" "sen_sym *""'");
6477 }
6478 arg1 = (sen_sym *)(argp1);
6479 {
6480 if (TYPE(argv[1]) == T_STRING) {
6481 arg2 = (void *)StringValuePtr(argv[1]);
6482 } else {
6483 SWIG_exception_fail(SWIG_TypeError, "Expected string");
6484 }
6485 }
6486 result = (sen_set *)sen_sym_prefix_search(arg1,(void const *)arg2);
6487 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_set, 0 | 0 );
6488 return vresult;
6489 fail:
6490 return Qnil;
6491 }
6492
6493
6494 SWIGINTERN VALUE
6495 _wrap_sen_sym_suffix_search(int argc, VALUE *argv, VALUE self) {
6496 sen_sym *arg1 = (sen_sym *) 0 ;
6497 void *arg2 = (void *) 0 ;
6498 sen_set *result = 0 ;
6499 void *argp1 = 0 ;
6500 int res1 = 0 ;
6501 VALUE vresult = Qnil;
6502
6503 if ((argc < 2) || (argc > 2)) {
6504 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6505 }
6506 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6507 if (!SWIG_IsOK(res1)) {
6508 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_suffix_search" "', argument " "1"" of type '" "sen_sym *""'");
6509 }
6510 arg1 = (sen_sym *)(argp1);
6511 {
6512 if (TYPE(argv[1]) == T_STRING) {
6513 arg2 = (void *)StringValuePtr(argv[1]);
6514 } else {
6515 SWIG_exception_fail(SWIG_TypeError, "Expected string");
6516 }
6517 }
6518 result = (sen_set *)sen_sym_suffix_search(arg1,(void const *)arg2);
6519 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_set, 0 | 0 );
6520 return vresult;
6521 fail:
6522 return Qnil;
6523 }
6524
6525
6526 SWIGINTERN VALUE
6527 _wrap_sen_sym_common_prefix_search(int argc, VALUE *argv, VALUE self) {
6528 sen_sym *arg1 = (sen_sym *) 0 ;
6529 void *arg2 = (void *) 0 ;
6530 sen_id result;
6531 void *argp1 = 0 ;
6532 int res1 = 0 ;
6533 VALUE vresult = Qnil;
6534
6535 if ((argc < 2) || (argc > 2)) {
6536 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6537 }
6538 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6539 if (!SWIG_IsOK(res1)) {
6540 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_common_prefix_search" "', argument " "1"" of type '" "sen_sym *""'");
6541 }
6542 arg1 = (sen_sym *)(argp1);
6543 {
6544 if (TYPE(argv[1]) == T_STRING) {
6545 arg2 = (void *)StringValuePtr(argv[1]);
6546 } else {
6547 SWIG_exception_fail(SWIG_TypeError, "Expected string");
6548 }
6549 }
6550 result = (sen_id)sen_sym_common_prefix_search(arg1,(void const *)arg2);
6551 vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
6552 return vresult;
6553 fail:
6554 return Qnil;
6555 }
6556
6557
6558 SWIGINTERN VALUE
6559 _wrap_sen_sym_pocket_get(int argc, VALUE *argv, VALUE self) {
6560 sen_sym *arg1 = (sen_sym *) 0 ;
6561 sen_id arg2 ;
6562 int result;
6563 void *argp1 = 0 ;
6564 int res1 = 0 ;
6565 unsigned int val2 ;
6566 int ecode2 = 0 ;
6567 VALUE vresult = Qnil;
6568
6569 if ((argc < 2) || (argc > 2)) {
6570 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6571 }
6572 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6573 if (!SWIG_IsOK(res1)) {
6574 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_pocket_get" "', argument " "1"" of type '" "sen_sym *""'");
6575 }
6576 arg1 = (sen_sym *)(argp1);
6577 ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
6578 if (!SWIG_IsOK(ecode2)) {
6579 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_sym_pocket_get" "', argument " "2"" of type '" "sen_id""'");
6580 }
6581 arg2 = (sen_id)(val2);
6582 result = (int)sen_sym_pocket_get(arg1,arg2);
6583 vresult = SWIG_From_int((int)(result));
6584 return vresult;
6585 fail:
6586 return Qnil;
6587 }
6588
6589
6590 SWIGINTERN VALUE
6591 _wrap_sen_sym_pocket_set(int argc, VALUE *argv, VALUE self) {
6592 sen_sym *arg1 = (sen_sym *) 0 ;
6593 sen_id arg2 ;
6594 unsigned int arg3 ;
6595 sen_rc result;
6596 void *argp1 = 0 ;
6597 int res1 = 0 ;
6598 unsigned int val2 ;
6599 int ecode2 = 0 ;
6600 unsigned int val3 ;
6601 int ecode3 = 0 ;
6602 VALUE vresult = Qnil;
6603
6604 if ((argc < 3) || (argc > 3)) {
6605 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
6606 }
6607 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6608 if (!SWIG_IsOK(res1)) {
6609 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_pocket_set" "', argument " "1"" of type '" "sen_sym *""'");
6610 }
6611 arg1 = (sen_sym *)(argp1);
6612 ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
6613 if (!SWIG_IsOK(ecode2)) {
6614 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_sym_pocket_set" "', argument " "2"" of type '" "sen_id""'");
6615 }
6616 arg2 = (sen_id)(val2);
6617 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
6618 if (!SWIG_IsOK(ecode3)) {
6619 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_sym_pocket_set" "', argument " "3"" of type '" "unsigned int""'");
6620 }
6621 arg3 = (unsigned int)(val3);
6622 result = (sen_rc)sen_sym_pocket_set(arg1,arg2,arg3);
6623 vresult = SWIG_From_int((int)(result));
6624 return vresult;
6625 fail:
6626 return Qnil;
6627 }
6628
6629
6630 SWIGINTERN VALUE
6631 _wrap_sen_sym_next(int argc, VALUE *argv, VALUE self) {
6632 sen_sym *arg1 = (sen_sym *) 0 ;
6633 sen_id arg2 ;
6634 sen_id result;
6635 void *argp1 = 0 ;
6636 int res1 = 0 ;
6637 unsigned int val2 ;
6638 int ecode2 = 0 ;
6639 VALUE vresult = Qnil;
6640
6641 if ((argc < 2) || (argc > 2)) {
6642 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6643 }
6644 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_sym, 0 | 0 );
6645 if (!SWIG_IsOK(res1)) {
6646 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_sym_next" "', argument " "1"" of type '" "sen_sym *""'");
6647 }
6648 arg1 = (sen_sym *)(argp1);
6649 ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
6650 if (!SWIG_IsOK(ecode2)) {
6651 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_sym_next" "', argument " "2"" of type '" "sen_id""'");
6652 }
6653 arg2 = (sen_id)(val2);
6654 result = (sen_id)sen_sym_next(arg1,arg2);
6655 vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
6656 return vresult;
6657 fail:
6658 return Qnil;
6659 }
6660
6661
6662 SWIGINTERN VALUE
6663 _wrap_sen_snip_open(int argc, VALUE *argv, VALUE self) {
6664 sen_encoding arg1 ;
6665 int arg2 ;
6666 unsigned int arg3 ;
6667 unsigned int arg4 ;
6668 char *arg5 = (char *) 0 ;
6669 unsigned int arg6 ;
6670 char *arg7 = (char *) 0 ;
6671 unsigned int arg8 ;
6672 sen_snip_mapping *arg9 = (sen_snip_mapping *) 0 ;
6673 sen_snip *result = 0 ;
6674 int val1 ;
6675 int ecode1 = 0 ;
6676 int val2 ;
6677 int ecode2 = 0 ;
6678 unsigned int val3 ;
6679 int ecode3 = 0 ;
6680 unsigned int val4 ;
6681 int ecode4 = 0 ;
6682 int res5 ;
6683 char *buf5 = 0 ;
6684 int alloc5 = 0 ;
6685 unsigned int val6 ;
6686 int ecode6 = 0 ;
6687 int res7 ;
6688 char *buf7 = 0 ;
6689 int alloc7 = 0 ;
6690 unsigned int val8 ;
6691 int ecode8 = 0 ;
6692 VALUE vresult = Qnil;
6693
6694 if ((argc < 9) || (argc > 9)) {
6695 rb_raise(rb_eArgError, "wrong # of arguments(%d for 9)",argc); SWIG_fail;
6696 }
6697 ecode1 = SWIG_AsVal_int(argv[0], &val1);
6698 if (!SWIG_IsOK(ecode1)) {
6699 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sen_snip_open" "', argument " "1"" of type '" "sen_encoding""'");
6700 }
6701 arg1 = (sen_encoding)(val1);
6702 ecode2 = SWIG_AsVal_int(argv[1], &val2);
6703 if (!SWIG_IsOK(ecode2)) {
6704 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_snip_open" "', argument " "2"" of type '" "int""'");
6705 }
6706 arg2 = (int)(val2);
6707 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
6708 if (!SWIG_IsOK(ecode3)) {
6709 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_snip_open" "', argument " "3"" of type '" "unsigned int""'");
6710 }
6711 arg3 = (unsigned int)(val3);
6712 ecode4 = SWIG_AsVal_unsigned_SS_int(argv[3], &val4);
6713 if (!SWIG_IsOK(ecode4)) {
6714 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_snip_open" "', argument " "4"" of type '" "unsigned int""'");
6715 }
6716 arg4 = (unsigned int)(val4);
6717 res5 = SWIG_AsCharPtrAndSize(argv[4], &buf5, NULL, &alloc5);
6718 if (!SWIG_IsOK(res5)) {
6719 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sen_snip_open" "', argument " "5"" of type '" "char const *""'");
6720 }
6721 arg5 = (char *)(buf5);
6722 ecode6 = SWIG_AsVal_unsigned_SS_int(argv[5], &val6);
6723 if (!SWIG_IsOK(ecode6)) {
6724 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "sen_snip_open" "', argument " "6"" of type '" "unsigned int""'");
6725 }
6726 arg6 = (unsigned int)(val6);
6727 res7 = SWIG_AsCharPtrAndSize(argv[6], &buf7, NULL, &alloc7);
6728 if (!SWIG_IsOK(res7)) {
6729 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "sen_snip_open" "', argument " "7"" of type '" "char const *""'");
6730 }
6731 arg7 = (char *)(buf7);
6732 ecode8 = SWIG_AsVal_unsigned_SS_int(argv[7], &val8);
6733 if (!SWIG_IsOK(ecode8)) {
6734 SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "sen_snip_open" "', argument " "8"" of type '" "unsigned int""'");
6735 }
6736 arg8 = (unsigned int)(val8);
6737 {
6738 arg9 = FIXNUM_P(argv[8]) ? (sen_snip_mapping *)(FIX2INT(argv[8])) : NULL;
6739 }
6740 result = (sen_snip *)sen_snip_open(arg1,arg2,arg3,arg4,(char const *)arg5,arg6,(char const *)arg7,arg8,arg9);
6741 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_snip, 0 | 0 );
6742 if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
6743 if (alloc7 == SWIG_NEWOBJ) free((char*)buf7);
6744 return vresult;
6745 fail:
6746 if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
6747 if (alloc7 == SWIG_NEWOBJ) free((char*)buf7);
6748 return Qnil;
6749 }
6750
6751
6752 SWIGINTERN VALUE
6753 _wrap_sen_snip_close(int argc, VALUE *argv, VALUE self) {
6754 sen_snip *arg1 = (sen_snip *) 0 ;
6755 sen_rc result;
6756 void *argp1 = 0 ;
6757 int res1 = 0 ;
6758 VALUE vresult = Qnil;
6759
6760 if ((argc < 1) || (argc > 1)) {
6761 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6762 }
6763 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_snip, 0 | 0 );
6764 if (!SWIG_IsOK(res1)) {
6765 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_snip_close" "', argument " "1"" of type '" "sen_snip *""'");
6766 }
6767 arg1 = (sen_snip *)(argp1);
6768 result = (sen_rc)sen_snip_close(arg1);
6769 vresult = SWIG_From_int((int)(result));
6770 return vresult;
6771 fail:
6772 return Qnil;
6773 }
6774
6775
6776 SWIGINTERN VALUE
6777 _wrap_sen_snip_add_cond(int argc, VALUE *argv, VALUE self) {
6778 sen_snip *arg1 = (sen_snip *) 0 ;
6779 char *arg2 = (char *) 0 ;
6780 unsigned int arg3 ;
6781 char *arg4 = (char *) 0 ;
6782 unsigned int arg5 ;
6783 char *arg6 = (char *) 0 ;
6784 unsigned int arg7 ;
6785 sen_rc result;
6786 void *argp1 = 0 ;
6787 int res1 = 0 ;
6788 int res2 ;
6789 char *buf2 = 0 ;
6790 int alloc2 = 0 ;
6791 unsigned int val3 ;
6792 int ecode3 = 0 ;
6793 int res4 ;
6794 char *buf4 = 0 ;
6795 int alloc4 = 0 ;
6796 unsigned int val5 ;
6797 int ecode5 = 0 ;
6798 int res6 ;
6799 char *buf6 = 0 ;
6800 int alloc6 = 0 ;
6801 unsigned int val7 ;
6802 int ecode7 = 0 ;
6803 VALUE vresult = Qnil;
6804
6805 if ((argc < 7) || (argc > 7)) {
6806 rb_raise(rb_eArgError, "wrong # of arguments(%d for 7)",argc); SWIG_fail;
6807 }
6808 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_snip, 0 | 0 );
6809 if (!SWIG_IsOK(res1)) {
6810 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_snip_add_cond" "', argument " "1"" of type '" "sen_snip *""'");
6811 }
6812 arg1 = (sen_snip *)(argp1);
6813 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
6814 if (!SWIG_IsOK(res2)) {
6815 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_snip_add_cond" "', argument " "2"" of type '" "char const *""'");
6816 }
6817 arg2 = (char *)(buf2);
6818 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
6819 if (!SWIG_IsOK(ecode3)) {
6820 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_snip_add_cond" "', argument " "3"" of type '" "unsigned int""'");
6821 }
6822 arg3 = (unsigned int)(val3);
6823 res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
6824 if (!SWIG_IsOK(res4)) {
6825 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sen_snip_add_cond" "', argument " "4"" of type '" "char const *""'");
6826 }
6827 arg4 = (char *)(buf4);
6828 ecode5 = SWIG_AsVal_unsigned_SS_int(argv[4], &val5);
6829 if (!SWIG_IsOK(ecode5)) {
6830 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sen_snip_add_cond" "', argument " "5"" of type '" "unsigned int""'");
6831 }
6832 arg5 = (unsigned int)(val5);
6833 res6 = SWIG_AsCharPtrAndSize(argv[5], &buf6, NULL, &alloc6);
6834 if (!SWIG_IsOK(res6)) {
6835 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "sen_snip_add_cond" "', argument " "6"" of type '" "char const *""'");
6836 }
6837 arg6 = (char *)(buf6);
6838 ecode7 = SWIG_AsVal_unsigned_SS_int(argv[6], &val7);
6839 if (!SWIG_IsOK(ecode7)) {
6840 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "sen_snip_add_cond" "', argument " "7"" of type '" "unsigned int""'");
6841 }
6842 arg7 = (unsigned int)(val7);
6843 result = (sen_rc)sen_snip_add_cond(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5,(char const *)arg6,arg7);
6844 vresult = SWIG_From_int((int)(result));
6845 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6846 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
6847 if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
6848 return vresult;
6849 fail:
6850 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6851 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
6852 if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
6853 return Qnil;
6854 }
6855
6856
6857 SWIGINTERN VALUE
6858 _wrap_sen_snip_exec(int argc, VALUE *argv, VALUE self) {
6859 sen_snip *arg1 = (sen_snip *) 0 ;
6860 char *arg2 = (char *) 0 ;
6861 unsigned int arg3 ;
6862 unsigned int *arg4 = (unsigned int *) 0 ;
6863 unsigned int *arg5 = (unsigned int *) 0 ;
6864 sen_rc result;
6865 void *argp1 = 0 ;
6866 int res1 = 0 ;
6867 int res2 ;
6868 char *buf2 = 0 ;
6869 int alloc2 = 0 ;
6870 unsigned int val3 ;
6871 int ecode3 = 0 ;
6872 VALUE vresult = Qnil;
6873
6874 {
6875 arg4 = (unsigned int *)calloc(1, sizeof(unsigned int));
6876 }
6877 {
6878 arg5 = (unsigned int *)calloc(1, sizeof(unsigned int));
6879 }
6880 if ((argc < 3) || (argc > 3)) {
6881 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
6882 }
6883 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_snip, 0 | 0 );
6884 if (!SWIG_IsOK(res1)) {
6885 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_snip_exec" "', argument " "1"" of type '" "sen_snip *""'");
6886 }
6887 arg1 = (sen_snip *)(argp1);
6888 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
6889 if (!SWIG_IsOK(res2)) {
6890 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_snip_exec" "', argument " "2"" of type '" "char const *""'");
6891 }
6892 arg2 = (char *)(buf2);
6893 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
6894 if (!SWIG_IsOK(ecode3)) {
6895 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_snip_exec" "', argument " "3"" of type '" "unsigned int""'");
6896 }
6897 arg3 = (unsigned int)(val3);
6898 result = (sen_rc)sen_snip_exec(arg1,(char const *)arg2,arg3,arg4,arg5);
6899 vresult = SWIG_From_int((int)(result));
6900 {
6901 VALUE ary;
6902 if (TYPE(vresult) == T_ARRAY) {
6903 ary = vresult;
6904 } else {
6905 ary = rb_ary_new2(2);
6906 rb_ary_push(ary, vresult);
6907 }
6908 rb_ary_push(ary, UINT2NUM(*arg4));
6909 free(arg4);
6910 vresult = ary;
6911 }
6912 {
6913 VALUE ary;
6914 if (TYPE(vresult) == T_ARRAY) {
6915 ary = vresult;
6916 } else {
6917 ary = rb_ary_new2(2);
6918 rb_ary_push(ary, vresult);
6919 }
6920 rb_ary_push(ary, UINT2NUM(*arg5));
6921 free(arg5);
6922 vresult = ary;
6923 }
6924 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6925 return vresult;
6926 fail:
6927 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6928 return Qnil;
6929 }
6930
6931
6932 SWIGINTERN VALUE
6933 _wrap_sen_snip_get_result(int argc, VALUE *argv, VALUE self) {
6934 sen_snip *arg1 = (sen_snip *) 0 ;
6935 unsigned int arg2 ;
6936 char *arg3 = (char *) 0 ;
6937 unsigned int *arg4 = (unsigned int *) 0 ;
6938 sen_rc result;
6939 void *argp1 = 0 ;
6940 int res1 = 0 ;
6941 unsigned int val2 ;
6942 int ecode2 = 0 ;
6943 VALUE vresult = Qnil;
6944
6945 {
6946 arg4 = (unsigned int *)calloc(1, sizeof(unsigned int));
6947 }
6948 if ((argc < 3) || (argc > 3)) {
6949 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
6950 }
6951 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_snip, 0 | 0 );
6952 if (!SWIG_IsOK(res1)) {
6953 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_snip_get_result" "', argument " "1"" of type '" "sen_snip *""'");
6954 }
6955 arg1 = (sen_snip *)(argp1);
6956 ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
6957 if (!SWIG_IsOK(ecode2)) {
6958 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_snip_get_result" "', argument " "2"" of type '" "unsigned int""'");
6959 }
6960 arg2 = (unsigned int)(val2);
6961 {
6962 int size = NUM2INT(argv[2]);
6963 arg3 = (size) ? calloc(size, 1) : NULL;
6964 }
6965 result = (sen_rc)sen_snip_get_result(arg1,arg2,arg3,arg4);
6966 vresult = SWIG_From_int((int)(result));
6967 {
6968 VALUE ary;
6969 if (TYPE(vresult) == T_ARRAY) {
6970 ary = vresult;
6971 } else {
6972 ary = rb_ary_new2(2);
6973 rb_ary_push(ary, vresult);
6974 }
6975 if (arg3) {
6976 rb_ary_push(ary, rb_str_new2(arg3));
6977 free(arg3);
6978 } else {
6979 rb_ary_push(ary, Qnil);
6980 }
6981 vresult = ary;
6982 }
6983 {
6984 VALUE ary;
6985 if (TYPE(vresult) == T_ARRAY) {
6986 ary = vresult;
6987 } else {
6988 ary = rb_ary_new2(2);
6989 rb_ary_push(ary, vresult);
6990 }
6991 rb_ary_push(ary, UINT2NUM(*arg4));
6992 free(arg4);
6993 vresult = ary;
6994 }
6995 return vresult;
6996 fail:
6997 return Qnil;
6998 }
6999
7000
7001 SWIGINTERN VALUE
7002 _wrap_sen_records_heap_open(int argc, VALUE *argv, VALUE self) {
7003 int arg1 ;
7004 int arg2 ;
7005 sen_sort_optarg *arg3 = (sen_sort_optarg *) 0 ;
7006 sen_records_heap *result = 0 ;
7007 int val1 ;
7008 int ecode1 = 0 ;
7009 int val2 ;
7010 int ecode2 = 0 ;
7011 VALUE vresult = Qnil;
7012
7013 if ((argc < 3) || (argc > 3)) {
7014 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
7015 }
7016 ecode1 = SWIG_AsVal_int(argv[0], &val1);
7017 if (!SWIG_IsOK(ecode1)) {
7018 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sen_records_heap_open" "', argument " "1"" of type '" "int""'");
7019 }
7020 arg1 = (int)(val1);
7021 ecode2 = SWIG_AsVal_int(argv[1], &val2);
7022 if (!SWIG_IsOK(ecode2)) {
7023 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_records_heap_open" "', argument " "2"" of type '" "int""'");
7024 }
7025 arg2 = (int)(val2);
7026 {
7027 struct SortOptarg *w;
7028 int res = SWIG_ConvertPtr(argv[2], (void *)&w, SWIGTYPE_p_SortOptarg, 0);
7029 if (!SWIG_IsOK(res)) {
7030 SWIG_exception_fail(SWIG_ArgError(res), "SortOptarg expected");
7031 }
7032 if (w) {
7033 arg3 = &w->optarg;
7034 w->optarg.mode = w->mode;
7035 if (CLASS_OF(w->compar) == rb_cProc) {
7036 w->optarg.compar = sort_handler;
7037 w->optarg.compar_arg = w;
7038 } else {
7039 w->optarg.compar = NULL;
7040 w->optarg.compar_arg = FIXNUM_P(w->compar_arg) ? (void *)(FIX2INT(w->compar_arg)) : NULL;
7041 }
7042 } else {
7043 arg3 = NULL;
7044 }
7045 }
7046 result = (sen_records_heap *)sen_records_heap_open(arg1,arg2,arg3);
7047 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_records_heap, 0 | 0 );
7048 return vresult;
7049 fail:
7050 return Qnil;
7051 }
7052
7053
7054 SWIGINTERN VALUE
7055 _wrap_sen_records_heap_add(int argc, VALUE *argv, VALUE self) {
7056 sen_records_heap *arg1 = (sen_records_heap *) 0 ;
7057 sen_records *arg2 = (sen_records *) 0 ;
7058 sen_rc result;
7059 void *argp1 = 0 ;
7060 int res1 = 0 ;
7061 void *argp2 = 0 ;
7062 int res2 = 0 ;
7063 VALUE vresult = Qnil;
7064
7065 if ((argc < 2) || (argc > 2)) {
7066 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7067 }
7068 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records_heap, 0 | 0 );
7069 if (!SWIG_IsOK(res1)) {
7070 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_heap_add" "', argument " "1"" of type '" "sen_records_heap *""'");
7071 }
7072 arg1 = (sen_records_heap *)(argp1);
7073 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sen_records, 0 | 0 );
7074 if (!SWIG_IsOK(res2)) {
7075 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_records_heap_add" "', argument " "2"" of type '" "sen_records *""'");
7076 }
7077 arg2 = (sen_records *)(argp2);
7078 result = (sen_rc)sen_records_heap_add(arg1,arg2);
7079 vresult = SWIG_From_int((int)(result));
7080 return vresult;
7081 fail:
7082 return Qnil;
7083 }
7084
7085
7086 SWIGINTERN VALUE
7087 _wrap_sen_records_heap_next(int argc, VALUE *argv, VALUE self) {
7088 sen_records_heap *arg1 = (sen_records_heap *) 0 ;
7089 int result;
7090 void *argp1 = 0 ;
7091 int res1 = 0 ;
7092 VALUE vresult = Qnil;
7093
7094 if ((argc < 1) || (argc > 1)) {
7095 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7096 }
7097 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records_heap, 0 | 0 );
7098 if (!SWIG_IsOK(res1)) {
7099 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_heap_next" "', argument " "1"" of type '" "sen_records_heap *""'");
7100 }
7101 arg1 = (sen_records_heap *)(argp1);
7102 result = (int)sen_records_heap_next(arg1);
7103 vresult = SWIG_From_int((int)(result));
7104 return vresult;
7105 fail:
7106 return Qnil;
7107 }
7108
7109
7110 SWIGINTERN VALUE
7111 _wrap_sen_records_heap_head(int argc, VALUE *argv, VALUE self) {
7112 sen_records_heap *arg1 = (sen_records_heap *) 0 ;
7113 sen_records *result = 0 ;
7114 void *argp1 = 0 ;
7115 int res1 = 0 ;
7116 VALUE vresult = Qnil;
7117
7118 if ((argc < 1) || (argc > 1)) {
7119 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7120 }
7121 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records_heap, 0 | 0 );
7122 if (!SWIG_IsOK(res1)) {
7123 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_heap_head" "', argument " "1"" of type '" "sen_records_heap *""'");
7124 }
7125 arg1 = (sen_records_heap *)(argp1);
7126 result = (sen_records *)sen_records_heap_head(arg1);
7127 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_records, 0 | 0 );
7128 return vresult;
7129 fail:
7130 return Qnil;
7131 }
7132
7133
7134 SWIGINTERN VALUE
7135 _wrap_sen_records_heap_close(int argc, VALUE *argv, VALUE self) {
7136 sen_records_heap *arg1 = (sen_records_heap *) 0 ;
7137 sen_rc result;
7138 void *argp1 = 0 ;
7139 int res1 = 0 ;
7140 VALUE vresult = Qnil;
7141
7142 if ((argc < 1) || (argc > 1)) {
7143 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7144 }
7145 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_records_heap, 0 | 0 );
7146 if (!SWIG_IsOK(res1)) {
7147 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_records_heap_close" "', argument " "1"" of type '" "sen_records_heap *""'");
7148 }
7149 arg1 = (sen_records_heap *)(argp1);
7150 result = (sen_rc)sen_records_heap_close(arg1);
7151 vresult = SWIG_From_int((int)(result));
7152 return vresult;
7153 fail:
7154 return Qnil;
7155 }
7156
7157
7158 SWIGINTERN VALUE
7159 _wrap_sen_inv_entry_info(int argc, VALUE *argv, VALUE self) {
7160 sen_inv *arg1 = (sen_inv *) 0 ;
7161 sen_id arg2 ;
7162 unsigned int *arg3 = (unsigned int *) 0 ;
7163 unsigned int *arg4 = (unsigned int *) 0 ;
7164 unsigned int *arg5 = (unsigned int *) 0 ;
7165 unsigned int *arg6 = (unsigned int *) 0 ;
7166 unsigned int *arg7 = (unsigned int *) 0 ;
7167 unsigned int *arg8 = (unsigned int *) 0 ;
7168 unsigned int *arg9 = (unsigned int *) 0 ;
7169 unsigned int *arg10 = (unsigned int *) 0 ;
7170 unsigned int *arg11 = (unsigned int *) 0 ;
7171 unsigned int *arg12 = (unsigned int *) 0 ;
7172 unsigned int *arg13 = (unsigned int *) 0 ;
7173 unsigned int *arg14 = (unsigned int *) 0 ;
7174 int result;
7175 void *argp1 = 0 ;
7176 int res1 = 0 ;
7177 unsigned int val2 ;
7178 int ecode2 = 0 ;
7179 VALUE vresult = Qnil;
7180
7181 {
7182 arg3 = (unsigned int *)calloc(1, sizeof(unsigned int));
7183 }
7184 {
7185 arg4 = (unsigned int *)calloc(1, sizeof(unsigned int));
7186 }
7187 {
7188 arg5 = (unsigned int *)calloc(1, sizeof(unsigned int));
7189 }
7190 {
7191 arg6 = (unsigned int *)calloc(1, sizeof(unsigned int));
7192 }
7193 {
7194 arg7 = (unsigned int *)calloc(1, sizeof(unsigned int));
7195 }
7196 {
7197 arg8 = (unsigned int *)calloc(1, sizeof(unsigned int));
7198 }
7199 {
7200 arg9 = (unsigned int *)calloc(1, sizeof(unsigned int));
7201 }
7202 {
7203 arg10 = (unsigned int *)calloc(1, sizeof(unsigned int));
7204 }
7205 {
7206 arg11 = (unsigned int *)calloc(1, sizeof(unsigned int));
7207 }
7208 {
7209 arg12 = (unsigned int *)calloc(1, sizeof(unsigned int));
7210 }
7211 {
7212 arg13 = (unsigned int *)calloc(1, sizeof(unsigned int));
7213 }
7214 {
7215 arg14 = (unsigned int *)calloc(1, sizeof(unsigned int));
7216 }
7217 if ((argc < 2) || (argc > 2)) {
7218 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7219 }
7220 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_inv, 0 | 0 );
7221 if (!SWIG_IsOK(res1)) {
7222 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_inv_entry_info" "', argument " "1"" of type '" "sen_inv *""'");
7223 }
7224 arg1 = (sen_inv *)(argp1);
7225 ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
7226 if (!SWIG_IsOK(ecode2)) {
7227 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_inv_entry_info" "', argument " "2"" of type '" "sen_id""'");
7228 }
7229 arg2 = (sen_id)(val2);
7230 result = (int)sen_inv_entry_info(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
7231 vresult = SWIG_From_int((int)(result));
7232 {
7233 VALUE ary;
7234 if (TYPE(vresult) == T_ARRAY) {
7235 ary = vresult;
7236 } else {
7237 ary = rb_ary_new2(2);
7238 rb_ary_push(ary, vresult);
7239 }
7240 rb_ary_push(ary, UINT2NUM(*arg3));
7241 free(arg3);
7242 vresult = ary;
7243 }
7244 {
7245 VALUE ary;
7246 if (TYPE(vresult) == T_ARRAY) {
7247 ary = vresult;
7248 } else {
7249 ary = rb_ary_new2(2);
7250 rb_ary_push(ary, vresult);
7251 }
7252 rb_ary_push(ary, UINT2NUM(*arg4));
7253 free(arg4);
7254 vresult = ary;
7255 }
7256 {
7257 VALUE ary;
7258 if (TYPE(vresult) == T_ARRAY) {
7259 ary = vresult;
7260 } else {
7261 ary = rb_ary_new2(2);
7262 rb_ary_push(ary, vresult);
7263 }
7264 rb_ary_push(ary, UINT2NUM(*arg5));
7265 free(arg5);
7266 vresult = ary;
7267 }
7268 {
7269 VALUE ary;
7270 if (TYPE(vresult) == T_ARRAY) {
7271 ary = vresult;
7272 } else {
7273 ary = rb_ary_new2(2);
7274 rb_ary_push(ary, vresult);
7275 }
7276 rb_ary_push(ary, UINT2NUM(*arg6));
7277 free(arg6);
7278 vresult = ary;
7279 }
7280 {
7281 VALUE ary;
7282 if (TYPE(vresult) == T_ARRAY) {
7283 ary = vresult;
7284 } else {
7285 ary = rb_ary_new2(2);
7286 rb_ary_push(ary, vresult);
7287 }
7288 rb_ary_push(ary, UINT2NUM(*arg7));
7289 free(arg7);
7290 vresult = ary;
7291 }
7292 {
7293 VALUE ary;
7294 if (TYPE(vresult) == T_ARRAY) {
7295 ary = vresult;
7296 } else {
7297 ary = rb_ary_new2(2);
7298 rb_ary_push(ary, vresult);
7299 }
7300 rb_ary_push(ary, UINT2NUM(*arg8));
7301 free(arg8);
7302 vresult = ary;
7303 }
7304 {
7305 VALUE ary;
7306 if (TYPE(vresult) == T_ARRAY) {
7307 ary = vresult;
7308 } else {
7309 ary = rb_ary_new2(2);
7310 rb_ary_push(ary, vresult);
7311 }
7312 rb_ary_push(ary, UINT2NUM(*arg9));
7313 free(arg9);
7314 vresult = ary;
7315 }
7316 {
7317 VALUE ary;
7318 if (TYPE(vresult) == T_ARRAY) {
7319 ary = vresult;
7320 } else {
7321 ary = rb_ary_new2(2);
7322 rb_ary_push(ary, vresult);
7323 }
7324 rb_ary_push(ary, UINT2NUM(*arg10));
7325 free(arg10);
7326 vresult = ary;
7327 }
7328 {
7329 VALUE ary;
7330 if (TYPE(vresult) == T_ARRAY) {
7331 ary = vresult;
7332 } else {
7333 ary = rb_ary_new2(2);
7334 rb_ary_push(ary, vresult);
7335 }
7336 rb_ary_push(ary, UINT2NUM(*arg11));
7337 free(arg11);
7338 vresult = ary;
7339 }
7340 {
7341 VALUE ary;
7342 if (TYPE(vresult) == T_ARRAY) {
7343 ary = vresult;
7344 } else {
7345 ary = rb_ary_new2(2);
7346 rb_ary_push(ary, vresult);
7347 }
7348 rb_ary_push(ary, UINT2NUM(*arg12));
7349 free(arg12);
7350 vresult = ary;
7351 }
7352 {
7353 VALUE ary;
7354 if (TYPE(vresult) == T_ARRAY) {
7355 ary = vresult;
7356 } else {
7357 ary = rb_ary_new2(2);
7358 rb_ary_push(ary, vresult);
7359 }
7360 rb_ary_push(ary, UINT2NUM(*arg13));
7361 free(arg13);
7362 vresult = ary;
7363 }
7364 {
7365 VALUE ary;
7366 if (TYPE(vresult) == T_ARRAY) {
7367 ary = vresult;
7368 } else {
7369 ary = rb_ary_new2(2);
7370 rb_ary_push(ary, vresult);
7371 }
7372 rb_ary_push(ary, UINT2NUM(*arg14));
7373 free(arg14);
7374 vresult = ary;
7375 }
7376 return vresult;
7377 fail:
7378 return Qnil;
7379 }
7380
7381
7382 SWIGINTERN VALUE
7383 _wrap_sen_str_normalize(int argc, VALUE *argv, VALUE self) {
7384 char *arg1 = (char *) 0 ;
7385 unsigned int arg2 ;
7386 sen_encoding arg3 ;
7387 int arg4 ;
7388 char *arg5 = (char *) 0 ;
7389 int arg6 ;
7390 int result;
7391 int res1 ;
7392 char *buf1 = 0 ;
7393 int alloc1 = 0 ;
7394 unsigned int val2 ;
7395 int ecode2 = 0 ;
7396 int val3 ;
7397 int ecode3 = 0 ;
7398 int val4 ;
7399 int ecode4 = 0 ;
7400 VALUE vresult = Qnil;
7401
7402 if ((argc < 5) || (argc > 5)) {
7403 rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
7404 }
7405 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
7406 if (!SWIG_IsOK(res1)) {
7407 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_str_normalize" "', argument " "1"" of type '" "char const *""'");
7408 }
7409 arg1 = (char *)(buf1);
7410 ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
7411 if (!SWIG_IsOK(ecode2)) {
7412 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_str_normalize" "', argument " "2"" of type '" "unsigned int""'");
7413 }
7414 arg2 = (unsigned int)(val2);
7415 ecode3 = SWIG_AsVal_int(argv[2], &val3);
7416 if (!SWIG_IsOK(ecode3)) {
7417 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_str_normalize" "', argument " "3"" of type '" "sen_encoding""'");
7418 }
7419 arg3 = (sen_encoding)(val3);
7420 ecode4 = SWIG_AsVal_int(argv[3], &val4);
7421 if (!SWIG_IsOK(ecode4)) {
7422 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_str_normalize" "', argument " "4"" of type '" "int""'");
7423 }
7424 arg4 = (int)(val4);
7425 {
7426 int size = NUM2INT(argv[4]);
7427 arg5 = (size) ? calloc(size, 1) : NULL;
7428 arg6 = size;
7429 }
7430 result = (int)sen_str_normalize((char const *)arg1,arg2,arg3,arg4,arg5,arg6);
7431 vresult = SWIG_From_int((int)(result));
7432 {
7433 VALUE ary;
7434 if (TYPE(vresult) == T_ARRAY) {
7435 ary = vresult;
7436 } else {
7437 ary = rb_ary_new2(2);
7438 rb_ary_push(ary, vresult);
7439 }
7440 if (arg5) {
7441 rb_ary_push(ary, rb_str_new2(arg5));
7442 free(arg5);
7443 } else {
7444 rb_ary_push(ary, Qnil);
7445 }
7446 vresult = ary;
7447 }
7448 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
7449 return vresult;
7450 fail:
7451 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
7452 return Qnil;
7453 }
7454
7455
7456 SWIGINTERN VALUE
7457 _wrap_sen_str_charlen(int argc, VALUE *argv, VALUE self) {
7458 char *arg1 = (char *) 0 ;
7459 sen_encoding arg2 ;
7460 unsigned int result;
7461 int res1 ;
7462 char *buf1 = 0 ;
7463 int alloc1 = 0 ;
7464 int val2 ;
7465 int ecode2 = 0 ;
7466 VALUE vresult = Qnil;
7467
7468 if ((argc < 2) || (argc > 2)) {
7469 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7470 }
7471 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
7472 if (!SWIG_IsOK(res1)) {
7473 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_str_charlen" "', argument " "1"" of type '" "char const *""'");
7474 }
7475 arg1 = (char *)(buf1);
7476 ecode2 = SWIG_AsVal_int(argv[1], &val2);
7477 if (!SWIG_IsOK(ecode2)) {
7478 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_str_charlen" "', argument " "2"" of type '" "sen_encoding""'");
7479 }
7480 arg2 = (sen_encoding)(val2);
7481 result = (unsigned int)sen_str_charlen((char const *)arg1,arg2);
7482 vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
7483 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
7484 return vresult;
7485 fail:
7486 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
7487 return Qnil;
7488 }
7489
7490
7491 SWIGINTERN VALUE
7492 _wrap_sen_logger_info_set(int argc, VALUE *argv, VALUE self) {
7493 sen_logger_info *arg1 = (sen_logger_info *) 0 ;
7494 sen_rc result;
7495 VALUE vresult = Qnil;
7496
7497 if ((argc < 1) || (argc > 1)) {
7498 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7499 }
7500 {
7501 struct LoggerInfo *w;
7502 int res = SWIG_ConvertPtr(argv[0], (void *)&w, SWIGTYPE_p_LoggerInfo, 0);
7503 if (!SWIG_IsOK(res)) {
7504 SWIG_exception_fail(SWIG_ArgError(res), "LoggerInfo expected");
7505 }
7506 if (w) {
7507 arg1 = &w->info;
7508 w->info.max_level = w->max_level;
7509 w->info.flags = w->flags;
7510 w->info.func = CLASS_OF(w->func) == rb_cProc ? logger_handler : NULL;
7511 w->info.func_arg = w;
7512 } else {
7513 arg1 = NULL;
7514 }
7515 }
7516 result = (sen_rc)sen_logger_info_set((sen_logger_info const *)arg1);
7517 vresult = SWIG_From_int((int)(result));
7518 return vresult;
7519 fail:
7520 return Qnil;
7521 }
7522
7523
7524 SWIGINTERN VALUE
7525 _wrap_sen_logger_put(int argc, VALUE *argv, VALUE self) {
7526 sen_log_level arg1 ;
7527 char *arg2 = (char *) 0 ;
7528 int arg3 ;
7529 char *arg4 = (char *) 0 ;
7530 char *arg5 = (char *) 0 ;
7531 char *arg6 = (char *) 0 ;
7532 int val1 ;
7533 int ecode1 = 0 ;
7534 int res2 ;
7535 char *buf2 = 0 ;
7536 int alloc2 = 0 ;
7537 int val3 ;
7538 int ecode3 = 0 ;
7539 int res4 ;
7540 char *buf4 = 0 ;
7541 int alloc4 = 0 ;
7542 int res5 ;
7543 char *buf5 = 0 ;
7544 int alloc5 = 0 ;
7545 int res6 ;
7546 char *buf6 = 0 ;
7547 int alloc6 = 0 ;
7548
7549 if ((argc < 6) || (argc > 6)) {
7550 rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail;
7551 }
7552 ecode1 = SWIG_AsVal_int(argv[0], &val1);
7553 if (!SWIG_IsOK(ecode1)) {
7554 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sen_logger_put" "', argument " "1"" of type '" "sen_log_level""'");
7555 }
7556 arg1 = (sen_log_level)(val1);
7557 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
7558 if (!SWIG_IsOK(res2)) {
7559 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_logger_put" "', argument " "2"" of type '" "char const *""'");
7560 }
7561 arg2 = (char *)(buf2);
7562 ecode3 = SWIG_AsVal_int(argv[2], &val3);
7563 if (!SWIG_IsOK(ecode3)) {
7564 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_logger_put" "', argument " "3"" of type '" "int""'");
7565 }
7566 arg3 = (int)(val3);
7567 res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
7568 if (!SWIG_IsOK(res4)) {
7569 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sen_logger_put" "', argument " "4"" of type '" "char const *""'");
7570 }
7571 arg4 = (char *)(buf4);
7572 res5 = SWIG_AsCharPtrAndSize(argv[4], &buf5, NULL, &alloc5);
7573 if (!SWIG_IsOK(res5)) {
7574 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sen_logger_put" "', argument " "5"" of type '" "char *""'");
7575 }
7576 arg5 = (char *)(buf5);
7577 res6 = SWIG_AsCharPtrAndSize(argv[5], &buf6, NULL, &alloc6);
7578 if (!SWIG_IsOK(res6)) {
7579 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "sen_logger_put" "', argument " "6"" of type '" "char const *""'");
7580 }
7581 arg6 = (char *)(buf6);
7582 sen_logger_put(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5,(char const *)arg6);
7583 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7584 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
7585 if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
7586 if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
7587 return Qnil;
7588 fail:
7589 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7590 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
7591 if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
7592 if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
7593 return Qnil;
7594 }
7595
7596
7597 SWIGINTERN VALUE
7598 _wrap_sen_db_create(int argc, VALUE *argv, VALUE self) {
7599 char *arg1 = (char *) 0 ;
7600 int arg2 ;
7601 sen_encoding arg3 ;
7602 sen_db *result = 0 ;
7603 int res1 ;
7604 char *buf1 = 0 ;
7605 int alloc1 = 0 ;
7606 int val2 ;
7607 int ecode2 = 0 ;
7608 int val3 ;
7609 int ecode3 = 0 ;
7610 VALUE vresult = Qnil;
7611
7612 if ((argc < 3) || (argc > 3)) {
7613 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
7614 }
7615 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
7616 if (!SWIG_IsOK(res1)) {
7617 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_db_create" "', argument " "1"" of type '" "char const *""'");
7618 }
7619 arg1 = (char *)(buf1);
7620 ecode2 = SWIG_AsVal_int(argv[1], &val2);
7621 if (!SWIG_IsOK(ecode2)) {
7622 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_db_create" "', argument " "2"" of type '" "int""'");
7623 }
7624 arg2 = (int)(val2);
7625 ecode3 = SWIG_AsVal_int(argv[2], &val3);
7626 if (!SWIG_IsOK(ecode3)) {
7627 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_db_create" "', argument " "3"" of type '" "sen_encoding""'");
7628 }
7629 arg3 = (sen_encoding)(val3);
7630 result = (sen_db *)sen_db_create((char const *)arg1,arg2,arg3);
7631 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_db, 0 | 0 );
7632 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
7633 return vresult;
7634 fail:
7635 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
7636 return Qnil;
7637 }
7638
7639
7640 SWIGINTERN VALUE
7641 _wrap_sen_db_open(int argc, VALUE *argv, VALUE self) {
7642 char *arg1 = (char *) 0 ;
7643 sen_db *result = 0 ;
7644 int res1 ;
7645 char *buf1 = 0 ;
7646 int alloc1 = 0 ;
7647 VALUE vresult = Qnil;
7648
7649 if ((argc < 1) || (argc > 1)) {
7650 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7651 }
7652 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
7653 if (!SWIG_IsOK(res1)) {
7654 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_db_open" "', argument " "1"" of type '" "char const *""'");
7655 }
7656 arg1 = (char *)(buf1);
7657 result = (sen_db *)sen_db_open((char const *)arg1);
7658 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_db, 0 | 0 );
7659 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
7660 return vresult;
7661 fail:
7662 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
7663 return Qnil;
7664 }
7665
7666
7667 SWIGINTERN VALUE
7668 _wrap_sen_db_close(int argc, VALUE *argv, VALUE self) {
7669 sen_db *arg1 = (sen_db *) 0 ;
7670 sen_rc result;
7671 void *argp1 = 0 ;
7672 int res1 = 0 ;
7673 VALUE vresult = Qnil;
7674
7675 if ((argc < 1) || (argc > 1)) {
7676 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7677 }
7678 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_db, 0 | 0 );
7679 if (!SWIG_IsOK(res1)) {
7680 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_db_close" "', argument " "1"" of type '" "sen_db *""'");
7681 }
7682 arg1 = (sen_db *)(argp1);
7683 result = (sen_rc)sen_db_close(arg1);
7684 vresult = SWIG_From_int((int)(result));
7685 return vresult;
7686 fail:
7687 return Qnil;
7688 }
7689
7690
7691 SWIGINTERN VALUE
7692 _wrap_sen_ctx_open(int argc, VALUE *argv, VALUE self) {
7693 sen_db *arg1 = (sen_db *) 0 ;
7694 int arg2 ;
7695 sen_ctx *result = 0 ;
7696 void *argp1 = 0 ;
7697 int res1 = 0 ;
7698 int val2 ;
7699 int ecode2 = 0 ;
7700 VALUE vresult = Qnil;
7701
7702 if ((argc < 2) || (argc > 2)) {
7703 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7704 }
7705 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_db, 0 | 0 );
7706 if (!SWIG_IsOK(res1)) {
7707 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_ctx_open" "', argument " "1"" of type '" "sen_db *""'");
7708 }
7709 arg1 = (sen_db *)(argp1);
7710 ecode2 = SWIG_AsVal_int(argv[1], &val2);
7711 if (!SWIG_IsOK(ecode2)) {
7712 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_ctx_open" "', argument " "2"" of type '" "int""'");
7713 }
7714 arg2 = (int)(val2);
7715 result = (sen_ctx *)sen_ctx_open(arg1,arg2);
7716 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_ctx, 0 | 0 );
7717 return vresult;
7718 fail:
7719 return Qnil;
7720 }
7721
7722
7723 SWIGINTERN VALUE
7724 _wrap_sen_ctx_connect(int argc, VALUE *argv, VALUE self) {
7725 char *arg1 = (char *) 0 ;
7726 int arg2 ;
7727 int arg3 ;
7728 sen_ctx *result = 0 ;
7729 int res1 ;
7730 char *buf1 = 0 ;
7731 int alloc1 = 0 ;
7732 int val2 ;
7733 int ecode2 = 0 ;
7734 int val3 ;
7735 int ecode3 = 0 ;
7736 VALUE vresult = Qnil;
7737
7738 if ((argc < 3) || (argc > 3)) {
7739 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
7740 }
7741 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
7742 if (!SWIG_IsOK(res1)) {
7743 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_ctx_connect" "', argument " "1"" of type '" "char const *""'");
7744 }
7745 arg1 = (char *)(buf1);
7746 ecode2 = SWIG_AsVal_int(argv[1], &val2);
7747 if (!SWIG_IsOK(ecode2)) {
7748 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sen_ctx_connect" "', argument " "2"" of type '" "int""'");
7749 }
7750 arg2 = (int)(val2);
7751 ecode3 = SWIG_AsVal_int(argv[2], &val3);
7752 if (!SWIG_IsOK(ecode3)) {
7753 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_ctx_connect" "', argument " "3"" of type '" "int""'");
7754 }
7755 arg3 = (int)(val3);
7756 result = (sen_ctx *)sen_ctx_connect((char const *)arg1,arg2,arg3);
7757 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sen_ctx, 0 | 0 );
7758 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
7759 return vresult;
7760 fail:
7761 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
7762 return Qnil;
7763 }
7764
7765
7766 SWIGINTERN VALUE
7767 _wrap_sen_ctx_load(int argc, VALUE *argv, VALUE self) {
7768 sen_ctx *arg1 = (sen_ctx *) 0 ;
7769 char *arg2 = (char *) 0 ;
7770 sen_rc result;
7771 void *argp1 = 0 ;
7772 int res1 = 0 ;
7773 int res2 ;
7774 char *buf2 = 0 ;
7775 int alloc2 = 0 ;
7776 VALUE vresult = Qnil;
7777
7778 if ((argc < 2) || (argc > 2)) {
7779 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7780 }
7781 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_ctx, 0 | 0 );
7782 if (!SWIG_IsOK(res1)) {
7783 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_ctx_load" "', argument " "1"" of type '" "sen_ctx *""'");
7784 }
7785 arg1 = (sen_ctx *)(argp1);
7786 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
7787 if (!SWIG_IsOK(res2)) {
7788 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_ctx_load" "', argument " "2"" of type '" "char const *""'");
7789 }
7790 arg2 = (char *)(buf2);
7791 result = (sen_rc)sen_ctx_load(arg1,(char const *)arg2);
7792 vresult = SWIG_From_int((int)(result));
7793 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7794 return vresult;
7795 fail:
7796 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7797 return Qnil;
7798 }
7799
7800
7801 SWIGINTERN VALUE
7802 _wrap_sen_ctx_send(int argc, VALUE *argv, VALUE self) {
7803 sen_ctx *arg1 = (sen_ctx *) 0 ;
7804 char *arg2 = (char *) 0 ;
7805 unsigned int arg3 ;
7806 int arg4 ;
7807 sen_rc result;
7808 void *argp1 = 0 ;
7809 int res1 = 0 ;
7810 int res2 ;
7811 char *buf2 = 0 ;
7812 int alloc2 = 0 ;
7813 unsigned int val3 ;
7814 int ecode3 = 0 ;
7815 int val4 ;
7816 int ecode4 = 0 ;
7817 VALUE vresult = Qnil;
7818
7819 if ((argc < 4) || (argc > 4)) {
7820 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
7821 }
7822 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_ctx, 0 | 0 );
7823 if (!SWIG_IsOK(res1)) {
7824 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_ctx_send" "', argument " "1"" of type '" "sen_ctx *""'");
7825 }
7826 arg1 = (sen_ctx *)(argp1);
7827 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
7828 if (!SWIG_IsOK(res2)) {
7829 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sen_ctx_send" "', argument " "2"" of type '" "char *""'");
7830 }
7831 arg2 = (char *)(buf2);
7832 ecode3 = SWIG_AsVal_unsigned_SS_int(argv[2], &val3);
7833 if (!SWIG_IsOK(ecode3)) {
7834 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sen_ctx_send" "', argument " "3"" of type '" "unsigned int""'");
7835 }
7836 arg3 = (unsigned int)(val3);
7837 ecode4 = SWIG_AsVal_int(argv[3], &val4);
7838 if (!SWIG_IsOK(ecode4)) {
7839 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sen_ctx_send" "', argument " "4"" of type '" "int""'");
7840 }
7841 arg4 = (int)(val4);
7842 result = (sen_rc)sen_ctx_send(arg1,arg2,arg3,arg4);
7843 vresult = SWIG_From_int((int)(result));
7844 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7845 return vresult;
7846 fail:
7847 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7848 return Qnil;
7849 }
7850
7851
7852 SWIGINTERN VALUE
7853 _wrap_sen_ctx_recv(int argc, VALUE *argv, VALUE self) {
7854 sen_ctx *arg1 = (sen_ctx *) 0 ;
7855 char **arg2 = (char **) 0 ;
7856 unsigned int *arg3 = (unsigned int *) 0 ;
7857 int *arg4 = (int *) 0 ;
7858 sen_rc result;
7859 void *argp1 = 0 ;
7860 int res1 = 0 ;
7861 int temp4 ;
7862 int res4 = SWIG_TMPOBJ ;
7863 VALUE vresult = Qnil;
7864
7865 {
7866 arg2 = calloc(1, sizeof(char *));
7867 arg3 = calloc(1, sizeof(int));
7868 }
7869 arg4 = &temp4;
7870 if ((argc < 1) || (argc > 1)) {
7871 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7872 }
7873 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_ctx, 0 | 0 );
7874 if (!SWIG_IsOK(res1)) {
7875 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_ctx_recv" "', argument " "1"" of type '" "sen_ctx *""'");
7876 }
7877 arg1 = (sen_ctx *)(argp1);
7878 result = (sen_rc)sen_ctx_recv(arg1,arg2,arg3,arg4);
7879 vresult = SWIG_From_int((int)(result));
7880 {
7881 VALUE ary;
7882 if (TYPE(vresult) == T_ARRAY) {
7883 ary = vresult;
7884 } else {
7885 ary = rb_ary_new2(2);
7886 rb_ary_push(ary, vresult);
7887 }
7888 rb_ary_push(ary, rb_str_new(*(arg2), *(arg3)));
7889 free(arg2);
7890 free(arg3);
7891 vresult = ary;
7892 }
7893 if (SWIG_IsTmpObj(res4)) {
7894 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg4)));
7895 } else {
7896 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7897 vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
7898 }
7899 return vresult;
7900 fail:
7901 return Qnil;
7902 }
7903
7904
7905 SWIGINTERN VALUE
7906 _wrap_sen_ctx_close(int argc, VALUE *argv, VALUE self) {
7907 sen_ctx *arg1 = (sen_ctx *) 0 ;
7908 sen_rc result;
7909 void *argp1 = 0 ;
7910 int res1 = 0 ;
7911 VALUE vresult = Qnil;
7912
7913 if ((argc < 1) || (argc > 1)) {
7914 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7915 }
7916 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sen_ctx, 0 | 0 );
7917 if (!SWIG_IsOK(res1)) {
7918 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sen_ctx_close" "', argument " "1"" of type '" "sen_ctx *""'");
7919 }
7920 arg1 = (sen_ctx *)(argp1);
7921 result = (sen_rc)sen_ctx_close(arg1);
7922 vresult = SWIG_From_int((int)(result));
7923 return vresult;
7924 fail:
7925 return Qnil;
7926 }
7927
7928
7929
7930 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
7931
7932 static swig_type_info _swigt__p_GroupOptarg = {"_p_GroupOptarg", "struct GroupOptarg *", 0, 0, (void*)0, 0};
7933 static swig_type_info _swigt__p_LoggerInfo = {"_p_LoggerInfo", "struct LoggerInfo *", 0, 0, (void*)0, 0};
7934 static swig_type_info _swigt__p_SelectOptarg = {"_p_SelectOptarg", "struct SelectOptarg *", 0, 0, (void*)0, 0};
7935 static swig_type_info _swigt__p_SortOptarg = {"_p_SortOptarg", "struct SortOptarg *", 0, 0, (void*)0, 0};
7936 static swig_type_info _swigt__p__sen_group_optarg = {"_p__sen_group_optarg", "struct _sen_group_optarg *", 0, 0, (void*)0, 0};
7937 static swig_type_info _swigt__p__sen_logger_info = {"_p__sen_logger_info", "struct _sen_logger_info *", 0, 0, (void*)0, 0};
7938 static swig_type_info _swigt__p__sen_select_optarg = {"_p__sen_select_optarg", "struct _sen_select_optarg *", 0, 0, (void*)0, 0};
7939 static swig_type_info _swigt__p__sen_sort_optarg = {"_p__sen_sort_optarg", "struct _sen_sort_optarg *", 0, 0, (void*)0, 0};
7940 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
7941 static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
7942 static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
7943 static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
7944 static swig_type_info _swigt__p_query_term_callback = {"_p_query_term_callback", "query_term_callback *", 0, 0, (void*)0, 0};
7945 static swig_type_info _swigt__p_sen_ctx = {"_p_sen_ctx", "sen_ctx *", 0, 0, (void*)0, 0};
7946 static swig_type_info _swigt__p_sen_db = {"_p_sen_db", "sen_db *", 0, 0, (void*)0, 0};
7947 static swig_type_info _swigt__p_sen_encoding = {"_p_sen_encoding", "enum sen_encoding *|sen_encoding *", 0, 0, (void*)0, 0};
7948 static swig_type_info _swigt__p_sen_group_optarg = {"_p_sen_group_optarg", "sen_group_optarg *", 0, 0, (void*)0, 0};
7949 static swig_type_info _swigt__p_sen_index = {"_p_sen_index", "sen_index *", 0, 0, (void*)0, 0};
7950 static swig_type_info _swigt__p_sen_inv = {"_p_sen_inv", "sen_inv *", 0, 0, (void*)0, 0};
7951 static swig_type_info _swigt__p_sen_logger_info = {"_p_sen_logger_info", "sen_logger_info *", 0, 0, (void*)0, 0};
7952 static swig_type_info _swigt__p_sen_query = {"_p_sen_query", "sen_query *", 0, 0, (void*)0, 0};
7953 static swig_type_info _swigt__p_sen_recordh = {"_p_sen_recordh", "sen_recordh *", 0, 0, (void*)0, 0};
7954 static swig_type_info _swigt__p_sen_records = {"_p_sen_records", "sen_records *", 0, 0, (void*)0, 0};
7955 static swig_type_info _swigt__p_sen_records_heap = {"_p_sen_records_heap", "sen_records_heap *", 0, 0, (void*)0, 0};
7956 static swig_type_info _swigt__p_sen_select_optarg = {"_p_sen_select_optarg", "sen_select_optarg *", 0, 0, (void*)0, 0};
7957 static swig_type_info _swigt__p_sen_set = {"_p_sen_set", "sen_set *", 0, 0, (void*)0, 0};
7958 static swig_type_info _swigt__p_sen_set_cursor = {"_p_sen_set_cursor", "sen_set_cursor *", 0, 0, (void*)0, 0};
7959 static swig_type_info _swigt__p_sen_set_eh = {"_p_sen_set_eh", "sen_set_eh *", 0, 0, (void*)0, 0};
7960 static swig_type_info _swigt__p_sen_set_sort_optarg = {"_p_sen_set_sort_optarg", "sen_set_sort_optarg *", 0, 0, (void*)0, 0};
7961 static swig_type_info _swigt__p_sen_snip = {"_p_sen_snip", "sen_snip *", 0, 0, (void*)0, 0};
7962 static swig_type_info _swigt__p_sen_snip_mapping = {"_p_sen_snip_mapping", "sen_snip_mapping *", 0, 0, (void*)0, 0};
7963 static swig_type_info _swigt__p_sen_sort_optarg = {"_p_sen_sort_optarg", "sen_sort_optarg *", 0, 0, (void*)0, 0};
7964 static swig_type_info _swigt__p_sen_sym = {"_p_sen_sym", "sen_sym *", 0, 0, (void*)0, 0};
7965 static swig_type_info _swigt__p_sen_values = {"_p_sen_values", "sen_values *", 0, 0, (void*)0, 0};
7966 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *", 0, 0, (void*)0, 0};
7967 static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "unsigned long long *", 0, 0, (void*)0, 0};
7968
7969 static swig_type_info *swig_type_initial[] = {
7970 &_swigt__p_GroupOptarg,
7971 &_swigt__p_LoggerInfo,
7972 &_swigt__p_SelectOptarg,
7973 &_swigt__p_SortOptarg,
7974 &_swigt__p__sen_group_optarg,
7975 &_swigt__p__sen_logger_info,
7976 &_swigt__p__sen_select_optarg,
7977 &_swigt__p__sen_sort_optarg,
7978 &_swigt__p_char,
7979 &_swigt__p_int,
7980 &_swigt__p_p_char,
7981 &_swigt__p_p_void,
7982 &_swigt__p_query_term_callback,
7983 &_swigt__p_sen_ctx,
7984 &_swigt__p_sen_db,
7985 &_swigt__p_sen_encoding,
7986 &_swigt__p_sen_group_optarg,
7987 &_swigt__p_sen_index,
7988 &_swigt__p_sen_inv,
7989 &_swigt__p_sen_logger_info,
7990 &_swigt__p_sen_query,
7991 &_swigt__p_sen_recordh,
7992 &_swigt__p_sen_records,
7993 &_swigt__p_sen_records_heap,
7994 &_swigt__p_sen_select_optarg,
7995 &_swigt__p_sen_set,
7996 &_swigt__p_sen_set_cursor,
7997 &_swigt__p_sen_set_eh,
7998 &_swigt__p_sen_set_sort_optarg,
7999 &_swigt__p_sen_snip,
8000 &_swigt__p_sen_snip_mapping,
8001 &_swigt__p_sen_sort_optarg,
8002 &_swigt__p_sen_sym,
8003 &_swigt__p_sen_values,
8004 &_swigt__p_unsigned_int,
8005 &_swigt__p_unsigned_long_long,
8006 };
8007
8008 static swig_cast_info _swigc__p_GroupOptarg[] = { {&_swigt__p_GroupOptarg, 0, 0, 0},{0, 0, 0, 0}};
8009 static swig_cast_info _swigc__p_LoggerInfo[] = { {&_swigt__p_LoggerInfo, 0, 0, 0},{0, 0, 0, 0}};
8010 static swig_cast_info _swigc__p_SelectOptarg[] = { {&_swigt__p_SelectOptarg, 0, 0, 0},{0, 0, 0, 0}};
8011 static swig_cast_info _swigc__p_SortOptarg[] = { {&_swigt__p_SortOptarg, 0, 0, 0},{0, 0, 0, 0}};
8012 static swig_cast_info _swigc__p__sen_group_optarg[] = { {&_swigt__p__sen_group_optarg, 0, 0, 0},{0, 0, 0, 0}};
8013 static swig_cast_info _swigc__p__sen_logger_info[] = { {&_swigt__p__sen_logger_info, 0, 0, 0},{0, 0, 0, 0}};
8014 static swig_cast_info _swigc__p__sen_select_optarg[] = { {&_swigt__p__sen_select_optarg, 0, 0, 0},{0, 0, 0, 0}};
8015 static swig_cast_info _swigc__p__sen_sort_optarg[] = { {&_swigt__p__sen_sort_optarg, 0, 0, 0},{0, 0, 0, 0}};
8016 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
8017 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
8018 static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
8019 static swig_cast_info _swigc__p_p_void[] = { {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
8020 static swig_cast_info _swigc__p_query_term_callback[] = { {&_swigt__p_query_term_callback, 0, 0, 0},{0, 0, 0, 0}};
8021 static swig_cast_info _swigc__p_sen_ctx[] = { {&_swigt__p_sen_ctx, 0, 0, 0},{0, 0, 0, 0}};
8022 static swig_cast_info _swigc__p_sen_db[] = { {&_swigt__p_sen_db, 0, 0, 0},{0, 0, 0, 0}};
8023 static swig_cast_info _swigc__p_sen_encoding[] = { {&_swigt__p_sen_encoding, 0, 0, 0},{0, 0, 0, 0}};
8024 static swig_cast_info _swigc__p_sen_group_optarg[] = { {&_swigt__p_sen_group_optarg, 0, 0, 0},{0, 0, 0, 0}};
8025 static swig_cast_info _swigc__p_sen_index[] = { {&_swigt__p_sen_index, 0, 0, 0},{0, 0, 0, 0}};
8026 static swig_cast_info _swigc__p_sen_inv[] = { {&_swigt__p_sen_inv, 0, 0, 0},{0, 0, 0, 0}};
8027 static swig_cast_info _swigc__p_sen_logger_info[] = { {&_swigt__p_sen_logger_info, 0, 0, 0},{0, 0, 0, 0}};
8028 static swig_cast_info _swigc__p_sen_query[] = { {&_swigt__p_sen_query, 0, 0, 0},{0, 0, 0, 0}};
8029 static swig_cast_info _swigc__p_sen_recordh[] = { {&_swigt__p_sen_recordh, 0, 0, 0},{0, 0, 0, 0}};
8030 static swig_cast_info _swigc__p_sen_records[] = { {&_swigt__p_sen_records, 0, 0, 0},{0, 0, 0, 0}};
8031 static swig_cast_info _swigc__p_sen_records_heap[] = { {&_swigt__p_sen_records_heap, 0, 0, 0},{0, 0, 0, 0}};
8032 static swig_cast_info _swigc__p_sen_select_optarg[] = { {&_swigt__p_sen_select_optarg, 0, 0, 0},{0, 0, 0, 0}};
8033 static swig_cast_info _swigc__p_sen_set[] = { {&_swigt__p_sen_set, 0, 0, 0},{0, 0, 0, 0}};
8034 static swig_cast_info _swigc__p_sen_set_cursor[] = { {&_swigt__p_sen_set_cursor, 0, 0, 0},{0, 0, 0, 0}};
8035 static swig_cast_info _swigc__p_sen_set_eh[] = { {&_swigt__p_sen_set_eh, 0, 0, 0},{0, 0, 0, 0}};
8036 static swig_cast_info _swigc__p_sen_set_sort_optarg[] = { {&_swigt__p_sen_set_sort_optarg, 0, 0, 0},{0, 0, 0, 0}};
8037 static swig_cast_info _swigc__p_sen_snip[] = { {&_swigt__p_sen_snip, 0, 0, 0},{0, 0, 0, 0}};
8038 static swig_cast_info _swigc__p_sen_snip_mapping[] = { {&_swigt__p_sen_snip_mapping, 0, 0, 0},{0, 0, 0, 0}};
8039 static swig_cast_info _swigc__p_sen_sort_optarg[] = { {&_swigt__p_sen_sort_optarg, 0, 0, 0},{0, 0, 0, 0}};
8040 static swig_cast_info _swigc__p_sen_sym[] = { {&_swigt__p_sen_sym, 0, 0, 0},{0, 0, 0, 0}};
8041 static swig_cast_info _swigc__p_sen_values[] = { {&_swigt__p_sen_values, 0, 0, 0},{0, 0, 0, 0}};
8042 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
8043 static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
8044
8045 static swig_cast_info *swig_cast_initial[] = {
8046 _swigc__p_GroupOptarg,
8047 _swigc__p_LoggerInfo,
8048 _swigc__p_SelectOptarg,
8049 _swigc__p_SortOptarg,
8050 _swigc__p__sen_group_optarg,
8051 _swigc__p__sen_logger_info,
8052 _swigc__p__sen_select_optarg,
8053 _swigc__p__sen_sort_optarg,
8054 _swigc__p_char,
8055 _swigc__p_int,
8056 _swigc__p_p_char,
8057 _swigc__p_p_void,
8058 _swigc__p_query_term_callback,
8059 _swigc__p_sen_ctx,
8060 _swigc__p_sen_db,
8061 _swigc__p_sen_encoding,
8062 _swigc__p_sen_group_optarg,
8063 _swigc__p_sen_index,
8064 _swigc__p_sen_inv,
8065 _swigc__p_sen_logger_info,
8066 _swigc__p_sen_query,
8067 _swigc__p_sen_recordh,
8068 _swigc__p_sen_records,
8069 _swigc__p_sen_records_heap,
8070 _swigc__p_sen_select_optarg,
8071 _swigc__p_sen_set,
8072 _swigc__p_sen_set_cursor,
8073 _swigc__p_sen_set_eh,
8074 _swigc__p_sen_set_sort_optarg,
8075 _swigc__p_sen_snip,
8076 _swigc__p_sen_snip_mapping,
8077 _swigc__p_sen_sort_optarg,
8078 _swigc__p_sen_sym,
8079 _swigc__p_sen_values,
8080 _swigc__p_unsigned_int,
8081 _swigc__p_unsigned_long_long,
8082 };
8083
8084
8085 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
8086
8087 /* -----------------------------------------------------------------------------
8088 * Type initialization:
8089 * This problem is tough by the requirement that no dynamic
8090 * memory is used. Also, since swig_type_info structures store pointers to
8091 * swig_cast_info structures and swig_cast_info structures store pointers back
8092 * to swig_type_info structures, we need some lookup code at initialization.
8093 * The idea is that swig generates all the structures that are needed.
8094 * The runtime then collects these partially filled structures.
8095 * The SWIG_InitializeModule function takes these initial arrays out of
8096 * swig_module, and does all the lookup, filling in the swig_module.types
8097 * array with the correct data and linking the correct swig_cast_info
8098 * structures together.
8099 *
8100 * The generated swig_type_info structures are assigned staticly to an initial
8101 * array. We just loop through that array, and handle each type individually.
8102 * First we lookup if this type has been already loaded, and if so, use the
8103 * loaded structure instead of the generated one. Then we have to fill in the
8104 * cast linked list. The cast data is initially stored in something like a
8105 * two-dimensional array. Each row corresponds to a type (there are the same
8106 * number of rows as there are in the swig_type_initial array). Each entry in
8107 * a column is one of the swig_cast_info structures for that type.
8108 * The cast_initial array is actually an array of arrays, because each row has
8109 * a variable number of columns. So to actually build the cast linked list,
8110 * we find the array of casts associated with the type, and loop through it
8111 * adding the casts to the list. The one last trick we need to do is making
8112 * sure the type pointer in the swig_cast_info struct is correct.
8113 *
8114 * First off, we lookup the cast->type name to see if it is already loaded.
8115 * There are three cases to handle:
8116 * 1) If the cast->type has already been loaded AND the type we are adding
8117 * casting info to has not been loaded (it is in this module), THEN we
8118 * replace the cast->type pointer with the type pointer that has already
8119 * been loaded.
8120 * 2) If BOTH types (the one we are adding casting info to, and the
8121 * cast->type) are loaded, THEN the cast info has already been loaded by
8122 * the previous module so we just ignore it.
8123 * 3) Finally, if cast->type has not already been loaded, then we add that
8124 * swig_cast_info to the linked list (because the cast->type) pointer will
8125 * be correct.
8126 * ----------------------------------------------------------------------------- */
8127
8128 #ifdef __cplusplus
8129 extern "C" {
8130 #if 0
8131 } /* c-mode */
8132 #endif
8133 #endif
8134
8135 #if 0
8136 #define SWIGRUNTIME_DEBUG
8137 #endif
8138
8139
8140 SWIGRUNTIME void
8141 SWIG_InitializeModule(void *clientdata) {
8142 size_t i;
8143 swig_module_info *module_head, *iter;
8144 int found;
8145
8146 clientdata = clientdata;
8147
8148 /* check to see if the circular list has been setup, if not, set it up */
8149 if (swig_module.next==0) {
8150 /* Initialize the swig_module */
8151 swig_module.type_initial = swig_type_initial;
8152 swig_module.cast_initial = swig_cast_initial;
8153 swig_module.next = &swig_module;
8154 }
8155
8156 /* Try and load any already created modules */
8157 module_head = SWIG_GetModule(clientdata);
8158 if (!module_head) {
8159 /* This is the first module loaded for this interpreter */
8160 /* so set the swig module into the interpreter */
8161 SWIG_SetModule(clientdata, &swig_module);
8162 module_head = &swig_module;
8163 } else {
8164 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
8165 found=0;
8166 iter=module_head;
8167 do {
8168 if (iter==&swig_module) {
8169 found=1;
8170 break;
8171 }
8172 iter=iter->next;
8173 } while (iter!= module_head);
8174
8175 /* if the is found in the list, then all is done and we may leave */
8176 if (found) return;
8177 /* otherwise we must add out module into the list */
8178 swig_module.next = module_head->next;
8179 module_head->next = &swig_module;
8180 }
8181
8182 /* Now work on filling in swig_module.types */
8183 #ifdef SWIGRUNTIME_DEBUG
8184 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
8185 #endif
8186 for (i = 0; i < swig_module.size; ++i) {
8187 swig_type_info *type = 0;
8188 swig_type_info *ret;
8189 swig_cast_info *cast;
8190
8191 #ifdef SWIGRUNTIME_DEBUG
8192 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
8193 #endif
8194
8195 /* if there is another module already loaded */
8196 if (swig_module.next != &swig_module) {
8197 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
8198 }
8199 if (type) {
8200 /* Overwrite clientdata field */
8201 #ifdef SWIGRUNTIME_DEBUG
8202 printf("SWIG_InitializeModule: found type %s\n", type->name);
8203 #endif
8204 if (swig_module.type_initial[i]->clientdata) {
8205 type->clientdata = swig_module.type_initial[i]->clientdata;
8206 #ifdef SWIGRUNTIME_DEBUG
8207 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
8208 #endif
8209 }
8210 } else {
8211 type = swig_module.type_initial[i];
8212 }
8213
8214 /* Insert casting types */
8215 cast = swig_module.cast_initial[i];
8216 while (cast->type) {
8217
8218 /* Don't need to add information already in the list */
8219 ret = 0;
8220 #ifdef SWIGRUNTIME_DEBUG
8221 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
8222 #endif
8223 if (swig_module.next != &swig_module) {
8224 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
8225 #ifdef SWIGRUNTIME_DEBUG
8226 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
8227 #endif
8228 }
8229 if (ret) {
8230 if (type == swig_module.type_initial[i]) {
8231 #ifdef SWIGRUNTIME_DEBUG
8232 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
8233 #endif
8234 cast->type = ret;
8235 ret = 0;
8236 } else {
8237 /* Check for casting already in the list */
8238 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
8239 #ifdef SWIGRUNTIME_DEBUG
8240 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
8241 #endif
8242 if (!ocast) ret = 0;
8243 }
8244 }
8245
8246 if (!ret) {
8247 #ifdef SWIGRUNTIME_DEBUG
8248 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
8249 #endif
8250 if (type->cast) {
8251 type->cast->prev = cast;
8252 cast->next = type->cast;
8253 }
8254 type->cast = cast;
8255 }
8256 cast++;
8257 }
8258 /* Set entry in modules->types array equal to the type */
8259 swig_module.types[i] = type;
8260 }
8261 swig_module.types[i] = 0;
8262
8263 #ifdef SWIGRUNTIME_DEBUG
8264 printf("**** SWIG_InitializeModule: Cast List ******\n");
8265 for (i = 0; i < swig_module.size; ++i) {
8266 int j = 0;
8267 swig_cast_info *cast = swig_module.cast_initial[i];
8268 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
8269 while (cast->type) {
8270 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
8271 cast++;
8272 ++j;
8273 }
8274 printf("---- Total casts: %d\n",j);
8275 }
8276 printf("**** SWIG_InitializeModule: Cast List ******\n");
8277 #endif
8278 }
8279
8280 /* This function will propagate the clientdata field of type to
8281 * any new swig_type_info structures that have been added into the list
8282 * of equivalent types. It is like calling
8283 * SWIG_TypeClientData(type, clientdata) a second time.
8284 */
8285 SWIGRUNTIME void
8286 SWIG_PropagateClientData(void) {
8287 size_t i;
8288 swig_cast_info *equiv;
8289 static int init_run = 0;
8290
8291 if (init_run) return;
8292 init_run = 1;
8293
8294 for (i = 0; i < swig_module.size; i++) {
8295 if (swig_module.types[i]->clientdata) {
8296 equiv = swig_module.types[i]->cast;
8297 while (equiv) {
8298 if (!equiv->converter) {
8299 if (equiv->type && !equiv->type->clientdata)
8300 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
8301 }
8302 equiv = equiv->next;
8303 }
8304 }
8305 }
8306 }
8307
8308 #ifdef __cplusplus
8309 #if 0
8310 { /* c-mode */
8311 #endif
8312 }
8313 #endif
8314
8315
8316 #ifdef __cplusplus
8317 extern "C"
8318 #endif
8319 SWIGEXPORT void Init_senna(void) {
8320 size_t i;
8321
8322 SWIG_InitRuntime();
8323 mSenna = rb_define_module("Senna");
8324
8325 SWIG_InitializeModule(0);
8326 for (i = 0; i < swig_module.size; i++) {
8327 SWIG_define_class(swig_module.types[i]);
8328 }
8329
8330 SWIG_RubyInitializeTrackings();
8331
8332 sen_init();
8333 atexit(atexit_sen_fin);
8334
8335
8336 cLoggerInfo.klass = rb_define_class_under(mSenna, "LoggerInfo", rb_cObject);
8337 SWIG_TypeClientData(SWIGTYPE_p_LoggerInfo, (void *) &cLoggerInfo);
8338 rb_define_alloc_func(cLoggerInfo.klass, _wrap_LoggerInfo_allocate);
8339 rb_define_method(cLoggerInfo.klass, "initialize", _wrap_new_LoggerInfo, -1);
8340 rb_define_method(cLoggerInfo.klass, "max_level=", _wrap_LoggerInfo_max_level_set, -1);
8341 rb_define_method(cLoggerInfo.klass, "max_level", _wrap_LoggerInfo_max_level_get, -1);
8342 rb_define_method(cLoggerInfo.klass, "flags=", _wrap_LoggerInfo_flags_set, -1);
8343 rb_define_method(cLoggerInfo.klass, "flags", _wrap_LoggerInfo_flags_get, -1);
8344 rb_define_method(cLoggerInfo.klass, "func=", _wrap_LoggerInfo_func_set, -1);
8345 rb_define_method(cLoggerInfo.klass, "func", _wrap_LoggerInfo_func_get, -1);
8346 rb_define_method(cLoggerInfo.klass, "info=", _wrap_LoggerInfo_info_set, -1);
8347 rb_define_method(cLoggerInfo.klass, "info", _wrap_LoggerInfo_info_get, -1);
8348 cLoggerInfo.mark = (void (*)(void *)) mark_logger_info;
8349 cLoggerInfo.destroy = (void (*)(void *)) free_LoggerInfo;
8350 cLoggerInfo.trackObjects = 0;
8351
8352 cSelectOptarg.klass = rb_define_class_under(mSenna, "SelectOptarg", rb_cObject);
8353 SWIG_TypeClientData(SWIGTYPE_p_SelectOptarg, (void *) &cSelectOptarg);
8354 rb_define_alloc_func(cSelectOptarg.klass, _wrap_SelectOptarg_allocate);
8355 rb_define_method(cSelectOptarg.klass, "initialize", _wrap_new_SelectOptarg, -1);
8356 rb_define_method(cSelectOptarg.klass, "mode=", _wrap_SelectOptarg_mode_set, -1);
8357 rb_define_method(cSelectOptarg.klass, "mode", _wrap_SelectOptarg_mode_get, -1);
8358 rb_define_method(cSelectOptarg.klass, "similarity_threshold=", _wrap_SelectOptarg_similarity_threshold_set, -1);
8359 rb_define_method(cSelectOptarg.klass, "similarity_threshold", _wrap_SelectOptarg_similarity_threshold_get, -1);
8360 rb_define_method(cSelectOptarg.klass, "max_interval=", _wrap_SelectOptarg_max_interval_set, -1);
8361 rb_define_method(cSelectOptarg.klass, "max_interval", _wrap_SelectOptarg_max_interval_get, -1);
8362 rb_define_method(cSelectOptarg.klass, "weight_vector=", _wrap_SelectOptarg_weight_vector_set, -1);
8363 rb_define_method(cSelectOptarg.klass, "weight_vector", _wrap_SelectOptarg_weight_vector_get, -1);
8364 rb_define_method(cSelectOptarg.klass, "func=", _wrap_SelectOptarg_func_set, -1);
8365 rb_define_method(cSelectOptarg.klass, "func", _wrap_SelectOptarg_func_get, -1);
8366 rb_define_method(cSelectOptarg.klass, "func_arg=", _wrap_SelectOptarg_func_arg_set, -1);
8367 rb_define_method(cSelectOptarg.klass, "func_arg", _wrap_SelectOptarg_func_arg_get, -1);
8368 rb_define_method(cSelectOptarg.klass, "optarg=", _wrap_SelectOptarg_optarg_set, -1);
8369 rb_define_method(cSelectOptarg.klass, "optarg", _wrap_SelectOptarg_optarg_get, -1);
8370 cSelectOptarg.mark = (void (*)(void *)) mark_select_optarg;
8371 cSelectOptarg.destroy = (void (*)(void *)) free_SelectOptarg;
8372 cSelectOptarg.trackObjects = 0;
8373
8374 cGroupOptarg.klass = rb_define_class_under(mSenna, "GroupOptarg", rb_cObject);
8375 SWIG_TypeClientData(SWIGTYPE_p_GroupOptarg, (void *) &cGroupOptarg);
8376 rb_define_alloc_func(cGroupOptarg.klass, _wrap_GroupOptarg_allocate);
8377 rb_define_method(cGroupOptarg.klass, "initialize", _wrap_new_GroupOptarg, -1);
8378 rb_define_method(cGroupOptarg.klass, "mode=", _wrap_GroupOptarg_mode_set, -1);
8379 rb_define_method(cGroupOptarg.klass, "mode", _wrap_GroupOptarg_mode_get, -1);
8380 rb_define_method(cGroupOptarg.klass, "func=", _wrap_GroupOptarg_func_set, -1);
8381 rb_define_method(cGroupOptarg.klass, "func", _wrap_GroupOptarg_func_get, -1);
8382 rb_define_method(cGroupOptarg.klass, "func_arg=", _wrap_GroupOptarg_func_arg_set, -1);
8383 rb_define_method(cGroupOptarg.klass, "func_arg", _wrap_GroupOptarg_func_arg_get, -1);
8384 rb_define_method(cGroupOptarg.klass, "key_size=", _wrap_GroupOptarg_key_size_set, -1);
8385 rb_define_method(cGroupOptarg.klass, "key_size", _wrap_GroupOptarg_key_size_get, -1);
8386 rb_define_method(cGroupOptarg.klass, "optarg=", _wrap_GroupOptarg_optarg_set, -1);
8387 rb_define_method(cGroupOptarg.klass, "optarg", _wrap_GroupOptarg_optarg_get, -1);
8388 cGroupOptarg.mark = (void (*)(void *)) mark_group_optarg;
8389 cGroupOptarg.destroy = (void (*)(void *)) free_GroupOptarg;
8390 cGroupOptarg.trackObjects = 0;
8391
8392 cSortOptarg.klass = rb_define_class_under(mSenna, "SortOptarg", rb_cObject);
8393 SWIG_TypeClientData(SWIGTYPE_p_SortOptarg, (void *) &cSortOptarg);
8394 rb_define_alloc_func(cSortOptarg.klass, _wrap_SortOptarg_allocate);
8395 rb_define_method(cSortOptarg.klass, "initialize", _wrap_new_SortOptarg, -1);
8396 rb_define_method(cSortOptarg.klass, "mode=", _wrap_SortOptarg_mode_set, -1);
8397 rb_define_method(cSortOptarg.klass, "mode", _wrap_SortOptarg_mode_get, -1);
8398 rb_define_method(cSortOptarg.klass, "compar=", _wrap_SortOptarg_compar_set, -1);
8399 rb_define_method(cSortOptarg.klass, "compar", _wrap_SortOptarg_compar_get, -1);
8400 rb_define_method(cSortOptarg.klass, "compar_arg=", _wrap_SortOptarg_compar_arg_set, -1);
8401 rb_define_method(cSortOptarg.klass, "compar_arg", _wrap_SortOptarg_compar_arg_get, -1);
8402 rb_define_method(cSortOptarg.klass, "optarg=", _wrap_SortOptarg_optarg_set, -1);
8403 rb_define_method(cSortOptarg.klass, "optarg", _wrap_SortOptarg_optarg_get, -1);
8404 cSortOptarg.mark = (void (*)(void *)) mark_sort_optarg;
8405 cSortOptarg.destroy = (void (*)(void *)) free_SortOptarg;
8406 cSortOptarg.trackObjects = 0;
8407 rb_define_module_function(mSenna, "sen_index_keys", _wrap_sen_index_keys, -1);
8408 rb_define_module_function(mSenna, "sen_index_lexicon", _wrap_sen_index_lexicon, -1);
8409 rb_define_module_function(mSenna, "sen_index_inv", _wrap_sen_index_inv, -1);
8410 rb_define_module_function(mSenna, "sen_set_eh_nth", _wrap_sen_set_eh_nth, -1);
8411 rb_define_module_function(mSenna, "sen_init", _wrap_sen_init, -1);
8412 rb_define_module_function(mSenna, "sen_fin", _wrap_sen_fin, -1);
8413 rb_define_module_function(mSenna, "sen_index_create", _wrap_sen_index_create, -1);
8414 rb_define_module_function(mSenna, "sen_index_open", _wrap_sen_index_open, -1);
8415 rb_define_module_function(mSenna, "sen_index_close", _wrap_sen_index_close, -1);
8416 rb_define_module_function(mSenna, "sen_index_remove", _wrap_sen_index_remove, -1);
8417 rb_define_module_function(mSenna, "sen_index_rename", _wrap_sen_index_rename, -1);
8418 rb_define_module_function(mSenna, "sen_index_upd", _wrap_sen_index_upd, -1);
8419 rb_define_module_function(mSenna, "sen_index_sel", _wrap_sen_index_sel, -1);
8420 rb_define_module_function(mSenna, "sen_records_next", _wrap_sen_records_next, -1);
8421 rb_define_module_function(mSenna, "sen_records_rewind", _wrap_sen_records_rewind, -1);
8422 rb_define_module_function(mSenna, "sen_records_curr_score", _wrap_sen_records_curr_score, -1);
8423 rb_define_module_function(mSenna, "sen_records_curr_key", _wrap_sen_records_curr_key, -1);
8424 rb_define_module_function(mSenna, "sen_records_nhits", _wrap_sen_records_nhits, -1);
8425 rb_define_module_function(mSenna, "sen_records_find", _wrap_sen_records_find, -1);
8426 rb_define_module_function(mSenna, "sen_records_close", _wrap_sen_records_close, -1);
8427 rb_define_module_function(mSenna, "sen_values_open", _wrap_sen_values_open, -1);
8428 rb_define_module_function(mSenna, "sen_values_close", _wrap_sen_values_close, -1);
8429 rb_define_module_function(mSenna, "sen_values_add", _wrap_sen_values_add, -1);
8430 rb_define_module_function(mSenna, "sen_records_open", _wrap_sen_records_open, -1);
8431 rb_define_module_function(mSenna, "sen_records_union", _wrap_sen_records_union, -1);
8432 rb_define_module_function(mSenna, "sen_records_subtract", _wrap_sen_records_subtract, -1);
8433 rb_define_module_function(mSenna, "sen_records_intersect", _wrap_sen_records_intersect, -1);
8434 rb_define_module_function(mSenna, "sen_records_difference", _wrap_sen_records_difference, -1);
8435 rb_define_module_function(mSenna, "sen_records_sort", _wrap_sen_records_sort, -1);
8436 rb_define_module_function(mSenna, "sen_records_group", _wrap_sen_records_group, -1);
8437 rb_define_module_function(mSenna, "sen_records_curr_rec", _wrap_sen_records_curr_rec, -1);
8438 rb_define_module_function(mSenna, "sen_records_at", _wrap_sen_records_at, -1);
8439 rb_define_module_function(mSenna, "sen_record_info", _wrap_sen_record_info, -1);
8440 rb_define_module_function(mSenna, "sen_record_subrec_info", _wrap_sen_record_subrec_info, -1);
8441 rb_define_module_function(mSenna, "sen_index_create_with_keys", _wrap_sen_index_create_with_keys, -1);
8442 rb_define_module_function(mSenna, "sen_index_open_with_keys", _wrap_sen_index_open_with_keys, -1);
8443 rb_define_module_function(mSenna, "sen_index_update", _wrap_sen_index_update, -1);
8444 rb_define_module_function(mSenna, "sen_index_select", _wrap_sen_index_select, -1);
8445 rb_define_module_function(mSenna, "sen_index_info", _wrap_sen_index_info, -1);
8446 rb_define_module_function(mSenna, "sen_index_path", _wrap_sen_index_path, -1);
8447 rb_define_module_function(mSenna, "sen_query_open", _wrap_sen_query_open, -1);
8448 rb_define_module_function(mSenna, "sen_query_rest", _wrap_sen_query_rest, -1);
8449 rb_define_module_function(mSenna, "sen_query_close", _wrap_sen_query_close, -1);
8450 rb_define_module_function(mSenna, "sen_query_exec", _wrap_sen_query_exec, -1);
8451 rb_define_module_function(mSenna, "sen_query_term", _wrap_sen_query_term, -1);
8452 rb_define_module_function(mSenna, "sen_query_scan", _wrap_sen_query_scan, -1);
8453 rb_define_module_function(mSenna, "sen_query_snip", _wrap_sen_query_snip, -1);
8454 rb_define_module_function(mSenna, "sen_index_del", _wrap_sen_index_del, -1);
8455 rb_define_module_function(mSenna, "sen_set_open", _wrap_sen_set_open, -1);
8456 rb_define_module_function(mSenna, "sen_set_close", _wrap_sen_set_close, -1);
8457 rb_define_module_function(mSenna, "sen_set_info", _wrap_sen_set_info, -1);
8458 rb_define_module_function(mSenna, "sen_set_get", _wrap_sen_set_get, -1);
8459 rb_define_module_function(mSenna, "sen_set_at", _wrap_sen_set_at, -1);
8460 rb_define_module_function(mSenna, "sen_set_del", _wrap_sen_set_del, -1);
8461 rb_define_module_function(mSenna, "sen_set_cursor_open", _wrap_sen_set_cursor_open, -1);
8462 rb_define_module_function(mSenna, "sen_set_cursor_next", _wrap_sen_set_cursor_next, -1);
8463 rb_define_module_function(mSenna, "sen_set_cursor_close", _wrap_sen_set_cursor_close, -1);
8464 rb_define_module_function(mSenna, "sen_set_element_info", _wrap_sen_set_element_info, -1);
8465 rb_define_module_function(mSenna, "sen_set_union", _wrap_sen_set_union, -1);
8466 rb_define_module_function(mSenna, "sen_set_subtract", _wrap_sen_set_subtract, -1);
8467 rb_define_module_function(mSenna, "sen_set_intersect", _wrap_sen_set_intersect, -1);
8468 rb_define_module_function(mSenna, "sen_set_difference", _wrap_sen_set_difference, -1);
8469 rb_define_module_function(mSenna, "sen_set_sort", _wrap_sen_set_sort, -1);
8470 rb_define_module_function(mSenna, "sen_sym_create", _wrap_sen_sym_create, -1);
8471 rb_define_module_function(mSenna, "sen_sym_open", _wrap_sen_sym_open, -1);
8472 rb_define_module_function(mSenna, "sen_sym_info", _wrap_sen_sym_info, -1);
8473 rb_define_module_function(mSenna, "sen_sym_close", _wrap_sen_sym_close, -1);
8474 rb_define_module_function(mSenna, "sen_sym_remove", _wrap_sen_sym_remove, -1);
8475 rb_define_module_function(mSenna, "sen_sym_get", _wrap_sen_sym_get, -1);
8476 rb_define_module_function(mSenna, "sen_sym_at", _wrap_sen_sym_at, -1);
8477 rb_define_module_function(mSenna, "sen_sym_del", _wrap_sen_sym_del, -1);
8478 rb_define_module_function(mSenna, "sen_sym_size", _wrap_sen_sym_size, -1);
8479 rb_define_module_function(mSenna, "sen_sym_key", _wrap_sen_sym_key, -1);
8480 rb_define_module_function(mSenna, "sen_sym_prefix_search", _wrap_sen_sym_prefix_search, -1);
8481 rb_define_module_function(mSenna, "sen_sym_suffix_search", _wrap_sen_sym_suffix_search, -1);
8482 rb_define_module_function(mSenna, "sen_sym_common_prefix_search", _wrap_sen_sym_common_prefix_search, -1);
8483 rb_define_module_function(mSenna, "sen_sym_pocket_get", _wrap_sen_sym_pocket_get, -1);
8484 rb_define_module_function(mSenna, "sen_sym_pocket_set", _wrap_sen_sym_pocket_set, -1);
8485 rb_define_module_function(mSenna, "sen_sym_next", _wrap_sen_sym_next, -1);
8486 rb_define_module_function(mSenna, "sen_snip_open", _wrap_sen_snip_open, -1);
8487 rb_define_module_function(mSenna, "sen_snip_close", _wrap_sen_snip_close, -1);
8488 rb_define_module_function(mSenna, "sen_snip_add_cond", _wrap_sen_snip_add_cond, -1);
8489 rb_define_module_function(mSenna, "sen_snip_exec", _wrap_sen_snip_exec, -1);
8490 rb_define_module_function(mSenna, "sen_snip_get_result", _wrap_sen_snip_get_result, -1);
8491 rb_define_module_function(mSenna, "sen_records_heap_open", _wrap_sen_records_heap_open, -1);
8492 rb_define_module_function(mSenna, "sen_records_heap_add", _wrap_sen_records_heap_add, -1);
8493 rb_define_module_function(mSenna, "sen_records_heap_next", _wrap_sen_records_heap_next, -1);
8494 rb_define_module_function(mSenna, "sen_records_heap_head", _wrap_sen_records_heap_head, -1);
8495 rb_define_module_function(mSenna, "sen_records_heap_close", _wrap_sen_records_heap_close, -1);
8496 rb_define_module_function(mSenna, "sen_inv_entry_info", _wrap_sen_inv_entry_info, -1);
8497 rb_define_module_function(mSenna, "sen_str_normalize", _wrap_sen_str_normalize, -1);
8498 rb_define_module_function(mSenna, "sen_str_charlen", _wrap_sen_str_charlen, -1);
8499 rb_define_module_function(mSenna, "sen_logger_info_set", _wrap_sen_logger_info_set, -1);
8500 rb_define_module_function(mSenna, "sen_logger_put", _wrap_sen_logger_put, -1);
8501 rb_define_module_function(mSenna, "sen_db_create", _wrap_sen_db_create, -1);
8502 rb_define_module_function(mSenna, "sen_db_open", _wrap_sen_db_open, -1);
8503 rb_define_module_function(mSenna, "sen_db_close", _wrap_sen_db_close, -1);
8504 rb_define_module_function(mSenna, "sen_ctx_open", _wrap_sen_ctx_open, -1);
8505 rb_define_module_function(mSenna, "sen_ctx_connect", _wrap_sen_ctx_connect, -1);
8506 rb_define_module_function(mSenna, "sen_ctx_load", _wrap_sen_ctx_load, -1);
8507 rb_define_module_function(mSenna, "sen_ctx_send", _wrap_sen_ctx_send, -1);
8508 rb_define_module_function(mSenna, "sen_ctx_recv", _wrap_sen_ctx_recv, -1);
8509 rb_define_module_function(mSenna, "sen_ctx_close", _wrap_sen_ctx_close, -1);
8510 }
8511
8512