luislavena-sqlite3-ruby 1.2.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5018 @@
1
+ /* ----------------------------------------------------------------------------
2
+ * This file was automatically generated by SWIG (http://www.swig.org).
3
+ * Version 1.3.39
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
+ /* -----------------------------------------------------------------------------
14
+ * This section contains generic SWIG labels for method/variable
15
+ * declarations/attributes, and other compiler dependent labels.
16
+ * ----------------------------------------------------------------------------- */
17
+
18
+ /* template workaround for compilers that cannot correctly implement the C++ standard */
19
+ #ifndef SWIGTEMPLATEDISAMBIGUATOR
20
+ # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
21
+ # define SWIGTEMPLATEDISAMBIGUATOR template
22
+ # elif defined(__HP_aCC)
23
+ /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
24
+ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
25
+ # define SWIGTEMPLATEDISAMBIGUATOR template
26
+ # else
27
+ # define SWIGTEMPLATEDISAMBIGUATOR
28
+ # endif
29
+ #endif
30
+
31
+ /* inline attribute */
32
+ #ifndef SWIGINLINE
33
+ # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
34
+ # define SWIGINLINE inline
35
+ # else
36
+ # define SWIGINLINE
37
+ # endif
38
+ #endif
39
+
40
+ /* attribute recognised by some compilers to avoid 'unused' warnings */
41
+ #ifndef SWIGUNUSED
42
+ # if defined(__GNUC__)
43
+ # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
44
+ # define SWIGUNUSED __attribute__ ((__unused__))
45
+ # else
46
+ # define SWIGUNUSED
47
+ # endif
48
+ # elif defined(__ICC)
49
+ # define SWIGUNUSED __attribute__ ((__unused__))
50
+ # else
51
+ # define SWIGUNUSED
52
+ # endif
53
+ #endif
54
+
55
+ #ifndef SWIG_MSC_UNSUPPRESS_4505
56
+ # if defined(_MSC_VER)
57
+ # pragma warning(disable : 4505) /* unreferenced local function has been removed */
58
+ # endif
59
+ #endif
60
+
61
+ #ifndef SWIGUNUSEDPARM
62
+ # ifdef __cplusplus
63
+ # define SWIGUNUSEDPARM(p)
64
+ # else
65
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
66
+ # endif
67
+ #endif
68
+
69
+ /* internal SWIG method */
70
+ #ifndef SWIGINTERN
71
+ # define SWIGINTERN static SWIGUNUSED
72
+ #endif
73
+
74
+ /* internal inline SWIG method */
75
+ #ifndef SWIGINTERNINLINE
76
+ # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
77
+ #endif
78
+
79
+ /* exporting methods */
80
+ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
81
+ # ifndef GCC_HASCLASSVISIBILITY
82
+ # define GCC_HASCLASSVISIBILITY
83
+ # endif
84
+ #endif
85
+
86
+ #ifndef SWIGEXPORT
87
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
88
+ # if defined(STATIC_LINKED)
89
+ # define SWIGEXPORT
90
+ # else
91
+ # define SWIGEXPORT __declspec(dllexport)
92
+ # endif
93
+ # else
94
+ # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
95
+ # define SWIGEXPORT __attribute__ ((visibility("default")))
96
+ # else
97
+ # define SWIGEXPORT
98
+ # endif
99
+ # endif
100
+ #endif
101
+
102
+ /* calling conventions for Windows */
103
+ #ifndef SWIGSTDCALL
104
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
105
+ # define SWIGSTDCALL __stdcall
106
+ # else
107
+ # define SWIGSTDCALL
108
+ # endif
109
+ #endif
110
+
111
+ /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
112
+ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
113
+ # define _CRT_SECURE_NO_DEPRECATE
114
+ #endif
115
+
116
+ /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
117
+ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
118
+ # define _SCL_SECURE_NO_DEPRECATE
119
+ #endif
120
+
121
+
122
+ /* -----------------------------------------------------------------------------
123
+ * This section contains generic SWIG labels for method/variable
124
+ * declarations/attributes, and other compiler dependent labels.
125
+ * ----------------------------------------------------------------------------- */
126
+
127
+ /* template workaround for compilers that cannot correctly implement the C++ standard */
128
+ #ifndef SWIGTEMPLATEDISAMBIGUATOR
129
+ # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
130
+ # define SWIGTEMPLATEDISAMBIGUATOR template
131
+ # elif defined(__HP_aCC)
132
+ /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
133
+ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
134
+ # define SWIGTEMPLATEDISAMBIGUATOR template
135
+ # else
136
+ # define SWIGTEMPLATEDISAMBIGUATOR
137
+ # endif
138
+ #endif
139
+
140
+ /* inline attribute */
141
+ #ifndef SWIGINLINE
142
+ # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
143
+ # define SWIGINLINE inline
144
+ # else
145
+ # define SWIGINLINE
146
+ # endif
147
+ #endif
148
+
149
+ /* attribute recognised by some compilers to avoid 'unused' warnings */
150
+ #ifndef SWIGUNUSED
151
+ # if defined(__GNUC__)
152
+ # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
153
+ # define SWIGUNUSED __attribute__ ((__unused__))
154
+ # else
155
+ # define SWIGUNUSED
156
+ # endif
157
+ # elif defined(__ICC)
158
+ # define SWIGUNUSED __attribute__ ((__unused__))
159
+ # else
160
+ # define SWIGUNUSED
161
+ # endif
162
+ #endif
163
+
164
+ #ifndef SWIG_MSC_UNSUPPRESS_4505
165
+ # if defined(_MSC_VER)
166
+ # pragma warning(disable : 4505) /* unreferenced local function has been removed */
167
+ # endif
168
+ #endif
169
+
170
+ #ifndef SWIGUNUSEDPARM
171
+ # ifdef __cplusplus
172
+ # define SWIGUNUSEDPARM(p)
173
+ # else
174
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
175
+ # endif
176
+ #endif
177
+
178
+ /* internal SWIG method */
179
+ #ifndef SWIGINTERN
180
+ # define SWIGINTERN static SWIGUNUSED
181
+ #endif
182
+
183
+ /* internal inline SWIG method */
184
+ #ifndef SWIGINTERNINLINE
185
+ # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
186
+ #endif
187
+
188
+ /* exporting methods */
189
+ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
190
+ # ifndef GCC_HASCLASSVISIBILITY
191
+ # define GCC_HASCLASSVISIBILITY
192
+ # endif
193
+ #endif
194
+
195
+ #ifndef SWIGEXPORT
196
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
197
+ # if defined(STATIC_LINKED)
198
+ # define SWIGEXPORT
199
+ # else
200
+ # define SWIGEXPORT __declspec(dllexport)
201
+ # endif
202
+ # else
203
+ # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
204
+ # define SWIGEXPORT __attribute__ ((visibility("default")))
205
+ # else
206
+ # define SWIGEXPORT
207
+ # endif
208
+ # endif
209
+ #endif
210
+
211
+ /* calling conventions for Windows */
212
+ #ifndef SWIGSTDCALL
213
+ # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
214
+ # define SWIGSTDCALL __stdcall
215
+ # else
216
+ # define SWIGSTDCALL
217
+ # endif
218
+ #endif
219
+
220
+ /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
221
+ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
222
+ # define _CRT_SECURE_NO_DEPRECATE
223
+ #endif
224
+
225
+ /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
226
+ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
227
+ # define _SCL_SECURE_NO_DEPRECATE
228
+ #endif
229
+
230
+
231
+ /* -----------------------------------------------------------------------------
232
+ * swigrun.swg
233
+ *
234
+ * This file contains generic C API SWIG runtime support for pointer
235
+ * type checking.
236
+ * ----------------------------------------------------------------------------- */
237
+
238
+ /* This should only be incremented when either the layout of swig_type_info changes,
239
+ or for whatever reason, the runtime changes incompatibly */
240
+ #define SWIG_RUNTIME_VERSION "4"
241
+
242
+ /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
243
+ #ifdef SWIG_TYPE_TABLE
244
+ # define SWIG_QUOTE_STRING(x) #x
245
+ # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
246
+ # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
247
+ #else
248
+ # define SWIG_TYPE_TABLE_NAME
249
+ #endif
250
+
251
+ /*
252
+ You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
253
+ creating a static or dynamic library from the SWIG runtime code.
254
+ In 99.9% of the cases, SWIG just needs to declare them as 'static'.
255
+
256
+ But only do this if strictly necessary, ie, if you have problems
257
+ with your compiler or suchlike.
258
+ */
259
+
260
+ #ifndef SWIGRUNTIME
261
+ # define SWIGRUNTIME SWIGINTERN
262
+ #endif
263
+
264
+ #ifndef SWIGRUNTIMEINLINE
265
+ # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
266
+ #endif
267
+
268
+ /* Generic buffer size */
269
+ #ifndef SWIG_BUFFER_SIZE
270
+ # define SWIG_BUFFER_SIZE 1024
271
+ #endif
272
+
273
+ /* Flags for pointer conversions */
274
+ #define SWIG_POINTER_DISOWN 0x1
275
+ #define SWIG_CAST_NEW_MEMORY 0x2
276
+
277
+ /* Flags for new pointer objects */
278
+ #define SWIG_POINTER_OWN 0x1
279
+
280
+
281
+ /*
282
+ Flags/methods for returning states.
283
+
284
+ The SWIG conversion methods, as ConvertPtr, return and integer
285
+ that tells if the conversion was successful or not. And if not,
286
+ an error code can be returned (see swigerrors.swg for the codes).
287
+
288
+ Use the following macros/flags to set or process the returning
289
+ states.
290
+
291
+ In old versions of SWIG, code such as the following was usually written:
292
+
293
+ if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
294
+ // success code
295
+ } else {
296
+ //fail code
297
+ }
298
+
299
+ Now you can be more explicit:
300
+
301
+ int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
302
+ if (SWIG_IsOK(res)) {
303
+ // success code
304
+ } else {
305
+ // fail code
306
+ }
307
+
308
+ which is the same really, but now you can also do
309
+
310
+ Type *ptr;
311
+ int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
312
+ if (SWIG_IsOK(res)) {
313
+ // success code
314
+ if (SWIG_IsNewObj(res) {
315
+ ...
316
+ delete *ptr;
317
+ } else {
318
+ ...
319
+ }
320
+ } else {
321
+ // fail code
322
+ }
323
+
324
+ I.e., now SWIG_ConvertPtr can return new objects and you can
325
+ identify the case and take care of the deallocation. Of course that
326
+ also requires SWIG_ConvertPtr to return new result values, such as
327
+
328
+ int SWIG_ConvertPtr(obj, ptr,...) {
329
+ if (<obj is ok>) {
330
+ if (<need new object>) {
331
+ *ptr = <ptr to new allocated object>;
332
+ return SWIG_NEWOBJ;
333
+ } else {
334
+ *ptr = <ptr to old object>;
335
+ return SWIG_OLDOBJ;
336
+ }
337
+ } else {
338
+ return SWIG_BADOBJ;
339
+ }
340
+ }
341
+
342
+ Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
343
+ more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
344
+ SWIG errors code.
345
+
346
+ Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
347
+ allows to return the 'cast rank', for example, if you have this
348
+
349
+ int food(double)
350
+ int fooi(int);
351
+
352
+ and you call
353
+
354
+ food(1) // cast rank '1' (1 -> 1.0)
355
+ fooi(1) // cast rank '0'
356
+
357
+ just use the SWIG_AddCast()/SWIG_CheckState()
358
+ */
359
+
360
+ #define SWIG_OK (0)
361
+ #define SWIG_ERROR (-1)
362
+ #define SWIG_IsOK(r) (r >= 0)
363
+ #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
364
+
365
+ /* The CastRankLimit says how many bits are used for the cast rank */
366
+ #define SWIG_CASTRANKLIMIT (1 << 8)
367
+ /* The NewMask denotes the object was created (using new/malloc) */
368
+ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
369
+ /* The TmpMask is for in/out typemaps that use temporal objects */
370
+ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
371
+ /* Simple returning values */
372
+ #define SWIG_BADOBJ (SWIG_ERROR)
373
+ #define SWIG_OLDOBJ (SWIG_OK)
374
+ #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
375
+ #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
376
+ /* Check, add and del mask methods */
377
+ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
378
+ #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
379
+ #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
380
+ #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
381
+ #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
382
+ #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
383
+
384
+ /* Cast-Rank Mode */
385
+ #if defined(SWIG_CASTRANK_MODE)
386
+ # ifndef SWIG_TypeRank
387
+ # define SWIG_TypeRank unsigned long
388
+ # endif
389
+ # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
390
+ # define SWIG_MAXCASTRANK (2)
391
+ # endif
392
+ # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
393
+ # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
394
+ SWIGINTERNINLINE int SWIG_AddCast(int r) {
395
+ return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
396
+ }
397
+ SWIGINTERNINLINE int SWIG_CheckState(int r) {
398
+ return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
399
+ }
400
+ #else /* no cast-rank mode */
401
+ # define SWIG_AddCast
402
+ # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
403
+ #endif
404
+
405
+
406
+ #include <string.h>
407
+
408
+ #ifdef __cplusplus
409
+ extern "C" {
410
+ #endif
411
+
412
+ typedef void *(*swig_converter_func)(void *, int *);
413
+ typedef struct swig_type_info *(*swig_dycast_func)(void **);
414
+
415
+ /* Structure to store information on one type */
416
+ typedef struct swig_type_info {
417
+ const char *name; /* mangled name of this type */
418
+ const char *str; /* human readable name of this type */
419
+ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
420
+ struct swig_cast_info *cast; /* linked list of types that can cast into this type */
421
+ void *clientdata; /* language specific type data */
422
+ int owndata; /* flag if the structure owns the clientdata */
423
+ } swig_type_info;
424
+
425
+ /* Structure to store a type and conversion function used for casting */
426
+ typedef struct swig_cast_info {
427
+ swig_type_info *type; /* pointer to type that is equivalent to this type */
428
+ swig_converter_func converter; /* function to cast the void pointers */
429
+ struct swig_cast_info *next; /* pointer to next cast in linked list */
430
+ struct swig_cast_info *prev; /* pointer to the previous cast */
431
+ } swig_cast_info;
432
+
433
+ /* Structure used to store module information
434
+ * Each module generates one structure like this, and the runtime collects
435
+ * all of these structures and stores them in a circularly linked list.*/
436
+ typedef struct swig_module_info {
437
+ swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
438
+ size_t size; /* Number of types in this module */
439
+ struct swig_module_info *next; /* Pointer to next element in circularly linked list */
440
+ swig_type_info **type_initial; /* Array of initially generated type structures */
441
+ swig_cast_info **cast_initial; /* Array of initially generated casting structures */
442
+ void *clientdata; /* Language specific module data */
443
+ } swig_module_info;
444
+
445
+ /*
446
+ Compare two type names skipping the space characters, therefore
447
+ "char*" == "char *" and "Class<int>" == "Class<int >", etc.
448
+
449
+ Return 0 when the two name types are equivalent, as in
450
+ strncmp, but skipping ' '.
451
+ */
452
+ SWIGRUNTIME int
453
+ SWIG_TypeNameComp(const char *f1, const char *l1,
454
+ const char *f2, const char *l2) {
455
+ for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
456
+ while ((*f1 == ' ') && (f1 != l1)) ++f1;
457
+ while ((*f2 == ' ') && (f2 != l2)) ++f2;
458
+ if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
459
+ }
460
+ return (int)((l1 - f1) - (l2 - f2));
461
+ }
462
+
463
+ /*
464
+ Check type equivalence in a name list like <name1>|<name2>|...
465
+ Return 0 if not equal, 1 if equal
466
+ */
467
+ SWIGRUNTIME int
468
+ SWIG_TypeEquiv(const char *nb, const char *tb) {
469
+ int equiv = 0;
470
+ const char* te = tb + strlen(tb);
471
+ const char* ne = nb;
472
+ while (!equiv && *ne) {
473
+ for (nb = ne; *ne; ++ne) {
474
+ if (*ne == '|') break;
475
+ }
476
+ equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
477
+ if (*ne) ++ne;
478
+ }
479
+ return equiv;
480
+ }
481
+
482
+ /*
483
+ Check type equivalence in a name list like <name1>|<name2>|...
484
+ Return 0 if equal, -1 if nb < tb, 1 if nb > tb
485
+ */
486
+ SWIGRUNTIME int
487
+ SWIG_TypeCompare(const char *nb, const char *tb) {
488
+ int equiv = 0;
489
+ const char* te = tb + strlen(tb);
490
+ const char* ne = nb;
491
+ while (!equiv && *ne) {
492
+ for (nb = ne; *ne; ++ne) {
493
+ if (*ne == '|') break;
494
+ }
495
+ equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
496
+ if (*ne) ++ne;
497
+ }
498
+ return equiv;
499
+ }
500
+
501
+
502
+ /*
503
+ Check the typename
504
+ */
505
+ SWIGRUNTIME swig_cast_info *
506
+ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
507
+ if (ty) {
508
+ swig_cast_info *iter = ty->cast;
509
+ while (iter) {
510
+ if (strcmp(iter->type->name, c) == 0) {
511
+ if (iter == ty->cast)
512
+ return iter;
513
+ /* Move iter to the top of the linked list */
514
+ iter->prev->next = iter->next;
515
+ if (iter->next)
516
+ iter->next->prev = iter->prev;
517
+ iter->next = ty->cast;
518
+ iter->prev = 0;
519
+ if (ty->cast) ty->cast->prev = iter;
520
+ ty->cast = iter;
521
+ return iter;
522
+ }
523
+ iter = iter->next;
524
+ }
525
+ }
526
+ return 0;
527
+ }
528
+
529
+ /*
530
+ Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
531
+ */
532
+ SWIGRUNTIME swig_cast_info *
533
+ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
534
+ if (ty) {
535
+ swig_cast_info *iter = ty->cast;
536
+ while (iter) {
537
+ if (iter->type == from) {
538
+ if (iter == ty->cast)
539
+ return iter;
540
+ /* Move iter to the top of the linked list */
541
+ iter->prev->next = iter->next;
542
+ if (iter->next)
543
+ iter->next->prev = iter->prev;
544
+ iter->next = ty->cast;
545
+ iter->prev = 0;
546
+ if (ty->cast) ty->cast->prev = iter;
547
+ ty->cast = iter;
548
+ return iter;
549
+ }
550
+ iter = iter->next;
551
+ }
552
+ }
553
+ return 0;
554
+ }
555
+
556
+ /*
557
+ Cast a pointer up an inheritance hierarchy
558
+ */
559
+ SWIGRUNTIMEINLINE void *
560
+ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
561
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
562
+ }
563
+
564
+ /*
565
+ Dynamic pointer casting. Down an inheritance hierarchy
566
+ */
567
+ SWIGRUNTIME swig_type_info *
568
+ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
569
+ swig_type_info *lastty = ty;
570
+ if (!ty || !ty->dcast) return ty;
571
+ while (ty && (ty->dcast)) {
572
+ ty = (*ty->dcast)(ptr);
573
+ if (ty) lastty = ty;
574
+ }
575
+ return lastty;
576
+ }
577
+
578
+ /*
579
+ Return the name associated with this type
580
+ */
581
+ SWIGRUNTIMEINLINE const char *
582
+ SWIG_TypeName(const swig_type_info *ty) {
583
+ return ty->name;
584
+ }
585
+
586
+ /*
587
+ Return the pretty name associated with this type,
588
+ that is an unmangled type name in a form presentable to the user.
589
+ */
590
+ SWIGRUNTIME const char *
591
+ SWIG_TypePrettyName(const swig_type_info *type) {
592
+ /* The "str" field contains the equivalent pretty names of the
593
+ type, separated by vertical-bar characters. We choose
594
+ to print the last name, as it is often (?) the most
595
+ specific. */
596
+ if (!type) return NULL;
597
+ if (type->str != NULL) {
598
+ const char *last_name = type->str;
599
+ const char *s;
600
+ for (s = type->str; *s; s++)
601
+ if (*s == '|') last_name = s+1;
602
+ return last_name;
603
+ }
604
+ else
605
+ return type->name;
606
+ }
607
+
608
+ /*
609
+ Set the clientdata field for a type
610
+ */
611
+ SWIGRUNTIME void
612
+ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
613
+ swig_cast_info *cast = ti->cast;
614
+ /* if (ti->clientdata == clientdata) return; */
615
+ ti->clientdata = clientdata;
616
+
617
+ while (cast) {
618
+ if (!cast->converter) {
619
+ swig_type_info *tc = cast->type;
620
+ if (!tc->clientdata) {
621
+ SWIG_TypeClientData(tc, clientdata);
622
+ }
623
+ }
624
+ cast = cast->next;
625
+ }
626
+ }
627
+ SWIGRUNTIME void
628
+ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
629
+ SWIG_TypeClientData(ti, clientdata);
630
+ ti->owndata = 1;
631
+ }
632
+
633
+ /*
634
+ Search for a swig_type_info structure only by mangled name
635
+ Search is a O(log #types)
636
+
637
+ We start searching at module start, and finish searching when start == end.
638
+ Note: if start == end at the beginning of the function, we go all the way around
639
+ the circular list.
640
+ */
641
+ SWIGRUNTIME swig_type_info *
642
+ SWIG_MangledTypeQueryModule(swig_module_info *start,
643
+ swig_module_info *end,
644
+ const char *name) {
645
+ swig_module_info *iter = start;
646
+ do {
647
+ if (iter->size) {
648
+ register size_t l = 0;
649
+ register size_t r = iter->size - 1;
650
+ do {
651
+ /* since l+r >= 0, we can (>> 1) instead (/ 2) */
652
+ register size_t i = (l + r) >> 1;
653
+ const char *iname = iter->types[i]->name;
654
+ if (iname) {
655
+ register int compare = strcmp(name, iname);
656
+ if (compare == 0) {
657
+ return iter->types[i];
658
+ } else if (compare < 0) {
659
+ if (i) {
660
+ r = i - 1;
661
+ } else {
662
+ break;
663
+ }
664
+ } else if (compare > 0) {
665
+ l = i + 1;
666
+ }
667
+ } else {
668
+ break; /* should never happen */
669
+ }
670
+ } while (l <= r);
671
+ }
672
+ iter = iter->next;
673
+ } while (iter != end);
674
+ return 0;
675
+ }
676
+
677
+ /*
678
+ Search for a swig_type_info structure for either a mangled name or a human readable name.
679
+ It first searches the mangled names of the types, which is a O(log #types)
680
+ If a type is not found it then searches the human readable names, which is O(#types).
681
+
682
+ We start searching at module start, and finish searching when start == end.
683
+ Note: if start == end at the beginning of the function, we go all the way around
684
+ the circular list.
685
+ */
686
+ SWIGRUNTIME swig_type_info *
687
+ SWIG_TypeQueryModule(swig_module_info *start,
688
+ swig_module_info *end,
689
+ const char *name) {
690
+ /* STEP 1: Search the name field using binary search */
691
+ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
692
+ if (ret) {
693
+ return ret;
694
+ } else {
695
+ /* STEP 2: If the type hasn't been found, do a complete search
696
+ of the str field (the human readable name) */
697
+ swig_module_info *iter = start;
698
+ do {
699
+ register size_t i = 0;
700
+ for (; i < iter->size; ++i) {
701
+ if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
702
+ return iter->types[i];
703
+ }
704
+ iter = iter->next;
705
+ } while (iter != end);
706
+ }
707
+
708
+ /* neither found a match */
709
+ return 0;
710
+ }
711
+
712
+ /*
713
+ Pack binary data into a string
714
+ */
715
+ SWIGRUNTIME char *
716
+ SWIG_PackData(char *c, void *ptr, size_t sz) {
717
+ static const char hex[17] = "0123456789abcdef";
718
+ register const unsigned char *u = (unsigned char *) ptr;
719
+ register const unsigned char *eu = u + sz;
720
+ for (; u != eu; ++u) {
721
+ register unsigned char uu = *u;
722
+ *(c++) = hex[(uu & 0xf0) >> 4];
723
+ *(c++) = hex[uu & 0xf];
724
+ }
725
+ return c;
726
+ }
727
+
728
+ /*
729
+ Unpack binary data from a string
730
+ */
731
+ SWIGRUNTIME const char *
732
+ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
733
+ register unsigned char *u = (unsigned char *) ptr;
734
+ register const unsigned char *eu = u + sz;
735
+ for (; u != eu; ++u) {
736
+ register char d = *(c++);
737
+ register unsigned char uu;
738
+ if ((d >= '0') && (d <= '9'))
739
+ uu = ((d - '0') << 4);
740
+ else if ((d >= 'a') && (d <= 'f'))
741
+ uu = ((d - ('a'-10)) << 4);
742
+ else
743
+ return (char *) 0;
744
+ d = *(c++);
745
+ if ((d >= '0') && (d <= '9'))
746
+ uu |= (d - '0');
747
+ else if ((d >= 'a') && (d <= 'f'))
748
+ uu |= (d - ('a'-10));
749
+ else
750
+ return (char *) 0;
751
+ *u = uu;
752
+ }
753
+ return c;
754
+ }
755
+
756
+ /*
757
+ Pack 'void *' into a string buffer.
758
+ */
759
+ SWIGRUNTIME char *
760
+ SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
761
+ char *r = buff;
762
+ if ((2*sizeof(void *) + 2) > bsz) return 0;
763
+ *(r++) = '_';
764
+ r = SWIG_PackData(r,&ptr,sizeof(void *));
765
+ if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
766
+ strcpy(r,name);
767
+ return buff;
768
+ }
769
+
770
+ SWIGRUNTIME const char *
771
+ SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
772
+ if (*c != '_') {
773
+ if (strcmp(c,"NULL") == 0) {
774
+ *ptr = (void *) 0;
775
+ return name;
776
+ } else {
777
+ return 0;
778
+ }
779
+ }
780
+ return SWIG_UnpackData(++c,ptr,sizeof(void *));
781
+ }
782
+
783
+ SWIGRUNTIME char *
784
+ SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
785
+ char *r = buff;
786
+ size_t lname = (name ? strlen(name) : 0);
787
+ if ((2*sz + 2 + lname) > bsz) return 0;
788
+ *(r++) = '_';
789
+ r = SWIG_PackData(r,ptr,sz);
790
+ if (lname) {
791
+ strncpy(r,name,lname+1);
792
+ } else {
793
+ *r = 0;
794
+ }
795
+ return buff;
796
+ }
797
+
798
+ SWIGRUNTIME const char *
799
+ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
800
+ if (*c != '_') {
801
+ if (strcmp(c,"NULL") == 0) {
802
+ memset(ptr,0,sz);
803
+ return name;
804
+ } else {
805
+ return 0;
806
+ }
807
+ }
808
+ return SWIG_UnpackData(++c,ptr,sz);
809
+ }
810
+
811
+ #ifdef __cplusplus
812
+ }
813
+ #endif
814
+
815
+ /* Errors in SWIG */
816
+ #define SWIG_UnknownError -1
817
+ #define SWIG_IOError -2
818
+ #define SWIG_RuntimeError -3
819
+ #define SWIG_IndexError -4
820
+ #define SWIG_TypeError -5
821
+ #define SWIG_DivisionByZero -6
822
+ #define SWIG_OverflowError -7
823
+ #define SWIG_SyntaxError -8
824
+ #define SWIG_ValueError -9
825
+ #define SWIG_SystemError -10
826
+ #define SWIG_AttributeError -11
827
+ #define SWIG_MemoryError -12
828
+ #define SWIG_NullReferenceError -13
829
+
830
+
831
+
832
+ #include <ruby.h>
833
+
834
+ /* Remove global macros defined in Ruby's win32.h */
835
+ #ifdef write
836
+ # undef write
837
+ #endif
838
+ #ifdef read
839
+ # undef read
840
+ #endif
841
+ #ifdef bind
842
+ # undef bind
843
+ #endif
844
+
845
+
846
+ /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
847
+ #ifndef NUM2LL
848
+ #define NUM2LL(x) NUM2LONG((x))
849
+ #endif
850
+ #ifndef LL2NUM
851
+ #define LL2NUM(x) INT2NUM((long) (x))
852
+ #endif
853
+ #ifndef ULL2NUM
854
+ #define ULL2NUM(x) UINT2NUM((unsigned long) (x))
855
+ #endif
856
+
857
+ /* Ruby 1.7 doesn't (yet) define NUM2ULL() */
858
+ #ifndef NUM2ULL
859
+ #ifdef HAVE_LONG_LONG
860
+ #define NUM2ULL(x) rb_num2ull((x))
861
+ #else
862
+ #define NUM2ULL(x) NUM2ULONG(x)
863
+ #endif
864
+ #endif
865
+
866
+ /* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */
867
+ /* Define these for older versions so we can just write code the new way */
868
+ #ifndef RSTRING_LEN
869
+ # define RSTRING_LEN(x) RSTRING(x)->len
870
+ #endif
871
+ #ifndef RSTRING_PTR
872
+ # define RSTRING_PTR(x) RSTRING(x)->ptr
873
+ #endif
874
+ #ifndef RSTRING_END
875
+ # define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
876
+ #endif
877
+ #ifndef RARRAY_LEN
878
+ # define RARRAY_LEN(x) RARRAY(x)->len
879
+ #endif
880
+ #ifndef RARRAY_PTR
881
+ # define RARRAY_PTR(x) RARRAY(x)->ptr
882
+ #endif
883
+ #ifndef RFLOAT_VALUE
884
+ # define RFLOAT_VALUE(x) RFLOAT(x)->value
885
+ #endif
886
+ #ifndef DOUBLE2NUM
887
+ # define DOUBLE2NUM(x) rb_float_new(x)
888
+ #endif
889
+ #ifndef RHASH_TBL
890
+ # define RHASH_TBL(x) (RHASH(x)->tbl)
891
+ #endif
892
+ #ifndef RHASH_ITER_LEV
893
+ # define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
894
+ #endif
895
+ #ifndef RHASH_IFNONE
896
+ # define RHASH_IFNONE(x) (RHASH(x)->ifnone)
897
+ #endif
898
+ #ifndef RHASH_SIZE
899
+ # define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
900
+ #endif
901
+ #ifndef RHASH_EMPTY_P
902
+ # define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
903
+ #endif
904
+ #ifndef RSTRUCT_LEN
905
+ # define RSTRUCT_LEN(x) RSTRUCT(x)->len
906
+ #endif
907
+ #ifndef RSTRUCT_PTR
908
+ # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
909
+ #endif
910
+
911
+
912
+
913
+ /*
914
+ * Need to be very careful about how these macros are defined, especially
915
+ * when compiling C++ code or C code with an ANSI C compiler.
916
+ *
917
+ * VALUEFUNC(f) is a macro used to typecast a C function that implements
918
+ * a Ruby method so that it can be passed as an argument to API functions
919
+ * like rb_define_method() and rb_define_singleton_method().
920
+ *
921
+ * VOIDFUNC(f) is a macro used to typecast a C function that implements
922
+ * either the "mark" or "free" stuff for a Ruby Data object, so that it
923
+ * can be passed as an argument to API functions like Data_Wrap_Struct()
924
+ * and Data_Make_Struct().
925
+ */
926
+
927
+ #ifdef __cplusplus
928
+ # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
929
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
930
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
931
+ # define VOIDFUNC(f) ((void (*)()) f)
932
+ # else
933
+ # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
934
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
935
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
936
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
937
+ # else /* These definitions should work for Ruby 1.7+ */
938
+ # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
939
+ # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
940
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
941
+ # endif
942
+ # endif
943
+ #else
944
+ # define VALUEFUNC(f) (f)
945
+ # define VOIDFUNC(f) (f)
946
+ #endif
947
+
948
+ /* Don't use for expressions have side effect */
949
+ #ifndef RB_STRING_VALUE
950
+ #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
951
+ #endif
952
+ #ifndef StringValue
953
+ #define StringValue(s) RB_STRING_VALUE(s)
954
+ #endif
955
+ #ifndef StringValuePtr
956
+ #define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
957
+ #endif
958
+ #ifndef StringValueLen
959
+ #define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
960
+ #endif
961
+ #ifndef SafeStringValue
962
+ #define SafeStringValue(v) do {\
963
+ StringValue(v);\
964
+ rb_check_safe_str(v);\
965
+ } while (0)
966
+ #endif
967
+
968
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
969
+ #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
970
+ #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
971
+ #endif
972
+
973
+ static VALUE _mSWIG = Qnil;
974
+
975
+ /* -----------------------------------------------------------------------------
976
+ * error manipulation
977
+ * ----------------------------------------------------------------------------- */
978
+
979
+
980
+ /* Define some additional error types */
981
+ #define SWIG_ObjectPreviouslyDeletedError -100
982
+
983
+
984
+ /* Define custom exceptions for errors that do not map to existing Ruby
985
+ exceptions. Note this only works for C++ since a global cannot be
986
+ initialized by a funtion in C. For C, fallback to rb_eRuntimeError.*/
987
+
988
+ SWIGINTERN VALUE
989
+ getNullReferenceError(void) {
990
+ static int init = 0;
991
+ static VALUE rb_eNullReferenceError ;
992
+ if (!init) {
993
+ init = 1;
994
+ rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
995
+ }
996
+ return rb_eNullReferenceError;
997
+ }
998
+
999
+ SWIGINTERN VALUE
1000
+ getObjectPreviouslyDeletedError(void) {
1001
+ static int init = 0;
1002
+ static VALUE rb_eObjectPreviouslyDeleted ;
1003
+ if (!init) {
1004
+ init = 1;
1005
+ rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
1006
+ }
1007
+ return rb_eObjectPreviouslyDeleted;
1008
+ }
1009
+
1010
+
1011
+ SWIGINTERN VALUE
1012
+ SWIG_Ruby_ErrorType(int SWIG_code) {
1013
+ VALUE type;
1014
+ switch (SWIG_code) {
1015
+ case SWIG_MemoryError:
1016
+ type = rb_eNoMemError;
1017
+ break;
1018
+ case SWIG_IOError:
1019
+ type = rb_eIOError;
1020
+ break;
1021
+ case SWIG_RuntimeError:
1022
+ type = rb_eRuntimeError;
1023
+ break;
1024
+ case SWIG_IndexError:
1025
+ type = rb_eIndexError;
1026
+ break;
1027
+ case SWIG_TypeError:
1028
+ type = rb_eTypeError;
1029
+ break;
1030
+ case SWIG_DivisionByZero:
1031
+ type = rb_eZeroDivError;
1032
+ break;
1033
+ case SWIG_OverflowError:
1034
+ type = rb_eRangeError;
1035
+ break;
1036
+ case SWIG_SyntaxError:
1037
+ type = rb_eSyntaxError;
1038
+ break;
1039
+ case SWIG_ValueError:
1040
+ type = rb_eArgError;
1041
+ break;
1042
+ case SWIG_SystemError:
1043
+ type = rb_eFatal;
1044
+ break;
1045
+ case SWIG_AttributeError:
1046
+ type = rb_eRuntimeError;
1047
+ break;
1048
+ case SWIG_NullReferenceError:
1049
+ type = getNullReferenceError();
1050
+ break;
1051
+ case SWIG_ObjectPreviouslyDeletedError:
1052
+ type = getObjectPreviouslyDeletedError();
1053
+ break;
1054
+ case SWIG_UnknownError:
1055
+ type = rb_eRuntimeError;
1056
+ break;
1057
+ default:
1058
+ type = rb_eRuntimeError;
1059
+ }
1060
+ return type;
1061
+ }
1062
+
1063
+
1064
+ /* This function is called when a user inputs a wrong argument to
1065
+ a method.
1066
+ */
1067
+ SWIGINTERN
1068
+ const char* Ruby_Format_TypeError( const char* msg,
1069
+ const char* type,
1070
+ const char* name,
1071
+ const int argn,
1072
+ VALUE input )
1073
+ {
1074
+ char buf[128];
1075
+ VALUE str;
1076
+ VALUE asStr;
1077
+ if ( msg && *msg )
1078
+ {
1079
+ str = rb_str_new2(msg);
1080
+ }
1081
+ else
1082
+ {
1083
+ str = rb_str_new(NULL, 0);
1084
+ }
1085
+
1086
+ str = rb_str_cat2( str, "Expected argument " );
1087
+ sprintf( buf, "%d of type ", argn-1 );
1088
+ str = rb_str_cat2( str, buf );
1089
+ str = rb_str_cat2( str, type );
1090
+ str = rb_str_cat2( str, ", but got " );
1091
+ str = rb_str_cat2( str, rb_obj_classname(input) );
1092
+ str = rb_str_cat2( str, " " );
1093
+ asStr = rb_inspect(input);
1094
+ if ( RSTRING_LEN(asStr) > 30 )
1095
+ {
1096
+ str = rb_str_cat( str, StringValuePtr(asStr), 30 );
1097
+ str = rb_str_cat2( str, "..." );
1098
+ }
1099
+ else
1100
+ {
1101
+ str = rb_str_append( str, asStr );
1102
+ }
1103
+
1104
+ if ( name )
1105
+ {
1106
+ str = rb_str_cat2( str, "\n\tin SWIG method '" );
1107
+ str = rb_str_cat2( str, name );
1108
+ str = rb_str_cat2( str, "'" );
1109
+ }
1110
+
1111
+ return StringValuePtr( str );
1112
+ }
1113
+
1114
+ /* This function is called when an overloaded method fails */
1115
+ SWIGINTERN
1116
+ void Ruby_Format_OverloadedError(
1117
+ const int argc,
1118
+ const int maxargs,
1119
+ const char* method,
1120
+ const char* prototypes
1121
+ )
1122
+ {
1123
+ const char* msg = "Wrong # of arguments";
1124
+ if ( argc <= maxargs ) msg = "Wrong arguments";
1125
+ rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"
1126
+ "Possible C/C++ prototypes are:\n%s",
1127
+ msg, method, prototypes);
1128
+ }
1129
+
1130
+ /* -----------------------------------------------------------------------------
1131
+ * See the LICENSE file for information on copyright, usage and redistribution
1132
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
1133
+ *
1134
+ * rubytracking.swg
1135
+ *
1136
+ * This file contains support for tracking mappings from
1137
+ * Ruby objects to C++ objects. This functionality is needed
1138
+ * to implement mark functions for Ruby's mark and sweep
1139
+ * garbage collector.
1140
+ * ----------------------------------------------------------------------------- */
1141
+
1142
+ #ifdef __cplusplus
1143
+ extern "C" {
1144
+ #endif
1145
+
1146
+ /* Ruby 1.8 actually assumes the first case. */
1147
+ #if SIZEOF_VOIDP == SIZEOF_LONG
1148
+ # define SWIG2NUM(v) LONG2NUM((unsigned long)v)
1149
+ # define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
1150
+ #elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
1151
+ # define SWIG2NUM(v) LL2NUM((unsigned long long)v)
1152
+ # define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
1153
+ #else
1154
+ # error sizeof(void*) is not the same as long or long long
1155
+ #endif
1156
+
1157
+
1158
+ /* Global Ruby hash table to store Trackings from C/C++
1159
+ structs to Ruby Objects.
1160
+ */
1161
+ static VALUE swig_ruby_trackings = Qnil;
1162
+
1163
+ /* Global variable that stores a reference to the ruby
1164
+ hash table delete function. */
1165
+ static ID swig_ruby_hash_delete;
1166
+
1167
+ /* Setup a Ruby hash table to store Trackings */
1168
+ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1169
+ /* Create a ruby hash table to store Trackings from C++
1170
+ objects to Ruby objects. */
1171
+
1172
+ /* Try to see if some other .so has already created a
1173
+ tracking hash table, which we keep hidden in an instance var
1174
+ in the SWIG module.
1175
+ This is done to allow multiple DSOs to share the same
1176
+ tracking table.
1177
+ */
1178
+ ID trackings_id = rb_intern( "@__trackings__" );
1179
+ VALUE verbose = rb_gv_get("VERBOSE");
1180
+ rb_gv_set("VERBOSE", Qfalse);
1181
+ swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
1182
+ rb_gv_set("VERBOSE", verbose);
1183
+
1184
+ /* No, it hasn't. Create one ourselves */
1185
+ if ( swig_ruby_trackings == Qnil )
1186
+ {
1187
+ swig_ruby_trackings = rb_hash_new();
1188
+ rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
1189
+ }
1190
+
1191
+ /* Now store a reference to the hash table delete function
1192
+ so that we only have to look it up once.*/
1193
+ swig_ruby_hash_delete = rb_intern("delete");
1194
+ }
1195
+
1196
+ /* Get a Ruby number to reference a pointer */
1197
+ SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
1198
+ /* We cast the pointer to an unsigned long
1199
+ and then store a reference to it using
1200
+ a Ruby number object. */
1201
+
1202
+ /* Convert the pointer to a Ruby number */
1203
+ return SWIG2NUM(ptr);
1204
+ }
1205
+
1206
+ /* Get a Ruby number to reference an object */
1207
+ SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
1208
+ /* We cast the object to an unsigned long
1209
+ and then store a reference to it using
1210
+ a Ruby number object. */
1211
+
1212
+ /* Convert the Object to a Ruby number */
1213
+ return SWIG2NUM(object);
1214
+ }
1215
+
1216
+ /* Get a Ruby object from a previously stored reference */
1217
+ SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
1218
+ /* The provided Ruby number object is a reference
1219
+ to the Ruby object we want.*/
1220
+
1221
+ /* Convert the Ruby number to a Ruby object */
1222
+ return NUM2SWIG(reference);
1223
+ }
1224
+
1225
+ /* Add a Tracking from a C/C++ struct to a Ruby object */
1226
+ SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
1227
+ /* In a Ruby hash table we store the pointer and
1228
+ the associated Ruby object. The trick here is
1229
+ that we cannot store the Ruby object directly - if
1230
+ we do then it cannot be garbage collected. So
1231
+ instead we typecast it as a unsigned long and
1232
+ convert it to a Ruby number object.*/
1233
+
1234
+ /* Get a reference to the pointer as a Ruby number */
1235
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1236
+
1237
+ /* Get a reference to the Ruby object as a Ruby number */
1238
+ VALUE value = SWIG_RubyObjectToReference(object);
1239
+
1240
+ /* Store the mapping to the global hash table. */
1241
+ rb_hash_aset(swig_ruby_trackings, key, value);
1242
+ }
1243
+
1244
+ /* Get the Ruby object that owns the specified C/C++ struct */
1245
+ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1246
+ /* Get a reference to the pointer as a Ruby number */
1247
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1248
+
1249
+ /* Now lookup the value stored in the global hash table */
1250
+ VALUE value = rb_hash_aref(swig_ruby_trackings, key);
1251
+
1252
+ if (value == Qnil) {
1253
+ /* No object exists - return nil. */
1254
+ return Qnil;
1255
+ }
1256
+ else {
1257
+ /* Convert this value to Ruby object */
1258
+ return SWIG_RubyReferenceToObject(value);
1259
+ }
1260
+ }
1261
+
1262
+ /* Remove a Tracking from a C/C++ struct to a Ruby object. It
1263
+ is very important to remove objects once they are destroyed
1264
+ since the same memory address may be reused later to create
1265
+ a new object. */
1266
+ SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
1267
+ /* Get a reference to the pointer as a Ruby number */
1268
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1269
+
1270
+ /* Delete the object from the hash table by calling Ruby's
1271
+ do this we need to call the Hash.delete method.*/
1272
+ rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
1273
+ }
1274
+
1275
+ /* This is a helper method that unlinks a Ruby object from its
1276
+ underlying C++ object. This is needed if the lifetime of the
1277
+ Ruby object is longer than the C++ object */
1278
+ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1279
+ VALUE object = SWIG_RubyInstanceFor(ptr);
1280
+
1281
+ if (object != Qnil) {
1282
+ DATA_PTR(object) = 0;
1283
+ }
1284
+ }
1285
+
1286
+
1287
+ #ifdef __cplusplus
1288
+ }
1289
+ #endif
1290
+
1291
+ /* -----------------------------------------------------------------------------
1292
+ * Ruby API portion that goes into the runtime
1293
+ * ----------------------------------------------------------------------------- */
1294
+
1295
+ #ifdef __cplusplus
1296
+ extern "C" {
1297
+ #endif
1298
+
1299
+ SWIGINTERN VALUE
1300
+ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1301
+ if (NIL_P(target)) {
1302
+ target = o;
1303
+ } else {
1304
+ if (TYPE(target) != T_ARRAY) {
1305
+ VALUE o2 = target;
1306
+ target = rb_ary_new();
1307
+ rb_ary_push(target, o2);
1308
+ }
1309
+ rb_ary_push(target, o);
1310
+ }
1311
+ return target;
1312
+ }
1313
+
1314
+ /* For ruby1.8.4 and earlier. */
1315
+ #ifndef RUBY_INIT_STACK
1316
+ RUBY_EXTERN void Init_stack(VALUE* addr);
1317
+ # define RUBY_INIT_STACK \
1318
+ VALUE variable_in_this_stack_frame; \
1319
+ Init_stack(&variable_in_this_stack_frame);
1320
+ #endif
1321
+
1322
+
1323
+ #ifdef __cplusplus
1324
+ }
1325
+ #endif
1326
+
1327
+
1328
+ /* -----------------------------------------------------------------------------
1329
+ * See the LICENSE file for information on copyright, usage and redistribution
1330
+ * of SWIG, and the README file for authors - http://www.swig.org/release.html.
1331
+ *
1332
+ * rubyrun.swg
1333
+ *
1334
+ * This file contains the runtime support for Ruby modules
1335
+ * and includes code for managing global variables and pointer
1336
+ * type checking.
1337
+ * ----------------------------------------------------------------------------- */
1338
+
1339
+ /* For backward compatibility only */
1340
+ #define SWIG_POINTER_EXCEPTION 0
1341
+
1342
+ /* for raw pointers */
1343
+ #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1344
+ #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1345
+ #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
1346
+ #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
1347
+ #define swig_owntype ruby_owntype
1348
+
1349
+ /* for raw packed data */
1350
+ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
1351
+ #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1352
+
1353
+ /* for class or struct pointers */
1354
+ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1355
+ #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1356
+
1357
+ /* for C or C++ function pointers */
1358
+ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
1359
+ #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
1360
+
1361
+ /* for C++ member pointers, ie, member methods */
1362
+ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
1363
+ #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1364
+
1365
+
1366
+ /* Runtime API */
1367
+
1368
+ #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule()
1369
+ #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
1370
+
1371
+
1372
+ /* Error manipulation */
1373
+
1374
+ #define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
1375
+ #define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg)
1376
+ #define SWIG_fail goto fail
1377
+
1378
+
1379
+ /* Ruby-specific SWIG API */
1380
+
1381
+ #define SWIG_InitRuntime() SWIG_Ruby_InitRuntime()
1382
+ #define SWIG_define_class(ty) SWIG_Ruby_define_class(ty)
1383
+ #define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty)
1384
+ #define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
1385
+ #define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
1386
+
1387
+ #include "assert.h"
1388
+
1389
+ /* -----------------------------------------------------------------------------
1390
+ * pointers/data manipulation
1391
+ * ----------------------------------------------------------------------------- */
1392
+
1393
+ #ifdef __cplusplus
1394
+ extern "C" {
1395
+ #endif
1396
+
1397
+ typedef struct {
1398
+ VALUE klass;
1399
+ VALUE mImpl;
1400
+ void (*mark)(void *);
1401
+ void (*destroy)(void *);
1402
+ int trackObjects;
1403
+ } swig_class;
1404
+
1405
+
1406
+ /* Global pointer used to keep some internal SWIG stuff */
1407
+ static VALUE _cSWIG_Pointer = Qnil;
1408
+ static VALUE swig_runtime_data_type_pointer = Qnil;
1409
+
1410
+ /* Global IDs used to keep some internal SWIG stuff */
1411
+ static ID swig_arity_id = 0;
1412
+ static ID swig_call_id = 0;
1413
+
1414
+ /*
1415
+ If your swig extension is to be run within an embedded ruby and has
1416
+ director callbacks, you should set -DRUBY_EMBEDDED during compilation.
1417
+ This will reset ruby's stack frame on each entry point from the main
1418
+ program the first time a virtual director function is invoked (in a
1419
+ non-recursive way).
1420
+ If this is not done, you run the risk of Ruby trashing the stack.
1421
+ */
1422
+
1423
+ #ifdef RUBY_EMBEDDED
1424
+
1425
+ # define SWIG_INIT_STACK \
1426
+ if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
1427
+ ++swig_virtual_calls;
1428
+ # define SWIG_RELEASE_STACK --swig_virtual_calls;
1429
+ # define Ruby_DirectorTypeMismatchException(x) \
1430
+ rb_raise( rb_eTypeError, x ); return c_result;
1431
+
1432
+ static unsigned int swig_virtual_calls = 0;
1433
+
1434
+ #else /* normal non-embedded extension */
1435
+
1436
+ # define SWIG_INIT_STACK
1437
+ # define SWIG_RELEASE_STACK
1438
+ # define Ruby_DirectorTypeMismatchException(x) \
1439
+ throw Swig::DirectorTypeMismatchException( x );
1440
+
1441
+ #endif /* RUBY_EMBEDDED */
1442
+
1443
+
1444
+ SWIGRUNTIME VALUE
1445
+ getExceptionClass(void) {
1446
+ static int init = 0;
1447
+ static VALUE rubyExceptionClass ;
1448
+ if (!init) {
1449
+ init = 1;
1450
+ rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
1451
+ }
1452
+ return rubyExceptionClass;
1453
+ }
1454
+
1455
+ /* This code checks to see if the Ruby object being raised as part
1456
+ of an exception inherits from the Ruby class Exception. If so,
1457
+ the object is simply returned. If not, then a new Ruby exception
1458
+ object is created and that will be returned to Ruby.*/
1459
+ SWIGRUNTIME VALUE
1460
+ SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
1461
+ VALUE exceptionClass = getExceptionClass();
1462
+ if (rb_obj_is_kind_of(obj, exceptionClass)) {
1463
+ return obj;
1464
+ } else {
1465
+ return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
1466
+ }
1467
+ }
1468
+
1469
+ /* Initialize Ruby runtime support */
1470
+ SWIGRUNTIME void
1471
+ SWIG_Ruby_InitRuntime(void)
1472
+ {
1473
+ if (_mSWIG == Qnil) {
1474
+ _mSWIG = rb_define_module("SWIG");
1475
+ swig_call_id = rb_intern("call");
1476
+ swig_arity_id = rb_intern("arity");
1477
+ }
1478
+ }
1479
+
1480
+ /* Define Ruby class for C type */
1481
+ SWIGRUNTIME void
1482
+ SWIG_Ruby_define_class(swig_type_info *type)
1483
+ {
1484
+ VALUE klass;
1485
+ char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1486
+ sprintf(klass_name, "TYPE%s", type->name);
1487
+ if (NIL_P(_cSWIG_Pointer)) {
1488
+ _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1489
+ rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1490
+ }
1491
+ klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1492
+ free((void *) klass_name);
1493
+ }
1494
+
1495
+ /* Create a new pointer object */
1496
+ SWIGRUNTIME VALUE
1497
+ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1498
+ {
1499
+ int own = flags & SWIG_POINTER_OWN;
1500
+ int track;
1501
+ char *klass_name;
1502
+ swig_class *sklass;
1503
+ VALUE klass;
1504
+ VALUE obj;
1505
+
1506
+ if (!ptr)
1507
+ return Qnil;
1508
+
1509
+ if (type->clientdata) {
1510
+ sklass = (swig_class *) type->clientdata;
1511
+
1512
+ /* Are we tracking this class and have we already returned this Ruby object? */
1513
+ track = sklass->trackObjects;
1514
+ if (track) {
1515
+ obj = SWIG_RubyInstanceFor(ptr);
1516
+
1517
+ /* Check the object's type and make sure it has the correct type.
1518
+ It might not in cases where methods do things like
1519
+ downcast methods. */
1520
+ if (obj != Qnil) {
1521
+ VALUE value = rb_iv_get(obj, "@__swigtype__");
1522
+ char* type_name = RSTRING_PTR(value);
1523
+
1524
+ if (strcmp(type->name, type_name) == 0) {
1525
+ return obj;
1526
+ }
1527
+ }
1528
+ }
1529
+
1530
+ /* Create a new Ruby object */
1531
+ obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
1532
+ ( own ? VOIDFUNC(sklass->destroy) :
1533
+ (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
1534
+ ), ptr);
1535
+
1536
+ /* If tracking is on for this class then track this object. */
1537
+ if (track) {
1538
+ SWIG_RubyAddTracking(ptr, obj);
1539
+ }
1540
+ } else {
1541
+ klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1542
+ sprintf(klass_name, "TYPE%s", type->name);
1543
+ klass = rb_const_get(_mSWIG, rb_intern(klass_name));
1544
+ free((void *) klass_name);
1545
+ obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1546
+ }
1547
+ rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1548
+
1549
+ return obj;
1550
+ }
1551
+
1552
+ /* Create a new class instance (always owned) */
1553
+ SWIGRUNTIME VALUE
1554
+ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
1555
+ {
1556
+ VALUE obj;
1557
+ swig_class *sklass = (swig_class *) type->clientdata;
1558
+ obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
1559
+ rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1560
+ return obj;
1561
+ }
1562
+
1563
+ /* Get type mangle from class name */
1564
+ SWIGRUNTIMEINLINE char *
1565
+ SWIG_Ruby_MangleStr(VALUE obj)
1566
+ {
1567
+ VALUE stype = rb_iv_get(obj, "@__swigtype__");
1568
+ return StringValuePtr(stype);
1569
+ }
1570
+
1571
+ /* Acquire a pointer value */
1572
+ typedef void (*ruby_owntype)(void*);
1573
+
1574
+ SWIGRUNTIME ruby_owntype
1575
+ SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
1576
+ if (obj) {
1577
+ ruby_owntype oldown = RDATA(obj)->dfree;
1578
+ RDATA(obj)->dfree = own;
1579
+ return oldown;
1580
+ } else {
1581
+ return 0;
1582
+ }
1583
+ }
1584
+
1585
+ /* Convert a pointer value */
1586
+ SWIGRUNTIME int
1587
+ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
1588
+ {
1589
+ char *c;
1590
+ swig_cast_info *tc;
1591
+ void *vptr = 0;
1592
+
1593
+ /* Grab the pointer */
1594
+ if (NIL_P(obj)) {
1595
+ *ptr = 0;
1596
+ return SWIG_OK;
1597
+ } else {
1598
+ if (TYPE(obj) != T_DATA) {
1599
+ return SWIG_ERROR;
1600
+ }
1601
+ Data_Get_Struct(obj, void, vptr);
1602
+ }
1603
+
1604
+ if (own) *own = RDATA(obj)->dfree;
1605
+
1606
+ /* Check to see if the input object is giving up ownership
1607
+ of the underlying C struct or C++ object. If so then we
1608
+ need to reset the destructor since the Ruby object no
1609
+ longer owns the underlying C++ object.*/
1610
+ if (flags & SWIG_POINTER_DISOWN) {
1611
+ /* Is tracking on for this class? */
1612
+ int track = 0;
1613
+ if (ty && ty->clientdata) {
1614
+ swig_class *sklass = (swig_class *) ty->clientdata;
1615
+ track = sklass->trackObjects;
1616
+ }
1617
+
1618
+ if (track) {
1619
+ /* We are tracking objects for this class. Thus we change the destructor
1620
+ * to SWIG_RubyRemoveTracking. This allows us to
1621
+ * remove the mapping from the C++ to Ruby object
1622
+ * when the Ruby object is garbage collected. If we don't
1623
+ * do this, then it is possible we will return a reference
1624
+ * to a Ruby object that no longer exists thereby crashing Ruby. */
1625
+ RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
1626
+ } else {
1627
+ RDATA(obj)->dfree = 0;
1628
+ }
1629
+ }
1630
+
1631
+ /* Do type-checking if type info was provided */
1632
+ if (ty) {
1633
+ if (ty->clientdata) {
1634
+ if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
1635
+ if (vptr == 0) {
1636
+ /* The object has already been deleted */
1637
+ return SWIG_ObjectPreviouslyDeletedError;
1638
+ }
1639
+ *ptr = vptr;
1640
+ return SWIG_OK;
1641
+ }
1642
+ }
1643
+ if ((c = SWIG_MangleStr(obj)) == NULL) {
1644
+ return SWIG_ERROR;
1645
+ }
1646
+ tc = SWIG_TypeCheck(c, ty);
1647
+ if (!tc) {
1648
+ return SWIG_ERROR;
1649
+ } else {
1650
+ int newmemory = 0;
1651
+ *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
1652
+ assert(!newmemory); /* newmemory handling not yet implemented */
1653
+ }
1654
+ } else {
1655
+ *ptr = vptr;
1656
+ }
1657
+
1658
+ return SWIG_OK;
1659
+ }
1660
+
1661
+ /* Check convert */
1662
+ SWIGRUNTIMEINLINE int
1663
+ SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
1664
+ {
1665
+ char *c = SWIG_MangleStr(obj);
1666
+ if (!c) return 0;
1667
+ return SWIG_TypeCheck(c,ty) != 0;
1668
+ }
1669
+
1670
+ SWIGRUNTIME VALUE
1671
+ SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1672
+ char result[1024];
1673
+ char *r = result;
1674
+ if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
1675
+ *(r++) = '_';
1676
+ r = SWIG_PackData(r, ptr, sz);
1677
+ strcpy(r, type->name);
1678
+ return rb_str_new2(result);
1679
+ }
1680
+
1681
+ /* Convert a packed value value */
1682
+ SWIGRUNTIME int
1683
+ SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1684
+ swig_cast_info *tc;
1685
+ const char *c;
1686
+
1687
+ if (TYPE(obj) != T_STRING) goto type_error;
1688
+ c = StringValuePtr(obj);
1689
+ /* Pointer values must start with leading underscore */
1690
+ if (*c != '_') goto type_error;
1691
+ c++;
1692
+ c = SWIG_UnpackData(c, ptr, sz);
1693
+ if (ty) {
1694
+ tc = SWIG_TypeCheck(c, ty);
1695
+ if (!tc) goto type_error;
1696
+ }
1697
+ return SWIG_OK;
1698
+
1699
+ type_error:
1700
+ return SWIG_ERROR;
1701
+ }
1702
+
1703
+ SWIGRUNTIME swig_module_info *
1704
+ SWIG_Ruby_GetModule(void)
1705
+ {
1706
+ VALUE pointer;
1707
+ swig_module_info *ret = 0;
1708
+ VALUE verbose = rb_gv_get("VERBOSE");
1709
+
1710
+ /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
1711
+ rb_gv_set("VERBOSE", Qfalse);
1712
+
1713
+ /* first check if pointer already created */
1714
+ pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1715
+ if (pointer != Qnil) {
1716
+ Data_Get_Struct(pointer, swig_module_info, ret);
1717
+ }
1718
+
1719
+ /* reinstate warnings */
1720
+ rb_gv_set("VERBOSE", verbose);
1721
+ return ret;
1722
+ }
1723
+
1724
+ SWIGRUNTIME void
1725
+ SWIG_Ruby_SetModule(swig_module_info *pointer)
1726
+ {
1727
+ /* register a new class */
1728
+ VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1729
+ /* create and store the structure pointer to a global variable */
1730
+ swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1731
+ rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
1732
+ }
1733
+
1734
+ /* This function can be used to check whether a proc or method or similarly
1735
+ callable function has been passed. Usually used in a %typecheck, like:
1736
+
1737
+ %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
1738
+ $result = SWIG_Ruby_isCallable( $input );
1739
+ }
1740
+ */
1741
+ SWIGINTERN
1742
+ int SWIG_Ruby_isCallable( VALUE proc )
1743
+ {
1744
+ if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
1745
+ return 1;
1746
+ return 0;
1747
+ }
1748
+
1749
+ /* This function can be used to check the arity (number of arguments)
1750
+ a proc or method can take. Usually used in a %typecheck.
1751
+ Valid arities will be that equal to minimal or those < 0
1752
+ which indicate a variable number of parameters at the end.
1753
+ */
1754
+ SWIGINTERN
1755
+ int SWIG_Ruby_arity( VALUE proc, int minimal )
1756
+ {
1757
+ if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
1758
+ {
1759
+ VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1760
+ int arity = NUM2INT(num);
1761
+ if ( arity < 0 && (arity+1) < -minimal ) return 1;
1762
+ if ( arity == minimal ) return 1;
1763
+ return 1;
1764
+ }
1765
+ return 0;
1766
+ }
1767
+
1768
+
1769
+ #ifdef __cplusplus
1770
+ }
1771
+ #endif
1772
+
1773
+
1774
+
1775
+ #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1776
+
1777
+ #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1778
+
1779
+
1780
+
1781
+ /* -------- TYPES TABLE (BEGIN) -------- */
1782
+
1783
+ #define SWIGTYPE_p_CallbackData swig_types[0]
1784
+ #define SWIGTYPE_p_char swig_types[1]
1785
+ #define SWIGTYPE_p_f_p_sqlite3_context__void swig_types[2]
1786
+ #define SWIGTYPE_p_f_p_sqlite3_context_int_p_p_sqlite3_value__void swig_types[3]
1787
+ #define SWIGTYPE_p_f_p_void__void swig_types[4]
1788
+ #define SWIGTYPE_p_f_p_void_int__int swig_types[5]
1789
+ #define SWIGTYPE_p_f_p_void_int_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char__int swig_types[6]
1790
+ #define SWIGTYPE_p_f_p_void_p_q_const__char__void swig_types[7]
1791
+ #define SWIGTYPE_p_p_char swig_types[8]
1792
+ #define SWIGTYPE_p_p_sqlite3 swig_types[9]
1793
+ #define SWIGTYPE_p_p_sqlite3_stmt swig_types[10]
1794
+ #define SWIGTYPE_p_p_void swig_types[11]
1795
+ #define SWIGTYPE_p_sqlite3 swig_types[12]
1796
+ #define SWIGTYPE_p_sqlite3_context swig_types[13]
1797
+ #define SWIGTYPE_p_sqlite3_stmt swig_types[14]
1798
+ #define SWIGTYPE_p_sqlite3_value swig_types[15]
1799
+ #define SWIGTYPE_p_sqlite_int64 swig_types[16]
1800
+ #define SWIGTYPE_p_void swig_types[17]
1801
+ static swig_type_info *swig_types[19];
1802
+ static swig_module_info swig_module = {swig_types, 18, 0, 0, 0, 0};
1803
+ #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1804
+ #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1805
+
1806
+ /* -------- TYPES TABLE (END) -------- */
1807
+
1808
+ #define SWIG_init Init_API
1809
+ #define SWIG_name "SQLite3::Driver::Native::API"
1810
+
1811
+ static VALUE mAPI;
1812
+
1813
+ #define SWIG_RUBY_THREAD_BEGIN_BLOCK
1814
+ #define SWIG_RUBY_THREAD_END_BLOCK
1815
+
1816
+
1817
+ #define SWIGVERSION 0x010339
1818
+ #define SWIG_VERSION SWIGVERSION
1819
+
1820
+
1821
+ #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1822
+ #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1823
+
1824
+
1825
+ #ifdef __cplusplus
1826
+ extern "C" {
1827
+ #endif
1828
+
1829
+ // Ruby 1.9 changed the file name of this header
1830
+ #ifdef HAVE_RUBY_IO_H
1831
+ #include "ruby/io.h"
1832
+ #else
1833
+ #include "rubyio.h"
1834
+ #endif
1835
+
1836
+ #ifdef __cplusplus
1837
+ }
1838
+ #endif
1839
+
1840
+
1841
+ #ifdef __cplusplus
1842
+ extern "C" {
1843
+ #endif
1844
+ #ifdef HAVE_SYS_TIME_H
1845
+ # include <sys/time.h>
1846
+ struct timeval rb_time_timeval(VALUE);
1847
+ #endif
1848
+ #ifdef __cplusplus
1849
+ }
1850
+ #endif
1851
+
1852
+
1853
+ #include <sqlite3.h>
1854
+ #include "ruby.h"
1855
+
1856
+ #ifndef RSTRING_PTR
1857
+ #define RSTRING_PTR(s) (RSTRING(s)->ptr)
1858
+ #endif
1859
+
1860
+ #ifndef RSTRING_LEN
1861
+ #define RSTRING_LEN(s) (RSTRING(s)->len)
1862
+ #endif
1863
+
1864
+ #ifndef STR2CSTR
1865
+ #define STR2CSTR StringValueCStr
1866
+ #endif
1867
+
1868
+ #define Init_API Init_sqlite3_api
1869
+
1870
+ struct CallbackData {
1871
+ VALUE proc;
1872
+ VALUE proc2;
1873
+ VALUE data;
1874
+ };
1875
+
1876
+ typedef struct CallbackData CallbackData;
1877
+ typedef void RUBY_BLOB;
1878
+ typedef void RUBY_VALBLOB;
1879
+
1880
+ int Sqlite3_ruby_busy_handler(void* data,int value) {
1881
+ VALUE result;
1882
+ CallbackData *cb = (CallbackData*)data;
1883
+ result = rb_funcall(
1884
+ cb->proc, rb_intern("call"), 2, cb->data, INT2FIX(value) );
1885
+ return FIX2INT(result);
1886
+ }
1887
+
1888
+ static void mark_CallbackData(void* ptr) {
1889
+ CallbackData* cb = (CallbackData*)ptr;
1890
+ if (cb->proc != Qnil)
1891
+ rb_gc_mark(cb->proc);
1892
+ if (cb->proc2 != Qnil)
1893
+ rb_gc_mark(cb->proc2);
1894
+ if (cb->data != Qnil)
1895
+ rb_gc_mark(cb->data);
1896
+ }
1897
+
1898
+ int Sqlite3_ruby_authorizer(void* data,int type,
1899
+ const char* a,const char* b,const char* c,const char* d)
1900
+ {
1901
+ VALUE result;
1902
+ CallbackData *cb = (CallbackData*)data;
1903
+ result = rb_funcall(
1904
+ cb->proc, rb_intern("call"), 6, cb->data, INT2FIX(type),
1905
+ ( a ? rb_str_new2(a) : Qnil ), ( b ? rb_str_new2(b) : Qnil ),
1906
+ ( c ? rb_str_new2(c) : Qnil ), ( d ? rb_str_new2(d) : Qnil ) );
1907
+ return FIX2INT(result);
1908
+ }
1909
+
1910
+ void Sqlite3_ruby_trace(void* data, const char *sql) {
1911
+ CallbackData *cb = (CallbackData*)data;
1912
+ rb_funcall( cb->proc, rb_intern("call"), 2, cb->data,
1913
+ sql ? rb_str_new2(sql) : Qnil );
1914
+ }
1915
+
1916
+ void Sqlite3_ruby_function_step(sqlite3_context* ctx,int n,
1917
+ sqlite3_value** args)
1918
+ {
1919
+ CallbackData *data;
1920
+ VALUE rb_args;
1921
+ VALUE *rb_context;
1922
+ int idx;
1923
+
1924
+ data = (CallbackData*)sqlite3_user_data(ctx);
1925
+
1926
+ if( data->proc2 != Qnil ) {
1927
+ rb_context = (VALUE*)sqlite3_aggregate_context(ctx,sizeof(VALUE));
1928
+ if( *rb_context == 0 ) {
1929
+ *rb_context = rb_hash_new();
1930
+ rb_gc_register_address( rb_context );
1931
+ }
1932
+ }
1933
+
1934
+ rb_args = rb_ary_new2(n+1);
1935
+ rb_ary_push( rb_args, SWIG_NewPointerObj(ctx,SWIGTYPE_p_sqlite3_context,0) );
1936
+ for( idx = 0; idx < n; idx++ ) {
1937
+ rb_ary_push( rb_args, SWIG_NewPointerObj(args[idx],
1938
+ SWIGTYPE_p_sqlite3_value,0) );
1939
+ }
1940
+
1941
+ rb_apply( data->proc, rb_intern("call"), rb_args );
1942
+ }
1943
+
1944
+ void Sqlite3_ruby_function_final(sqlite3_context *ctx) {
1945
+ VALUE *rb_context;
1946
+ CallbackData *data;
1947
+
1948
+ rb_context = (VALUE*)sqlite3_aggregate_context(ctx,sizeof(VALUE));
1949
+ if( *rb_context == 0 ) {
1950
+ *rb_context = rb_hash_new();
1951
+ rb_gc_register_address( rb_context );
1952
+ }
1953
+
1954
+ data = (CallbackData*)sqlite3_user_data(ctx);
1955
+
1956
+ rb_funcall( data->proc2, rb_intern("call"), 1,
1957
+ SWIG_NewPointerObj(ctx,SWIGTYPE_p_sqlite3_context,0) );
1958
+
1959
+ rb_gc_unregister_address( rb_context );
1960
+ }
1961
+
1962
+
1963
+ #include <limits.h>
1964
+ #if !defined(SWIG_NO_LLONG_MAX)
1965
+ # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1966
+ # define LLONG_MAX __LONG_LONG_MAX__
1967
+ # define LLONG_MIN (-LLONG_MAX - 1LL)
1968
+ # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1969
+ # endif
1970
+ #endif
1971
+
1972
+
1973
+ #define SWIG_From_long LONG2NUM
1974
+
1975
+
1976
+ SWIGINTERNINLINE VALUE
1977
+ SWIG_From_int (int value)
1978
+ {
1979
+ return SWIG_From_long (value);
1980
+ }
1981
+
1982
+
1983
+ SWIGINTERN swig_type_info*
1984
+ SWIG_pchar_descriptor(void)
1985
+ {
1986
+ static int init = 0;
1987
+ static swig_type_info* info = 0;
1988
+ if (!init) {
1989
+ info = SWIG_TypeQuery("_p_char");
1990
+ init = 1;
1991
+ }
1992
+ return info;
1993
+ }
1994
+
1995
+
1996
+ SWIGINTERN int
1997
+ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
1998
+ {
1999
+ if (TYPE(obj) == T_STRING) {
2000
+ #if defined(StringValuePtr)
2001
+ char *cstr = StringValuePtr(obj);
2002
+ #else
2003
+ char *cstr = STR2CSTR(obj);
2004
+ #endif
2005
+ size_t size = RSTRING_LEN(obj) + 1;
2006
+ if (cptr) {
2007
+ if (alloc) {
2008
+ if (*alloc == SWIG_NEWOBJ) {
2009
+ *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
2010
+ } else {
2011
+ *cptr = cstr;
2012
+ *alloc = SWIG_OLDOBJ;
2013
+ }
2014
+ }
2015
+ }
2016
+ if (psize) *psize = size;
2017
+ return SWIG_OK;
2018
+ } else {
2019
+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2020
+ if (pchar_descriptor) {
2021
+ void* vptr = 0;
2022
+ if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
2023
+ if (cptr) *cptr = (char *)vptr;
2024
+ if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
2025
+ if (alloc) *alloc = SWIG_OLDOBJ;
2026
+ return SWIG_OK;
2027
+ }
2028
+ }
2029
+ }
2030
+ return SWIG_TypeError;
2031
+ }
2032
+
2033
+
2034
+
2035
+
2036
+
2037
+ SWIGINTERN VALUE
2038
+ SWIG_ruby_failed(void)
2039
+ {
2040
+ return Qnil;
2041
+ }
2042
+
2043
+
2044
+ /*@SWIG:C:\\Users\\Luis\\Downloads\\swigwin-1.3.39\\Lib\\ruby\\rubyprimtypes.swg,23,%ruby_aux_method@*/
2045
+ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
2046
+ {
2047
+ VALUE obj = args[0];
2048
+ VALUE type = TYPE(obj);
2049
+ long *res = (long *)(args[1]);
2050
+ *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
2051
+ return obj;
2052
+ }
2053
+ /*@SWIG@*/
2054
+
2055
+ SWIGINTERN int
2056
+ SWIG_AsVal_long (VALUE obj, long* val)
2057
+ {
2058
+ VALUE type = TYPE(obj);
2059
+ if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
2060
+ long v;
2061
+ VALUE a[2];
2062
+ a[0] = obj;
2063
+ a[1] = (VALUE)(&v);
2064
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2065
+ if (val) *val = v;
2066
+ return SWIG_OK;
2067
+ }
2068
+ }
2069
+ return SWIG_TypeError;
2070
+ }
2071
+
2072
+
2073
+ SWIGINTERN int
2074
+ SWIG_AsVal_int (VALUE obj, int *val)
2075
+ {
2076
+ long v;
2077
+ int res = SWIG_AsVal_long (obj, &v);
2078
+ if (SWIG_IsOK(res)) {
2079
+ if ((v < INT_MIN || v > INT_MAX)) {
2080
+ return SWIG_OverflowError;
2081
+ } else {
2082
+ if (val) *val = (int)(v);
2083
+ }
2084
+ }
2085
+ return res;
2086
+ }
2087
+
2088
+
2089
+ /*@SWIG:C:\\Users\\Luis\\Downloads\\swigwin-1.3.39\\Lib\\ruby\\rubyprimtypes.swg,23,%ruby_aux_method@*/
2090
+ SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
2091
+ {
2092
+ VALUE obj = args[0];
2093
+ VALUE type = TYPE(obj);
2094
+ double *res = (double *)(args[1]);
2095
+ *res = (type == T_FLOAT ? NUM2DBL(obj) : (type == T_FIXNUM ? (double) FIX2INT(obj) : rb_big2dbl(obj)));
2096
+ return obj;
2097
+ }
2098
+ /*@SWIG@*/
2099
+
2100
+ SWIGINTERN int
2101
+ SWIG_AsVal_double (VALUE obj, double *val)
2102
+ {
2103
+ VALUE type = TYPE(obj);
2104
+ if ((type == T_FLOAT) || (type == T_FIXNUM) || (type == T_BIGNUM)) {
2105
+ double v;
2106
+ VALUE a[2];
2107
+ a[0] = obj;
2108
+ a[1] = (VALUE)(&v);
2109
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2DBL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2110
+ if (val) *val = v;
2111
+ return SWIG_OK;
2112
+ }
2113
+ }
2114
+ return SWIG_TypeError;
2115
+ }
2116
+
2117
+
2118
+ #define SWIG_From_double rb_float_new
2119
+
2120
+ swig_class SwigClassCallbackData;
2121
+
2122
+ SWIGINTERN VALUE
2123
+ _wrap_CallbackData_proc_set(int argc, VALUE *argv, VALUE self) {
2124
+ struct CallbackData *arg1 = (struct CallbackData *) 0 ;
2125
+ VALUE arg2 = (VALUE) 0 ;
2126
+ void *argp1 = 0 ;
2127
+ int res1 = 0 ;
2128
+
2129
+ if ((argc < 1) || (argc > 1)) {
2130
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2131
+ }
2132
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CallbackData, 0 | 0 );
2133
+ if (!SWIG_IsOK(res1)) {
2134
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct CallbackData *","proc", 1, self ));
2135
+ }
2136
+ arg1 = (struct CallbackData *)(argp1);
2137
+ arg2 = argv[0];
2138
+ if (arg1) (arg1)->proc = arg2;
2139
+ return Qnil;
2140
+ fail:
2141
+ return Qnil;
2142
+ }
2143
+
2144
+
2145
+ SWIGINTERN VALUE
2146
+ _wrap_CallbackData_proc_get(int argc, VALUE *argv, VALUE self) {
2147
+ struct CallbackData *arg1 = (struct CallbackData *) 0 ;
2148
+ void *argp1 = 0 ;
2149
+ int res1 = 0 ;
2150
+ VALUE result;
2151
+ VALUE vresult = Qnil;
2152
+
2153
+ if ((argc < 0) || (argc > 0)) {
2154
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2155
+ }
2156
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CallbackData, 0 | 0 );
2157
+ if (!SWIG_IsOK(res1)) {
2158
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct CallbackData *","proc", 1, self ));
2159
+ }
2160
+ arg1 = (struct CallbackData *)(argp1);
2161
+ result = (VALUE) ((arg1)->proc);
2162
+ vresult = result;
2163
+ return vresult;
2164
+ fail:
2165
+ return Qnil;
2166
+ }
2167
+
2168
+
2169
+ SWIGINTERN VALUE
2170
+ _wrap_CallbackData_proc2_set(int argc, VALUE *argv, VALUE self) {
2171
+ struct CallbackData *arg1 = (struct CallbackData *) 0 ;
2172
+ VALUE arg2 = (VALUE) 0 ;
2173
+ void *argp1 = 0 ;
2174
+ int res1 = 0 ;
2175
+
2176
+ if ((argc < 1) || (argc > 1)) {
2177
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2178
+ }
2179
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CallbackData, 0 | 0 );
2180
+ if (!SWIG_IsOK(res1)) {
2181
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct CallbackData *","proc2", 1, self ));
2182
+ }
2183
+ arg1 = (struct CallbackData *)(argp1);
2184
+ arg2 = argv[0];
2185
+ if (arg1) (arg1)->proc2 = arg2;
2186
+ return Qnil;
2187
+ fail:
2188
+ return Qnil;
2189
+ }
2190
+
2191
+
2192
+ SWIGINTERN VALUE
2193
+ _wrap_CallbackData_proc2_get(int argc, VALUE *argv, VALUE self) {
2194
+ struct CallbackData *arg1 = (struct CallbackData *) 0 ;
2195
+ void *argp1 = 0 ;
2196
+ int res1 = 0 ;
2197
+ VALUE result;
2198
+ VALUE vresult = Qnil;
2199
+
2200
+ if ((argc < 0) || (argc > 0)) {
2201
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2202
+ }
2203
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CallbackData, 0 | 0 );
2204
+ if (!SWIG_IsOK(res1)) {
2205
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct CallbackData *","proc2", 1, self ));
2206
+ }
2207
+ arg1 = (struct CallbackData *)(argp1);
2208
+ result = (VALUE) ((arg1)->proc2);
2209
+ vresult = result;
2210
+ return vresult;
2211
+ fail:
2212
+ return Qnil;
2213
+ }
2214
+
2215
+
2216
+ SWIGINTERN VALUE
2217
+ _wrap_CallbackData_data_set(int argc, VALUE *argv, VALUE self) {
2218
+ struct CallbackData *arg1 = (struct CallbackData *) 0 ;
2219
+ VALUE arg2 = (VALUE) 0 ;
2220
+ void *argp1 = 0 ;
2221
+ int res1 = 0 ;
2222
+
2223
+ if ((argc < 1) || (argc > 1)) {
2224
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2225
+ }
2226
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CallbackData, 0 | 0 );
2227
+ if (!SWIG_IsOK(res1)) {
2228
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct CallbackData *","data", 1, self ));
2229
+ }
2230
+ arg1 = (struct CallbackData *)(argp1);
2231
+ arg2 = argv[0];
2232
+ if (arg1) (arg1)->data = arg2;
2233
+ return Qnil;
2234
+ fail:
2235
+ return Qnil;
2236
+ }
2237
+
2238
+
2239
+ SWIGINTERN VALUE
2240
+ _wrap_CallbackData_data_get(int argc, VALUE *argv, VALUE self) {
2241
+ struct CallbackData *arg1 = (struct CallbackData *) 0 ;
2242
+ void *argp1 = 0 ;
2243
+ int res1 = 0 ;
2244
+ VALUE result;
2245
+ VALUE vresult = Qnil;
2246
+
2247
+ if ((argc < 0) || (argc > 0)) {
2248
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2249
+ }
2250
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CallbackData, 0 | 0 );
2251
+ if (!SWIG_IsOK(res1)) {
2252
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct CallbackData *","data", 1, self ));
2253
+ }
2254
+ arg1 = (struct CallbackData *)(argp1);
2255
+ result = (VALUE) ((arg1)->data);
2256
+ vresult = result;
2257
+ return vresult;
2258
+ fail:
2259
+ return Qnil;
2260
+ }
2261
+
2262
+
2263
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2264
+ SWIGINTERN VALUE
2265
+ _wrap_CallbackData_allocate(VALUE self) {
2266
+ #else
2267
+ SWIGINTERN VALUE
2268
+ _wrap_CallbackData_allocate(int argc, VALUE *argv, VALUE self) {
2269
+ #endif
2270
+
2271
+
2272
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_CallbackData);
2273
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2274
+ rb_obj_call_init(vresult, argc, argv);
2275
+ #endif
2276
+ return vresult;
2277
+ }
2278
+
2279
+
2280
+ SWIGINTERN VALUE
2281
+ _wrap_new_CallbackData(int argc, VALUE *argv, VALUE self) {
2282
+ struct CallbackData *result = 0 ;
2283
+
2284
+ if ((argc < 0) || (argc > 0)) {
2285
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2286
+ }
2287
+ result = (struct CallbackData *)calloc(1, sizeof(struct CallbackData));
2288
+ DATA_PTR(self) = result;
2289
+ return self;
2290
+ fail:
2291
+ return Qnil;
2292
+ }
2293
+
2294
+
2295
+ SWIGINTERN void
2296
+ free_CallbackData(struct CallbackData *arg1) {
2297
+ free((char *) arg1);
2298
+ }
2299
+
2300
+ SWIGINTERN VALUE
2301
+ _wrap_sqlite3_libversion(int argc, VALUE *argv, VALUE self) {
2302
+ char *result = 0 ;
2303
+ VALUE vresult = Qnil;
2304
+
2305
+ if ((argc < 0) || (argc > 0)) {
2306
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2307
+ }
2308
+ result = (char *)sqlite3_libversion();
2309
+ {
2310
+ vresult = result ? rb_str_new2(result) : Qnil;
2311
+ }
2312
+ return vresult;
2313
+ fail:
2314
+ return Qnil;
2315
+ }
2316
+
2317
+
2318
+ SWIGINTERN VALUE
2319
+ _wrap_sqlite3_close(int argc, VALUE *argv, VALUE self) {
2320
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2321
+ void *argp1 = 0 ;
2322
+ int res1 = 0 ;
2323
+ int result;
2324
+ VALUE vresult = Qnil;
2325
+
2326
+ if ((argc < 1) || (argc > 1)) {
2327
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2328
+ }
2329
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2330
+ if (!SWIG_IsOK(res1)) {
2331
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_close", 1, argv[0] ));
2332
+ }
2333
+ arg1 = (sqlite3 *)(argp1);
2334
+ result = (int)sqlite3_close(arg1);
2335
+ vresult = SWIG_From_int((int)(result));
2336
+ return vresult;
2337
+ fail:
2338
+ return Qnil;
2339
+ }
2340
+
2341
+
2342
+ SWIGINTERN VALUE
2343
+ _wrap_sqlite3_last_insert_rowid(int argc, VALUE *argv, VALUE self) {
2344
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2345
+ void *argp1 = 0 ;
2346
+ int res1 = 0 ;
2347
+ sqlite_int64 result;
2348
+ VALUE vresult = Qnil;
2349
+
2350
+ if ((argc < 1) || (argc > 1)) {
2351
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2352
+ }
2353
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2354
+ if (!SWIG_IsOK(res1)) {
2355
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_last_insert_rowid", 1, argv[0] ));
2356
+ }
2357
+ arg1 = (sqlite3 *)(argp1);
2358
+ result = sqlite3_last_insert_rowid(arg1);
2359
+ {
2360
+ vresult = rb_ll2inum( result );
2361
+ }
2362
+ return vresult;
2363
+ fail:
2364
+ return Qnil;
2365
+ }
2366
+
2367
+
2368
+ SWIGINTERN VALUE
2369
+ _wrap_sqlite3_changes(int argc, VALUE *argv, VALUE self) {
2370
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2371
+ void *argp1 = 0 ;
2372
+ int res1 = 0 ;
2373
+ int result;
2374
+ VALUE vresult = Qnil;
2375
+
2376
+ if ((argc < 1) || (argc > 1)) {
2377
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2378
+ }
2379
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2380
+ if (!SWIG_IsOK(res1)) {
2381
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_changes", 1, argv[0] ));
2382
+ }
2383
+ arg1 = (sqlite3 *)(argp1);
2384
+ result = (int)sqlite3_changes(arg1);
2385
+ vresult = SWIG_From_int((int)(result));
2386
+ return vresult;
2387
+ fail:
2388
+ return Qnil;
2389
+ }
2390
+
2391
+
2392
+ SWIGINTERN VALUE
2393
+ _wrap_sqlite3_total_changes(int argc, VALUE *argv, VALUE self) {
2394
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2395
+ void *argp1 = 0 ;
2396
+ int res1 = 0 ;
2397
+ int result;
2398
+ VALUE vresult = Qnil;
2399
+
2400
+ if ((argc < 1) || (argc > 1)) {
2401
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2402
+ }
2403
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2404
+ if (!SWIG_IsOK(res1)) {
2405
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_total_changes", 1, argv[0] ));
2406
+ }
2407
+ arg1 = (sqlite3 *)(argp1);
2408
+ result = (int)sqlite3_total_changes(arg1);
2409
+ vresult = SWIG_From_int((int)(result));
2410
+ return vresult;
2411
+ fail:
2412
+ return Qnil;
2413
+ }
2414
+
2415
+
2416
+ SWIGINTERN VALUE
2417
+ _wrap_sqlite3_interrupt(int argc, VALUE *argv, VALUE self) {
2418
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2419
+ void *argp1 = 0 ;
2420
+ int res1 = 0 ;
2421
+
2422
+ if ((argc < 1) || (argc > 1)) {
2423
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2424
+ }
2425
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2426
+ if (!SWIG_IsOK(res1)) {
2427
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_interrupt", 1, argv[0] ));
2428
+ }
2429
+ arg1 = (sqlite3 *)(argp1);
2430
+ sqlite3_interrupt(arg1);
2431
+ return Qnil;
2432
+ fail:
2433
+ return Qnil;
2434
+ }
2435
+
2436
+
2437
+ SWIGINTERN VALUE
2438
+ _wrap_sqlite3_complete(int argc, VALUE *argv, VALUE self) {
2439
+ char *arg1 = (char *) 0 ;
2440
+ int res1 ;
2441
+ char *buf1 = 0 ;
2442
+ int alloc1 = 0 ;
2443
+ int result;
2444
+ VALUE vresult = Qnil;
2445
+
2446
+ if ((argc < 1) || (argc > 1)) {
2447
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2448
+ }
2449
+ res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
2450
+ if (!SWIG_IsOK(res1)) {
2451
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","sqlite3_complete", 1, argv[0] ));
2452
+ }
2453
+ arg1 = (char *)(buf1);
2454
+ result = (int)sqlite3_complete((char const *)arg1);
2455
+ vresult = SWIG_From_int((int)(result));
2456
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2457
+ return vresult;
2458
+ fail:
2459
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2460
+ return Qnil;
2461
+ }
2462
+
2463
+
2464
+ SWIGINTERN VALUE
2465
+ _wrap_sqlite3_complete16(int argc, VALUE *argv, VALUE self) {
2466
+ void *arg1 = (void *) 0 ;
2467
+ int result;
2468
+ VALUE vresult = Qnil;
2469
+
2470
+ if ((argc < 1) || (argc > 1)) {
2471
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2472
+ }
2473
+ {
2474
+ arg1 = (void*)RSTRING_PTR(argv[0]);
2475
+ }
2476
+ result = (int)sqlite3_complete16((void const *)arg1);
2477
+ vresult = SWIG_From_int((int)(result));
2478
+ return vresult;
2479
+ fail:
2480
+ return Qnil;
2481
+ }
2482
+
2483
+
2484
+ SWIGINTERN VALUE
2485
+ _wrap_sqlite3_busy_handler(int argc, VALUE *argv, VALUE self) {
2486
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2487
+ int (*arg2)(void *,int) = (int (*)(void *,int)) 0 ;
2488
+ void *arg3 = (void *) 0 ;
2489
+ void *argp1 = 0 ;
2490
+ int res1 = 0 ;
2491
+ int res3 ;
2492
+ int result;
2493
+ VALUE vresult = Qnil;
2494
+
2495
+ if ((argc < 3) || (argc > 3)) {
2496
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2497
+ }
2498
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2499
+ if (!SWIG_IsOK(res1)) {
2500
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_busy_handler", 1, argv[0] ));
2501
+ }
2502
+ arg1 = (sqlite3 *)(argp1);
2503
+ {
2504
+ int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_void_int__int);
2505
+ if (!SWIG_IsOK(res)) {
2506
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(void *,int)","sqlite3_busy_handler", 2, argv[1] ));
2507
+ }
2508
+ }
2509
+ res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0);
2510
+ if (!SWIG_IsOK(res3)) {
2511
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","sqlite3_busy_handler", 3, argv[2] ));
2512
+ }
2513
+ result = (int)sqlite3_busy_handler(arg1,arg2,arg3);
2514
+ vresult = SWIG_From_int((int)(result));
2515
+ return vresult;
2516
+ fail:
2517
+ return Qnil;
2518
+ }
2519
+
2520
+
2521
+ SWIGINTERN VALUE
2522
+ _wrap_sqlite3_busy_timeout(int argc, VALUE *argv, VALUE self) {
2523
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2524
+ int arg2 ;
2525
+ void *argp1 = 0 ;
2526
+ int res1 = 0 ;
2527
+ int val2 ;
2528
+ int ecode2 = 0 ;
2529
+ int result;
2530
+ VALUE vresult = Qnil;
2531
+
2532
+ if ((argc < 2) || (argc > 2)) {
2533
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2534
+ }
2535
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2536
+ if (!SWIG_IsOK(res1)) {
2537
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_busy_timeout", 1, argv[0] ));
2538
+ }
2539
+ arg1 = (sqlite3 *)(argp1);
2540
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2541
+ if (!SWIG_IsOK(ecode2)) {
2542
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_busy_timeout", 2, argv[1] ));
2543
+ }
2544
+ arg2 = (int)(val2);
2545
+ result = (int)sqlite3_busy_timeout(arg1,arg2);
2546
+ vresult = SWIG_From_int((int)(result));
2547
+ return vresult;
2548
+ fail:
2549
+ return Qnil;
2550
+ }
2551
+
2552
+
2553
+ SWIGINTERN VALUE
2554
+ _wrap_sqlite3_set_authorizer(int argc, VALUE *argv, VALUE self) {
2555
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2556
+ int (*arg2)(void *,int,char const *,char const *,char const *,char const *) = (int (*)(void *,int,char const *,char const *,char const *,char const *)) 0 ;
2557
+ void *arg3 = (void *) 0 ;
2558
+ void *argp1 = 0 ;
2559
+ int res1 = 0 ;
2560
+ int res3 ;
2561
+ int result;
2562
+ VALUE vresult = Qnil;
2563
+
2564
+ if ((argc < 3) || (argc > 3)) {
2565
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2566
+ }
2567
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2568
+ if (!SWIG_IsOK(res1)) {
2569
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_set_authorizer", 1, argv[0] ));
2570
+ }
2571
+ arg1 = (sqlite3 *)(argp1);
2572
+ {
2573
+ int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_void_int_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char__int);
2574
+ if (!SWIG_IsOK(res)) {
2575
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(void *,int,char const *,char const *,char const *,char const *)","sqlite3_set_authorizer", 2, argv[1] ));
2576
+ }
2577
+ }
2578
+ res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0);
2579
+ if (!SWIG_IsOK(res3)) {
2580
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","sqlite3_set_authorizer", 3, argv[2] ));
2581
+ }
2582
+ result = (int)sqlite3_set_authorizer(arg1,arg2,arg3);
2583
+ vresult = SWIG_From_int((int)(result));
2584
+ return vresult;
2585
+ fail:
2586
+ return Qnil;
2587
+ }
2588
+
2589
+
2590
+ SWIGINTERN VALUE
2591
+ _wrap_sqlite3_trace(int argc, VALUE *argv, VALUE self) {
2592
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2593
+ void (*arg2)(void *,char const *) = (void (*)(void *,char const *)) 0 ;
2594
+ void *arg3 = (void *) 0 ;
2595
+ void *argp1 = 0 ;
2596
+ int res1 = 0 ;
2597
+ int res3 ;
2598
+ int result;
2599
+ VALUE vresult = Qnil;
2600
+
2601
+ if ((argc < 3) || (argc > 3)) {
2602
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2603
+ }
2604
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2605
+ if (!SWIG_IsOK(res1)) {
2606
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_trace", 1, argv[0] ));
2607
+ }
2608
+ arg1 = (sqlite3 *)(argp1);
2609
+ {
2610
+ int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_void_p_q_const__char__void);
2611
+ if (!SWIG_IsOK(res)) {
2612
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(void *,char const *)","sqlite3_trace", 2, argv[1] ));
2613
+ }
2614
+ }
2615
+ res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0);
2616
+ if (!SWIG_IsOK(res3)) {
2617
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","sqlite3_trace", 3, argv[2] ));
2618
+ }
2619
+ result = (int)sqlite3_trace(arg1,arg2,arg3);
2620
+ vresult = SWIG_From_int((int)(result));
2621
+ return vresult;
2622
+ fail:
2623
+ return Qnil;
2624
+ }
2625
+
2626
+
2627
+ SWIGINTERN VALUE
2628
+ _wrap_sqlite3_open(int argc, VALUE *argv, VALUE self) {
2629
+ char *arg1 = (char *) 0 ;
2630
+ sqlite3 **arg2 = (sqlite3 **) 0 ;
2631
+ int result;
2632
+ VALUE vresult = Qnil;
2633
+
2634
+ if ((argc < 1) || (argc > 1)) {
2635
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2636
+ }
2637
+ {
2638
+ arg1 = STR2CSTR(argv[0]);
2639
+ arg2 = (sqlite3**)malloc( sizeof( sqlite3* ) );
2640
+ }
2641
+ result = (int)sqlite3_open((char const *)arg1,arg2);
2642
+ vresult = SWIG_From_int((int)(result));
2643
+ {
2644
+ VALUE ary;
2645
+ ary = rb_ary_new2(2);
2646
+ rb_ary_push( ary, vresult );
2647
+ rb_ary_push( ary, SWIG_NewPointerObj( *arg2, SWIGTYPE_p_sqlite3, 0 ) );
2648
+ free( arg2 );
2649
+ vresult = ary;
2650
+ }
2651
+ return vresult;
2652
+ fail:
2653
+ return Qnil;
2654
+ }
2655
+
2656
+
2657
+ SWIGINTERN VALUE
2658
+ _wrap_sqlite3_open16(int argc, VALUE *argv, VALUE self) {
2659
+ void *arg1 = (void *) 0 ;
2660
+ sqlite3 **arg2 = (sqlite3 **) 0 ;
2661
+ int result;
2662
+ VALUE vresult = Qnil;
2663
+
2664
+ if ((argc < 1) || (argc > 1)) {
2665
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2666
+ }
2667
+ {
2668
+ arg1 = (void*)RSTRING_PTR(argv[0]);
2669
+ arg2 = (sqlite3**)malloc( sizeof( sqlite3* ) );
2670
+ }
2671
+ result = (int)sqlite3_open16((void const *)arg1,arg2);
2672
+ vresult = SWIG_From_int((int)(result));
2673
+ {
2674
+ VALUE ary;
2675
+ ary = rb_ary_new2(2);
2676
+ rb_ary_push( ary, vresult );
2677
+ rb_ary_push( ary, SWIG_NewPointerObj( *arg2, SWIGTYPE_p_sqlite3, 0 ) );
2678
+ free( arg2 );
2679
+ vresult = ary;
2680
+ }
2681
+ return vresult;
2682
+ fail:
2683
+ return Qnil;
2684
+ }
2685
+
2686
+
2687
+ SWIGINTERN VALUE
2688
+ _wrap_sqlite3_errcode(int argc, VALUE *argv, VALUE self) {
2689
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2690
+ void *argp1 = 0 ;
2691
+ int res1 = 0 ;
2692
+ int result;
2693
+ VALUE vresult = Qnil;
2694
+
2695
+ if ((argc < 1) || (argc > 1)) {
2696
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2697
+ }
2698
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2699
+ if (!SWIG_IsOK(res1)) {
2700
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_errcode", 1, argv[0] ));
2701
+ }
2702
+ arg1 = (sqlite3 *)(argp1);
2703
+ result = (int)sqlite3_errcode(arg1);
2704
+ vresult = SWIG_From_int((int)(result));
2705
+ return vresult;
2706
+ fail:
2707
+ return Qnil;
2708
+ }
2709
+
2710
+
2711
+ SWIGINTERN VALUE
2712
+ _wrap_sqlite3_errmsg(int argc, VALUE *argv, VALUE self) {
2713
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2714
+ void *argp1 = 0 ;
2715
+ int res1 = 0 ;
2716
+ char *result = 0 ;
2717
+ VALUE vresult = Qnil;
2718
+
2719
+ if ((argc < 1) || (argc > 1)) {
2720
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2721
+ }
2722
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2723
+ if (!SWIG_IsOK(res1)) {
2724
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_errmsg", 1, argv[0] ));
2725
+ }
2726
+ arg1 = (sqlite3 *)(argp1);
2727
+ result = (char *)sqlite3_errmsg(arg1);
2728
+ {
2729
+ vresult = result ? rb_str_new2(result) : Qnil;
2730
+ }
2731
+ return vresult;
2732
+ fail:
2733
+ return Qnil;
2734
+ }
2735
+
2736
+
2737
+ SWIGINTERN VALUE
2738
+ _wrap_sqlite3_errmsg16(int argc, VALUE *argv, VALUE self) {
2739
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2740
+ void *argp1 = 0 ;
2741
+ int res1 = 0 ;
2742
+ void *result = 0 ;
2743
+ VALUE vresult = Qnil;
2744
+
2745
+ if ((argc < 1) || (argc > 1)) {
2746
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2747
+ }
2748
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2749
+ if (!SWIG_IsOK(res1)) {
2750
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_errmsg16", 1, argv[0] ));
2751
+ }
2752
+ arg1 = (sqlite3 *)(argp1);
2753
+ result = (void *)sqlite3_errmsg16(arg1);
2754
+ {
2755
+ int i;
2756
+ if( result ) {
2757
+ for( i = 0; ((char*)result)[i]; i += 2 );
2758
+ vresult = rb_str_new( (char*)result, i );
2759
+ } else vresult = Qnil;
2760
+ }
2761
+ return vresult;
2762
+ fail:
2763
+ return Qnil;
2764
+ }
2765
+
2766
+
2767
+ SWIGINTERN VALUE
2768
+ _wrap_sqlite3_prepare(int argc, VALUE *argv, VALUE self) {
2769
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2770
+ char *arg2 = (char *) 0 ;
2771
+ int arg3 ;
2772
+ sqlite3_stmt **arg4 = (sqlite3_stmt **) 0 ;
2773
+ char **arg5 = (char **) 0 ;
2774
+ void *argp1 = 0 ;
2775
+ int res1 = 0 ;
2776
+ sqlite3_stmt *stmt2 ;
2777
+ char *errmsg2 ;
2778
+ int result;
2779
+ VALUE vresult = Qnil;
2780
+
2781
+ if ((argc < 2) || (argc > 2)) {
2782
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2783
+ }
2784
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2785
+ if (!SWIG_IsOK(res1)) {
2786
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_prepare", 1, argv[0] ));
2787
+ }
2788
+ arg1 = (sqlite3 *)(argp1);
2789
+ {
2790
+ arg2 = RSTRING_PTR(argv[1]);
2791
+ arg3 = RSTRING_LEN(argv[1]);
2792
+ arg4 = &stmt2;
2793
+ arg5 = &errmsg2;
2794
+ }
2795
+ result = (int)sqlite3_prepare(arg1,(char const *)arg2,arg3,arg4,(char const **)arg5);
2796
+ vresult = SWIG_From_int((int)(result));
2797
+ {
2798
+ VALUE ary;
2799
+ ary = rb_ary_new2(3);
2800
+ rb_ary_push( ary, vresult );
2801
+ rb_ary_push( ary, SWIG_NewPointerObj( stmt2, SWIGTYPE_p_sqlite3_stmt, 0 ) );
2802
+ rb_ary_push( ary, errmsg2 ? rb_str_new2( errmsg2 ) : Qnil );
2803
+ vresult = ary;
2804
+ }
2805
+ return vresult;
2806
+ fail:
2807
+ return Qnil;
2808
+ }
2809
+
2810
+
2811
+ SWIGINTERN VALUE
2812
+ _wrap_sqlite3_prepare16(int argc, VALUE *argv, VALUE self) {
2813
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
2814
+ void *arg2 = (void *) 0 ;
2815
+ int arg3 ;
2816
+ sqlite3_stmt **arg4 = (sqlite3_stmt **) 0 ;
2817
+ void **arg5 = (void **) 0 ;
2818
+ void *argp1 = 0 ;
2819
+ int res1 = 0 ;
2820
+ sqlite3_stmt *stmt2 ;
2821
+ void *errmsg2 ;
2822
+ int result;
2823
+ VALUE vresult = Qnil;
2824
+
2825
+ if ((argc < 2) || (argc > 2)) {
2826
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2827
+ }
2828
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
2829
+ if (!SWIG_IsOK(res1)) {
2830
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_prepare16", 1, argv[0] ));
2831
+ }
2832
+ arg1 = (sqlite3 *)(argp1);
2833
+ {
2834
+ arg2 = RSTRING_PTR(argv[1]);
2835
+ arg3 = RSTRING_LEN(argv[1]);
2836
+ arg4 = &stmt2;
2837
+ arg5 = &errmsg2;
2838
+ }
2839
+ result = (int)sqlite3_prepare16(arg1,(void const *)arg2,arg3,arg4,(void const **)arg5);
2840
+ vresult = SWIG_From_int((int)(result));
2841
+ {
2842
+ VALUE ary;
2843
+ int i;
2844
+
2845
+ for( i = 0; ((char*)errmsg2)[i]; i += 2 );
2846
+
2847
+ ary = rb_ary_new2(3);
2848
+ rb_ary_push( ary, vresult );
2849
+ rb_ary_push( ary, SWIG_NewPointerObj( stmt2, SWIGTYPE_p_sqlite3_stmt, 0 ) );
2850
+ rb_ary_push( ary, errmsg2 ? rb_str_new( (char*)errmsg2, i ) : Qnil );
2851
+ vresult = ary;
2852
+ }
2853
+ return vresult;
2854
+ fail:
2855
+ return Qnil;
2856
+ }
2857
+
2858
+
2859
+ SWIGINTERN VALUE
2860
+ _wrap_sqlite3_bind_blob(int argc, VALUE *argv, VALUE self) {
2861
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
2862
+ int arg2 ;
2863
+ void *arg3 = (void *) 0 ;
2864
+ int arg4 ;
2865
+ void (*arg5)(void *) = (void (*)(void *)) 0 ;
2866
+ void *argp1 = 0 ;
2867
+ int res1 = 0 ;
2868
+ int val2 ;
2869
+ int ecode2 = 0 ;
2870
+ int result;
2871
+ VALUE vresult = Qnil;
2872
+
2873
+ if ((argc < 3) || (argc > 3)) {
2874
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2875
+ }
2876
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
2877
+ if (!SWIG_IsOK(res1)) {
2878
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_bind_blob", 1, argv[0] ));
2879
+ }
2880
+ arg1 = (sqlite3_stmt *)(argp1);
2881
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2882
+ if (!SWIG_IsOK(ecode2)) {
2883
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_bind_blob", 2, argv[1] ));
2884
+ }
2885
+ arg2 = (int)(val2);
2886
+ {
2887
+ arg3 = (void*)RSTRING_PTR(argv[2]);
2888
+ arg4 = RSTRING_LEN(argv[2]);
2889
+ arg5 = SQLITE_TRANSIENT;
2890
+ }
2891
+ result = (int)sqlite3_bind_blob(arg1,arg2,(void const *)arg3,arg4,arg5);
2892
+ vresult = SWIG_From_int((int)(result));
2893
+ return vresult;
2894
+ fail:
2895
+ return Qnil;
2896
+ }
2897
+
2898
+
2899
+ SWIGINTERN VALUE
2900
+ _wrap_sqlite3_bind_double(int argc, VALUE *argv, VALUE self) {
2901
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
2902
+ int arg2 ;
2903
+ double arg3 ;
2904
+ void *argp1 = 0 ;
2905
+ int res1 = 0 ;
2906
+ int val2 ;
2907
+ int ecode2 = 0 ;
2908
+ double val3 ;
2909
+ int ecode3 = 0 ;
2910
+ int result;
2911
+ VALUE vresult = Qnil;
2912
+
2913
+ if ((argc < 3) || (argc > 3)) {
2914
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2915
+ }
2916
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
2917
+ if (!SWIG_IsOK(res1)) {
2918
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_bind_double", 1, argv[0] ));
2919
+ }
2920
+ arg1 = (sqlite3_stmt *)(argp1);
2921
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2922
+ if (!SWIG_IsOK(ecode2)) {
2923
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_bind_double", 2, argv[1] ));
2924
+ }
2925
+ arg2 = (int)(val2);
2926
+ ecode3 = SWIG_AsVal_double(argv[2], &val3);
2927
+ if (!SWIG_IsOK(ecode3)) {
2928
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","sqlite3_bind_double", 3, argv[2] ));
2929
+ }
2930
+ arg3 = (double)(val3);
2931
+ result = (int)sqlite3_bind_double(arg1,arg2,arg3);
2932
+ vresult = SWIG_From_int((int)(result));
2933
+ return vresult;
2934
+ fail:
2935
+ return Qnil;
2936
+ }
2937
+
2938
+
2939
+ SWIGINTERN VALUE
2940
+ _wrap_sqlite3_bind_int(int argc, VALUE *argv, VALUE self) {
2941
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
2942
+ int arg2 ;
2943
+ int arg3 ;
2944
+ void *argp1 = 0 ;
2945
+ int res1 = 0 ;
2946
+ int val2 ;
2947
+ int ecode2 = 0 ;
2948
+ int val3 ;
2949
+ int ecode3 = 0 ;
2950
+ int result;
2951
+ VALUE vresult = Qnil;
2952
+
2953
+ if ((argc < 3) || (argc > 3)) {
2954
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2955
+ }
2956
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
2957
+ if (!SWIG_IsOK(res1)) {
2958
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_bind_int", 1, argv[0] ));
2959
+ }
2960
+ arg1 = (sqlite3_stmt *)(argp1);
2961
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2962
+ if (!SWIG_IsOK(ecode2)) {
2963
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_bind_int", 2, argv[1] ));
2964
+ }
2965
+ arg2 = (int)(val2);
2966
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
2967
+ if (!SWIG_IsOK(ecode3)) {
2968
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","sqlite3_bind_int", 3, argv[2] ));
2969
+ }
2970
+ arg3 = (int)(val3);
2971
+ result = (int)sqlite3_bind_int(arg1,arg2,arg3);
2972
+ vresult = SWIG_From_int((int)(result));
2973
+ return vresult;
2974
+ fail:
2975
+ return Qnil;
2976
+ }
2977
+
2978
+
2979
+ SWIGINTERN VALUE
2980
+ _wrap_sqlite3_bind_int64(int argc, VALUE *argv, VALUE self) {
2981
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
2982
+ int arg2 ;
2983
+ sqlite_int64 arg3 ;
2984
+ void *argp1 = 0 ;
2985
+ int res1 = 0 ;
2986
+ int val2 ;
2987
+ int ecode2 = 0 ;
2988
+ int result;
2989
+ VALUE vresult = Qnil;
2990
+
2991
+ if ((argc < 3) || (argc > 3)) {
2992
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2993
+ }
2994
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
2995
+ if (!SWIG_IsOK(res1)) {
2996
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_bind_int64", 1, argv[0] ));
2997
+ }
2998
+ arg1 = (sqlite3_stmt *)(argp1);
2999
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3000
+ if (!SWIG_IsOK(ecode2)) {
3001
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_bind_int64", 2, argv[1] ));
3002
+ }
3003
+ arg2 = (int)(val2);
3004
+ {
3005
+ arg3 = rb_num2ll( argv[2] );
3006
+ }
3007
+ result = (int)sqlite3_bind_int64(arg1,arg2,arg3);
3008
+ vresult = SWIG_From_int((int)(result));
3009
+ return vresult;
3010
+ fail:
3011
+ return Qnil;
3012
+ }
3013
+
3014
+
3015
+ SWIGINTERN VALUE
3016
+ _wrap_sqlite3_bind_null(int argc, VALUE *argv, VALUE self) {
3017
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3018
+ int arg2 ;
3019
+ void *argp1 = 0 ;
3020
+ int res1 = 0 ;
3021
+ int val2 ;
3022
+ int ecode2 = 0 ;
3023
+ int result;
3024
+ VALUE vresult = Qnil;
3025
+
3026
+ if ((argc < 2) || (argc > 2)) {
3027
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3028
+ }
3029
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3030
+ if (!SWIG_IsOK(res1)) {
3031
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_bind_null", 1, argv[0] ));
3032
+ }
3033
+ arg1 = (sqlite3_stmt *)(argp1);
3034
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3035
+ if (!SWIG_IsOK(ecode2)) {
3036
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_bind_null", 2, argv[1] ));
3037
+ }
3038
+ arg2 = (int)(val2);
3039
+ result = (int)sqlite3_bind_null(arg1,arg2);
3040
+ vresult = SWIG_From_int((int)(result));
3041
+ return vresult;
3042
+ fail:
3043
+ return Qnil;
3044
+ }
3045
+
3046
+
3047
+ SWIGINTERN VALUE
3048
+ _wrap_sqlite3_bind_text(int argc, VALUE *argv, VALUE self) {
3049
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3050
+ int arg2 ;
3051
+ char *arg3 = (char *) 0 ;
3052
+ int arg4 ;
3053
+ void (*arg5)(void *) = (void (*)(void *)) 0 ;
3054
+ void *argp1 = 0 ;
3055
+ int res1 = 0 ;
3056
+ int val2 ;
3057
+ int ecode2 = 0 ;
3058
+ int result;
3059
+ VALUE vresult = Qnil;
3060
+
3061
+ if ((argc < 3) || (argc > 3)) {
3062
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3063
+ }
3064
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3065
+ if (!SWIG_IsOK(res1)) {
3066
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_bind_text", 1, argv[0] ));
3067
+ }
3068
+ arg1 = (sqlite3_stmt *)(argp1);
3069
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3070
+ if (!SWIG_IsOK(ecode2)) {
3071
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_bind_text", 2, argv[1] ));
3072
+ }
3073
+ arg2 = (int)(val2);
3074
+ {
3075
+ arg3 = RSTRING_PTR(argv[2]);
3076
+ arg4 = RSTRING_LEN(argv[2]);
3077
+ arg5 = SQLITE_TRANSIENT;
3078
+ }
3079
+ result = (int)sqlite3_bind_text(arg1,arg2,(char const *)arg3,arg4,arg5);
3080
+ vresult = SWIG_From_int((int)(result));
3081
+ return vresult;
3082
+ fail:
3083
+ return Qnil;
3084
+ }
3085
+
3086
+
3087
+ SWIGINTERN VALUE
3088
+ _wrap_sqlite3_bind_text16(int argc, VALUE *argv, VALUE self) {
3089
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3090
+ int arg2 ;
3091
+ void *arg3 = (void *) 0 ;
3092
+ int arg4 ;
3093
+ void (*arg5)(void *) = (void (*)(void *)) 0 ;
3094
+ void *argp1 = 0 ;
3095
+ int res1 = 0 ;
3096
+ int val2 ;
3097
+ int ecode2 = 0 ;
3098
+ int result;
3099
+ VALUE vresult = Qnil;
3100
+
3101
+ if ((argc < 3) || (argc > 3)) {
3102
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3103
+ }
3104
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3105
+ if (!SWIG_IsOK(res1)) {
3106
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_bind_text16", 1, argv[0] ));
3107
+ }
3108
+ arg1 = (sqlite3_stmt *)(argp1);
3109
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3110
+ if (!SWIG_IsOK(ecode2)) {
3111
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_bind_text16", 2, argv[1] ));
3112
+ }
3113
+ arg2 = (int)(val2);
3114
+ {
3115
+ arg3 = (void*)RSTRING_PTR(argv[2]);
3116
+ arg4 = RSTRING_LEN(argv[2]);
3117
+ arg5 = SQLITE_TRANSIENT;
3118
+ }
3119
+ result = (int)sqlite3_bind_text16(arg1,arg2,(void const *)arg3,arg4,arg5);
3120
+ vresult = SWIG_From_int((int)(result));
3121
+ return vresult;
3122
+ fail:
3123
+ return Qnil;
3124
+ }
3125
+
3126
+
3127
+ SWIGINTERN VALUE
3128
+ _wrap_sqlite3_bind_parameter_count(int argc, VALUE *argv, VALUE self) {
3129
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3130
+ void *argp1 = 0 ;
3131
+ int res1 = 0 ;
3132
+ int result;
3133
+ VALUE vresult = Qnil;
3134
+
3135
+ if ((argc < 1) || (argc > 1)) {
3136
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3137
+ }
3138
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3139
+ if (!SWIG_IsOK(res1)) {
3140
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_bind_parameter_count", 1, argv[0] ));
3141
+ }
3142
+ arg1 = (sqlite3_stmt *)(argp1);
3143
+ result = (int)sqlite3_bind_parameter_count(arg1);
3144
+ vresult = SWIG_From_int((int)(result));
3145
+ return vresult;
3146
+ fail:
3147
+ return Qnil;
3148
+ }
3149
+
3150
+
3151
+ SWIGINTERN VALUE
3152
+ _wrap_sqlite3_bind_parameter_name(int argc, VALUE *argv, VALUE self) {
3153
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3154
+ int arg2 ;
3155
+ void *argp1 = 0 ;
3156
+ int res1 = 0 ;
3157
+ int val2 ;
3158
+ int ecode2 = 0 ;
3159
+ char *result = 0 ;
3160
+ VALUE vresult = Qnil;
3161
+
3162
+ if ((argc < 2) || (argc > 2)) {
3163
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3164
+ }
3165
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3166
+ if (!SWIG_IsOK(res1)) {
3167
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_bind_parameter_name", 1, argv[0] ));
3168
+ }
3169
+ arg1 = (sqlite3_stmt *)(argp1);
3170
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3171
+ if (!SWIG_IsOK(ecode2)) {
3172
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_bind_parameter_name", 2, argv[1] ));
3173
+ }
3174
+ arg2 = (int)(val2);
3175
+ result = (char *)sqlite3_bind_parameter_name(arg1,arg2);
3176
+ {
3177
+ vresult = result ? rb_str_new2(result) : Qnil;
3178
+ }
3179
+ return vresult;
3180
+ fail:
3181
+ return Qnil;
3182
+ }
3183
+
3184
+
3185
+ SWIGINTERN VALUE
3186
+ _wrap_sqlite3_bind_parameter_index(int argc, VALUE *argv, VALUE self) {
3187
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3188
+ char *arg2 = (char *) 0 ;
3189
+ void *argp1 = 0 ;
3190
+ int res1 = 0 ;
3191
+ int res2 ;
3192
+ char *buf2 = 0 ;
3193
+ int alloc2 = 0 ;
3194
+ int result;
3195
+ VALUE vresult = Qnil;
3196
+
3197
+ if ((argc < 2) || (argc > 2)) {
3198
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3199
+ }
3200
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3201
+ if (!SWIG_IsOK(res1)) {
3202
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_bind_parameter_index", 1, argv[0] ));
3203
+ }
3204
+ arg1 = (sqlite3_stmt *)(argp1);
3205
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3206
+ if (!SWIG_IsOK(res2)) {
3207
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","sqlite3_bind_parameter_index", 2, argv[1] ));
3208
+ }
3209
+ arg2 = (char *)(buf2);
3210
+ result = (int)sqlite3_bind_parameter_index(arg1,(char const *)arg2);
3211
+ vresult = SWIG_From_int((int)(result));
3212
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3213
+ return vresult;
3214
+ fail:
3215
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3216
+ return Qnil;
3217
+ }
3218
+
3219
+
3220
+ SWIGINTERN VALUE
3221
+ _wrap_sqlite3_column_count(int argc, VALUE *argv, VALUE self) {
3222
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3223
+ void *argp1 = 0 ;
3224
+ int res1 = 0 ;
3225
+ int result;
3226
+ VALUE vresult = Qnil;
3227
+
3228
+ if ((argc < 1) || (argc > 1)) {
3229
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3230
+ }
3231
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3232
+ if (!SWIG_IsOK(res1)) {
3233
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_count", 1, argv[0] ));
3234
+ }
3235
+ arg1 = (sqlite3_stmt *)(argp1);
3236
+ result = (int)sqlite3_column_count(arg1);
3237
+ vresult = SWIG_From_int((int)(result));
3238
+ return vresult;
3239
+ fail:
3240
+ return Qnil;
3241
+ }
3242
+
3243
+
3244
+ SWIGINTERN VALUE
3245
+ _wrap_sqlite3_column_name(int argc, VALUE *argv, VALUE self) {
3246
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3247
+ int arg2 ;
3248
+ void *argp1 = 0 ;
3249
+ int res1 = 0 ;
3250
+ int val2 ;
3251
+ int ecode2 = 0 ;
3252
+ char *result = 0 ;
3253
+ VALUE vresult = Qnil;
3254
+
3255
+ if ((argc < 2) || (argc > 2)) {
3256
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3257
+ }
3258
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3259
+ if (!SWIG_IsOK(res1)) {
3260
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_name", 1, argv[0] ));
3261
+ }
3262
+ arg1 = (sqlite3_stmt *)(argp1);
3263
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3264
+ if (!SWIG_IsOK(ecode2)) {
3265
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_name", 2, argv[1] ));
3266
+ }
3267
+ arg2 = (int)(val2);
3268
+ result = (char *)sqlite3_column_name(arg1,arg2);
3269
+ {
3270
+ vresult = result ? rb_str_new2(result) : Qnil;
3271
+ }
3272
+ return vresult;
3273
+ fail:
3274
+ return Qnil;
3275
+ }
3276
+
3277
+
3278
+ SWIGINTERN VALUE
3279
+ _wrap_sqlite3_column_name16(int argc, VALUE *argv, VALUE self) {
3280
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3281
+ int arg2 ;
3282
+ void *argp1 = 0 ;
3283
+ int res1 = 0 ;
3284
+ int val2 ;
3285
+ int ecode2 = 0 ;
3286
+ void *result = 0 ;
3287
+ VALUE vresult = Qnil;
3288
+
3289
+ if ((argc < 2) || (argc > 2)) {
3290
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3291
+ }
3292
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3293
+ if (!SWIG_IsOK(res1)) {
3294
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_name16", 1, argv[0] ));
3295
+ }
3296
+ arg1 = (sqlite3_stmt *)(argp1);
3297
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3298
+ if (!SWIG_IsOK(ecode2)) {
3299
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_name16", 2, argv[1] ));
3300
+ }
3301
+ arg2 = (int)(val2);
3302
+ result = (void *)sqlite3_column_name16(arg1,arg2);
3303
+ {
3304
+ int i;
3305
+ if( result ) {
3306
+ for( i = 0; ((char*)result)[i]; i += 2 );
3307
+ vresult = rb_str_new( (char*)result, i );
3308
+ } else vresult = Qnil;
3309
+ }
3310
+ return vresult;
3311
+ fail:
3312
+ return Qnil;
3313
+ }
3314
+
3315
+
3316
+ SWIGINTERN VALUE
3317
+ _wrap_sqlite3_column_decltype(int argc, VALUE *argv, VALUE self) {
3318
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3319
+ int arg2 ;
3320
+ void *argp1 = 0 ;
3321
+ int res1 = 0 ;
3322
+ int val2 ;
3323
+ int ecode2 = 0 ;
3324
+ char *result = 0 ;
3325
+ VALUE vresult = Qnil;
3326
+
3327
+ if ((argc < 2) || (argc > 2)) {
3328
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3329
+ }
3330
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3331
+ if (!SWIG_IsOK(res1)) {
3332
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_decltype", 1, argv[0] ));
3333
+ }
3334
+ arg1 = (sqlite3_stmt *)(argp1);
3335
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3336
+ if (!SWIG_IsOK(ecode2)) {
3337
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_decltype", 2, argv[1] ));
3338
+ }
3339
+ arg2 = (int)(val2);
3340
+ result = (char *)sqlite3_column_decltype(arg1,arg2);
3341
+ {
3342
+ vresult = result ? rb_str_new2(result) : Qnil;
3343
+ }
3344
+ return vresult;
3345
+ fail:
3346
+ return Qnil;
3347
+ }
3348
+
3349
+
3350
+ SWIGINTERN VALUE
3351
+ _wrap_sqlite3_column_decltype16(int argc, VALUE *argv, VALUE self) {
3352
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3353
+ int arg2 ;
3354
+ void *argp1 = 0 ;
3355
+ int res1 = 0 ;
3356
+ int val2 ;
3357
+ int ecode2 = 0 ;
3358
+ void *result = 0 ;
3359
+ VALUE vresult = Qnil;
3360
+
3361
+ if ((argc < 2) || (argc > 2)) {
3362
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3363
+ }
3364
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3365
+ if (!SWIG_IsOK(res1)) {
3366
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_decltype16", 1, argv[0] ));
3367
+ }
3368
+ arg1 = (sqlite3_stmt *)(argp1);
3369
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3370
+ if (!SWIG_IsOK(ecode2)) {
3371
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_decltype16", 2, argv[1] ));
3372
+ }
3373
+ arg2 = (int)(val2);
3374
+ result = (void *)sqlite3_column_decltype16(arg1,arg2);
3375
+ {
3376
+ int i;
3377
+ if( result ) {
3378
+ for( i = 0; ((char*)result)[i]; i += 2 );
3379
+ vresult = rb_str_new( (char*)result, i );
3380
+ } else vresult = Qnil;
3381
+ }
3382
+ return vresult;
3383
+ fail:
3384
+ return Qnil;
3385
+ }
3386
+
3387
+
3388
+ SWIGINTERN VALUE
3389
+ _wrap_sqlite3_step(int argc, VALUE *argv, VALUE self) {
3390
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3391
+ void *argp1 = 0 ;
3392
+ int res1 = 0 ;
3393
+ int result;
3394
+ VALUE vresult = Qnil;
3395
+
3396
+ if ((argc < 1) || (argc > 1)) {
3397
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3398
+ }
3399
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3400
+ if (!SWIG_IsOK(res1)) {
3401
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_step", 1, argv[0] ));
3402
+ }
3403
+ arg1 = (sqlite3_stmt *)(argp1);
3404
+ result = (int)sqlite3_step(arg1);
3405
+ vresult = SWIG_From_int((int)(result));
3406
+ return vresult;
3407
+ fail:
3408
+ return Qnil;
3409
+ }
3410
+
3411
+
3412
+ SWIGINTERN VALUE
3413
+ _wrap_sqlite3_data_count(int argc, VALUE *argv, VALUE self) {
3414
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3415
+ void *argp1 = 0 ;
3416
+ int res1 = 0 ;
3417
+ int result;
3418
+ VALUE vresult = Qnil;
3419
+
3420
+ if ((argc < 1) || (argc > 1)) {
3421
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3422
+ }
3423
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3424
+ if (!SWIG_IsOK(res1)) {
3425
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_data_count", 1, argv[0] ));
3426
+ }
3427
+ arg1 = (sqlite3_stmt *)(argp1);
3428
+ result = (int)sqlite3_data_count(arg1);
3429
+ vresult = SWIG_From_int((int)(result));
3430
+ return vresult;
3431
+ fail:
3432
+ return Qnil;
3433
+ }
3434
+
3435
+
3436
+ SWIGINTERN VALUE
3437
+ _wrap_sqlite3_column_blob(int argc, VALUE *argv, VALUE self) {
3438
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3439
+ int arg2 ;
3440
+ void *argp1 = 0 ;
3441
+ int res1 = 0 ;
3442
+ int val2 ;
3443
+ int ecode2 = 0 ;
3444
+ RUBY_BLOB *result = 0 ;
3445
+ VALUE vresult = Qnil;
3446
+
3447
+ if ((argc < 2) || (argc > 2)) {
3448
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3449
+ }
3450
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3451
+ if (!SWIG_IsOK(res1)) {
3452
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_blob", 1, argv[0] ));
3453
+ }
3454
+ arg1 = (sqlite3_stmt *)(argp1);
3455
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3456
+ if (!SWIG_IsOK(ecode2)) {
3457
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_blob", 2, argv[1] ));
3458
+ }
3459
+ arg2 = (int)(val2);
3460
+ result = (RUBY_BLOB *)sqlite3_column_blob(arg1,arg2);
3461
+ {
3462
+ vresult = result ?
3463
+ rb_str_new( (char*)result, sqlite3_column_bytes( arg1, arg2 ) ) : Qnil;
3464
+ }
3465
+ return vresult;
3466
+ fail:
3467
+ return Qnil;
3468
+ }
3469
+
3470
+
3471
+ SWIGINTERN VALUE
3472
+ _wrap_sqlite3_column_bytes(int argc, VALUE *argv, VALUE self) {
3473
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3474
+ int arg2 ;
3475
+ void *argp1 = 0 ;
3476
+ int res1 = 0 ;
3477
+ int val2 ;
3478
+ int ecode2 = 0 ;
3479
+ int result;
3480
+ VALUE vresult = Qnil;
3481
+
3482
+ if ((argc < 2) || (argc > 2)) {
3483
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3484
+ }
3485
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3486
+ if (!SWIG_IsOK(res1)) {
3487
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_bytes", 1, argv[0] ));
3488
+ }
3489
+ arg1 = (sqlite3_stmt *)(argp1);
3490
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3491
+ if (!SWIG_IsOK(ecode2)) {
3492
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_bytes", 2, argv[1] ));
3493
+ }
3494
+ arg2 = (int)(val2);
3495
+ result = (int)sqlite3_column_bytes(arg1,arg2);
3496
+ vresult = SWIG_From_int((int)(result));
3497
+ return vresult;
3498
+ fail:
3499
+ return Qnil;
3500
+ }
3501
+
3502
+
3503
+ SWIGINTERN VALUE
3504
+ _wrap_sqlite3_column_bytes16(int argc, VALUE *argv, VALUE self) {
3505
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3506
+ int arg2 ;
3507
+ void *argp1 = 0 ;
3508
+ int res1 = 0 ;
3509
+ int val2 ;
3510
+ int ecode2 = 0 ;
3511
+ int result;
3512
+ VALUE vresult = Qnil;
3513
+
3514
+ if ((argc < 2) || (argc > 2)) {
3515
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3516
+ }
3517
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3518
+ if (!SWIG_IsOK(res1)) {
3519
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_bytes16", 1, argv[0] ));
3520
+ }
3521
+ arg1 = (sqlite3_stmt *)(argp1);
3522
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3523
+ if (!SWIG_IsOK(ecode2)) {
3524
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_bytes16", 2, argv[1] ));
3525
+ }
3526
+ arg2 = (int)(val2);
3527
+ result = (int)sqlite3_column_bytes16(arg1,arg2);
3528
+ vresult = SWIG_From_int((int)(result));
3529
+ return vresult;
3530
+ fail:
3531
+ return Qnil;
3532
+ }
3533
+
3534
+
3535
+ SWIGINTERN VALUE
3536
+ _wrap_sqlite3_column_double(int argc, VALUE *argv, VALUE self) {
3537
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3538
+ int arg2 ;
3539
+ void *argp1 = 0 ;
3540
+ int res1 = 0 ;
3541
+ int val2 ;
3542
+ int ecode2 = 0 ;
3543
+ double result;
3544
+ VALUE vresult = Qnil;
3545
+
3546
+ if ((argc < 2) || (argc > 2)) {
3547
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3548
+ }
3549
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3550
+ if (!SWIG_IsOK(res1)) {
3551
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_double", 1, argv[0] ));
3552
+ }
3553
+ arg1 = (sqlite3_stmt *)(argp1);
3554
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3555
+ if (!SWIG_IsOK(ecode2)) {
3556
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_double", 2, argv[1] ));
3557
+ }
3558
+ arg2 = (int)(val2);
3559
+ result = (double)sqlite3_column_double(arg1,arg2);
3560
+ vresult = SWIG_From_double((double)(result));
3561
+ return vresult;
3562
+ fail:
3563
+ return Qnil;
3564
+ }
3565
+
3566
+
3567
+ SWIGINTERN VALUE
3568
+ _wrap_sqlite3_column_int(int argc, VALUE *argv, VALUE self) {
3569
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3570
+ int arg2 ;
3571
+ void *argp1 = 0 ;
3572
+ int res1 = 0 ;
3573
+ int val2 ;
3574
+ int ecode2 = 0 ;
3575
+ double result;
3576
+ VALUE vresult = Qnil;
3577
+
3578
+ if ((argc < 2) || (argc > 2)) {
3579
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3580
+ }
3581
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3582
+ if (!SWIG_IsOK(res1)) {
3583
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_int", 1, argv[0] ));
3584
+ }
3585
+ arg1 = (sqlite3_stmt *)(argp1);
3586
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3587
+ if (!SWIG_IsOK(ecode2)) {
3588
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_int", 2, argv[1] ));
3589
+ }
3590
+ arg2 = (int)(val2);
3591
+ result = (double)sqlite3_column_int(arg1,arg2);
3592
+ vresult = SWIG_From_double((double)(result));
3593
+ return vresult;
3594
+ fail:
3595
+ return Qnil;
3596
+ }
3597
+
3598
+
3599
+ SWIGINTERN VALUE
3600
+ _wrap_sqlite3_column_int64(int argc, VALUE *argv, VALUE self) {
3601
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3602
+ int arg2 ;
3603
+ void *argp1 = 0 ;
3604
+ int res1 = 0 ;
3605
+ int val2 ;
3606
+ int ecode2 = 0 ;
3607
+ sqlite_int64 result;
3608
+ VALUE vresult = Qnil;
3609
+
3610
+ if ((argc < 2) || (argc > 2)) {
3611
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3612
+ }
3613
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3614
+ if (!SWIG_IsOK(res1)) {
3615
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_int64", 1, argv[0] ));
3616
+ }
3617
+ arg1 = (sqlite3_stmt *)(argp1);
3618
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3619
+ if (!SWIG_IsOK(ecode2)) {
3620
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_int64", 2, argv[1] ));
3621
+ }
3622
+ arg2 = (int)(val2);
3623
+ result = sqlite3_column_int64(arg1,arg2);
3624
+ {
3625
+ vresult = rb_ll2inum( result );
3626
+ }
3627
+ return vresult;
3628
+ fail:
3629
+ return Qnil;
3630
+ }
3631
+
3632
+
3633
+ SWIGINTERN VALUE
3634
+ _wrap_sqlite3_column_text(int argc, VALUE *argv, VALUE self) {
3635
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3636
+ int arg2 ;
3637
+ void *argp1 = 0 ;
3638
+ int res1 = 0 ;
3639
+ int val2 ;
3640
+ int ecode2 = 0 ;
3641
+ char *result = 0 ;
3642
+ VALUE vresult = Qnil;
3643
+
3644
+ if ((argc < 2) || (argc > 2)) {
3645
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3646
+ }
3647
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3648
+ if (!SWIG_IsOK(res1)) {
3649
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_text", 1, argv[0] ));
3650
+ }
3651
+ arg1 = (sqlite3_stmt *)(argp1);
3652
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3653
+ if (!SWIG_IsOK(ecode2)) {
3654
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_text", 2, argv[1] ));
3655
+ }
3656
+ arg2 = (int)(val2);
3657
+ result = (char *)sqlite3_column_text(arg1,arg2);
3658
+ {
3659
+ vresult = result ? rb_str_new2(result) : Qnil;
3660
+ }
3661
+ return vresult;
3662
+ fail:
3663
+ return Qnil;
3664
+ }
3665
+
3666
+
3667
+ SWIGINTERN VALUE
3668
+ _wrap_sqlite3_column_text16(int argc, VALUE *argv, VALUE self) {
3669
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3670
+ int arg2 ;
3671
+ void *argp1 = 0 ;
3672
+ int res1 = 0 ;
3673
+ int val2 ;
3674
+ int ecode2 = 0 ;
3675
+ void *result = 0 ;
3676
+ VALUE vresult = Qnil;
3677
+
3678
+ if ((argc < 2) || (argc > 2)) {
3679
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3680
+ }
3681
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3682
+ if (!SWIG_IsOK(res1)) {
3683
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_text16", 1, argv[0] ));
3684
+ }
3685
+ arg1 = (sqlite3_stmt *)(argp1);
3686
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3687
+ if (!SWIG_IsOK(ecode2)) {
3688
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_text16", 2, argv[1] ));
3689
+ }
3690
+ arg2 = (int)(val2);
3691
+ result = (void *)sqlite3_column_text16(arg1,arg2);
3692
+ {
3693
+ int i;
3694
+ if( result ) {
3695
+ for( i = 0; ((char*)result)[i]; i += 2 );
3696
+ vresult = rb_str_new( (char*)result, i );
3697
+ } else vresult = Qnil;
3698
+ }
3699
+ return vresult;
3700
+ fail:
3701
+ return Qnil;
3702
+ }
3703
+
3704
+
3705
+ SWIGINTERN VALUE
3706
+ _wrap_sqlite3_column_type(int argc, VALUE *argv, VALUE self) {
3707
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3708
+ int arg2 ;
3709
+ void *argp1 = 0 ;
3710
+ int res1 = 0 ;
3711
+ int val2 ;
3712
+ int ecode2 = 0 ;
3713
+ int result;
3714
+ VALUE vresult = Qnil;
3715
+
3716
+ if ((argc < 2) || (argc > 2)) {
3717
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3718
+ }
3719
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3720
+ if (!SWIG_IsOK(res1)) {
3721
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_column_type", 1, argv[0] ));
3722
+ }
3723
+ arg1 = (sqlite3_stmt *)(argp1);
3724
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3725
+ if (!SWIG_IsOK(ecode2)) {
3726
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_column_type", 2, argv[1] ));
3727
+ }
3728
+ arg2 = (int)(val2);
3729
+ result = (int)sqlite3_column_type(arg1,arg2);
3730
+ vresult = SWIG_From_int((int)(result));
3731
+ return vresult;
3732
+ fail:
3733
+ return Qnil;
3734
+ }
3735
+
3736
+
3737
+ SWIGINTERN VALUE
3738
+ _wrap_sqlite3_finalize(int argc, VALUE *argv, VALUE self) {
3739
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3740
+ void *argp1 = 0 ;
3741
+ int res1 = 0 ;
3742
+ int result;
3743
+ VALUE vresult = Qnil;
3744
+
3745
+ if ((argc < 1) || (argc > 1)) {
3746
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3747
+ }
3748
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3749
+ if (!SWIG_IsOK(res1)) {
3750
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_finalize", 1, argv[0] ));
3751
+ }
3752
+ arg1 = (sqlite3_stmt *)(argp1);
3753
+ result = (int)sqlite3_finalize(arg1);
3754
+ vresult = SWIG_From_int((int)(result));
3755
+ return vresult;
3756
+ fail:
3757
+ return Qnil;
3758
+ }
3759
+
3760
+
3761
+ SWIGINTERN VALUE
3762
+ _wrap_sqlite3_reset(int argc, VALUE *argv, VALUE self) {
3763
+ sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ;
3764
+ void *argp1 = 0 ;
3765
+ int res1 = 0 ;
3766
+ int result;
3767
+ VALUE vresult = Qnil;
3768
+
3769
+ if ((argc < 1) || (argc > 1)) {
3770
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3771
+ }
3772
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_stmt, 0 | 0 );
3773
+ if (!SWIG_IsOK(res1)) {
3774
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_stmt *","sqlite3_reset", 1, argv[0] ));
3775
+ }
3776
+ arg1 = (sqlite3_stmt *)(argp1);
3777
+ result = (int)sqlite3_reset(arg1);
3778
+ vresult = SWIG_From_int((int)(result));
3779
+ return vresult;
3780
+ fail:
3781
+ return Qnil;
3782
+ }
3783
+
3784
+
3785
+ SWIGINTERN VALUE
3786
+ _wrap_sqlite3_create_function(int argc, VALUE *argv, VALUE self) {
3787
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
3788
+ char *arg2 = (char *) 0 ;
3789
+ int arg3 ;
3790
+ int arg4 ;
3791
+ void *arg5 = (void *) 0 ;
3792
+ void (*arg6)(sqlite3_context *,int,sqlite3_value **) = (void (*)(sqlite3_context *,int,sqlite3_value **)) 0 ;
3793
+ void (*arg7)(sqlite3_context *,int,sqlite3_value **) = (void (*)(sqlite3_context *,int,sqlite3_value **)) 0 ;
3794
+ void (*arg8)(sqlite3_context *) = (void (*)(sqlite3_context *)) 0 ;
3795
+ void *argp1 = 0 ;
3796
+ int res1 = 0 ;
3797
+ int res2 ;
3798
+ char *buf2 = 0 ;
3799
+ int alloc2 = 0 ;
3800
+ int val3 ;
3801
+ int ecode3 = 0 ;
3802
+ int val4 ;
3803
+ int ecode4 = 0 ;
3804
+ int res5 ;
3805
+ int result;
3806
+ VALUE vresult = Qnil;
3807
+
3808
+ if ((argc < 8) || (argc > 8)) {
3809
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 8)",argc); SWIG_fail;
3810
+ }
3811
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
3812
+ if (!SWIG_IsOK(res1)) {
3813
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_create_function", 1, argv[0] ));
3814
+ }
3815
+ arg1 = (sqlite3 *)(argp1);
3816
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3817
+ if (!SWIG_IsOK(res2)) {
3818
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","sqlite3_create_function", 2, argv[1] ));
3819
+ }
3820
+ arg2 = (char *)(buf2);
3821
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3822
+ if (!SWIG_IsOK(ecode3)) {
3823
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","sqlite3_create_function", 3, argv[2] ));
3824
+ }
3825
+ arg3 = (int)(val3);
3826
+ ecode4 = SWIG_AsVal_int(argv[3], &val4);
3827
+ if (!SWIG_IsOK(ecode4)) {
3828
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","sqlite3_create_function", 4, argv[3] ));
3829
+ }
3830
+ arg4 = (int)(val4);
3831
+ res5 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg5), 0, 0);
3832
+ if (!SWIG_IsOK(res5)) {
3833
+ SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "void *","sqlite3_create_function", 5, argv[4] ));
3834
+ }
3835
+ {
3836
+ int res = SWIG_ConvertFunctionPtr(argv[5], (void**)(&arg6), SWIGTYPE_p_f_p_sqlite3_context_int_p_p_sqlite3_value__void);
3837
+ if (!SWIG_IsOK(res)) {
3838
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(sqlite3_context *,int,sqlite3_value **)","sqlite3_create_function", 6, argv[5] ));
3839
+ }
3840
+ }
3841
+ {
3842
+ int res = SWIG_ConvertFunctionPtr(argv[6], (void**)(&arg7), SWIGTYPE_p_f_p_sqlite3_context_int_p_p_sqlite3_value__void);
3843
+ if (!SWIG_IsOK(res)) {
3844
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(sqlite3_context *,int,sqlite3_value **)","sqlite3_create_function", 7, argv[6] ));
3845
+ }
3846
+ }
3847
+ {
3848
+ int res = SWIG_ConvertFunctionPtr(argv[7], (void**)(&arg8), SWIGTYPE_p_f_p_sqlite3_context__void);
3849
+ if (!SWIG_IsOK(res)) {
3850
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(sqlite3_context *)","sqlite3_create_function", 8, argv[7] ));
3851
+ }
3852
+ }
3853
+ result = (int)sqlite3_create_function(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
3854
+ vresult = SWIG_From_int((int)(result));
3855
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3856
+ return vresult;
3857
+ fail:
3858
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3859
+ return Qnil;
3860
+ }
3861
+
3862
+
3863
+ SWIGINTERN VALUE
3864
+ _wrap_sqlite3_create_function16(int argc, VALUE *argv, VALUE self) {
3865
+ sqlite3 *arg1 = (sqlite3 *) 0 ;
3866
+ void *arg2 = (void *) 0 ;
3867
+ int arg3 ;
3868
+ int arg4 ;
3869
+ void *arg5 = (void *) 0 ;
3870
+ void (*arg6)(sqlite3_context *,int,sqlite3_value **) = (void (*)(sqlite3_context *,int,sqlite3_value **)) 0 ;
3871
+ void (*arg7)(sqlite3_context *,int,sqlite3_value **) = (void (*)(sqlite3_context *,int,sqlite3_value **)) 0 ;
3872
+ void (*arg8)(sqlite3_context *) = (void (*)(sqlite3_context *)) 0 ;
3873
+ void *argp1 = 0 ;
3874
+ int res1 = 0 ;
3875
+ int val3 ;
3876
+ int ecode3 = 0 ;
3877
+ int val4 ;
3878
+ int ecode4 = 0 ;
3879
+ int res5 ;
3880
+ int result;
3881
+ VALUE vresult = Qnil;
3882
+
3883
+ if ((argc < 8) || (argc > 8)) {
3884
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 8)",argc); SWIG_fail;
3885
+ }
3886
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3, 0 | 0 );
3887
+ if (!SWIG_IsOK(res1)) {
3888
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3 *","sqlite3_create_function16", 1, argv[0] ));
3889
+ }
3890
+ arg1 = (sqlite3 *)(argp1);
3891
+ {
3892
+ arg2 = (void*)RSTRING_PTR(argv[1]);
3893
+ }
3894
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3895
+ if (!SWIG_IsOK(ecode3)) {
3896
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","sqlite3_create_function16", 3, argv[2] ));
3897
+ }
3898
+ arg3 = (int)(val3);
3899
+ ecode4 = SWIG_AsVal_int(argv[3], &val4);
3900
+ if (!SWIG_IsOK(ecode4)) {
3901
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","sqlite3_create_function16", 4, argv[3] ));
3902
+ }
3903
+ arg4 = (int)(val4);
3904
+ res5 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg5), 0, 0);
3905
+ if (!SWIG_IsOK(res5)) {
3906
+ SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "void *","sqlite3_create_function16", 5, argv[4] ));
3907
+ }
3908
+ {
3909
+ int res = SWIG_ConvertFunctionPtr(argv[5], (void**)(&arg6), SWIGTYPE_p_f_p_sqlite3_context_int_p_p_sqlite3_value__void);
3910
+ if (!SWIG_IsOK(res)) {
3911
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(sqlite3_context *,int,sqlite3_value **)","sqlite3_create_function16", 6, argv[5] ));
3912
+ }
3913
+ }
3914
+ {
3915
+ int res = SWIG_ConvertFunctionPtr(argv[6], (void**)(&arg7), SWIGTYPE_p_f_p_sqlite3_context_int_p_p_sqlite3_value__void);
3916
+ if (!SWIG_IsOK(res)) {
3917
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(sqlite3_context *,int,sqlite3_value **)","sqlite3_create_function16", 7, argv[6] ));
3918
+ }
3919
+ }
3920
+ {
3921
+ int res = SWIG_ConvertFunctionPtr(argv[7], (void**)(&arg8), SWIGTYPE_p_f_p_sqlite3_context__void);
3922
+ if (!SWIG_IsOK(res)) {
3923
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(sqlite3_context *)","sqlite3_create_function16", 8, argv[7] ));
3924
+ }
3925
+ }
3926
+ result = (int)sqlite3_create_function16(arg1,(void const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
3927
+ vresult = SWIG_From_int((int)(result));
3928
+ return vresult;
3929
+ fail:
3930
+ return Qnil;
3931
+ }
3932
+
3933
+
3934
+ SWIGINTERN VALUE
3935
+ _wrap_sqlite3_aggregate_count(int argc, VALUE *argv, VALUE self) {
3936
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
3937
+ void *argp1 = 0 ;
3938
+ int res1 = 0 ;
3939
+ int result;
3940
+ VALUE vresult = Qnil;
3941
+
3942
+ if ((argc < 1) || (argc > 1)) {
3943
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3944
+ }
3945
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_context, 0 | 0 );
3946
+ if (!SWIG_IsOK(res1)) {
3947
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_context *","sqlite3_aggregate_count", 1, argv[0] ));
3948
+ }
3949
+ arg1 = (sqlite3_context *)(argp1);
3950
+ result = (int)sqlite3_aggregate_count(arg1);
3951
+ vresult = SWIG_From_int((int)(result));
3952
+ return vresult;
3953
+ fail:
3954
+ return Qnil;
3955
+ }
3956
+
3957
+
3958
+ SWIGINTERN VALUE
3959
+ _wrap_sqlite3_value_blob(int argc, VALUE *argv, VALUE self) {
3960
+ sqlite3_value *arg1 = (sqlite3_value *) 0 ;
3961
+ void *argp1 = 0 ;
3962
+ int res1 = 0 ;
3963
+ RUBY_VALBLOB *result = 0 ;
3964
+ VALUE vresult = Qnil;
3965
+
3966
+ if ((argc < 1) || (argc > 1)) {
3967
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3968
+ }
3969
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_value, 0 | 0 );
3970
+ if (!SWIG_IsOK(res1)) {
3971
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_value *","sqlite3_value_blob", 1, argv[0] ));
3972
+ }
3973
+ arg1 = (sqlite3_value *)(argp1);
3974
+ result = (RUBY_VALBLOB *)sqlite3_value_blob(arg1);
3975
+ {
3976
+ vresult = result ? rb_str_new( (char*)result, sqlite3_value_bytes( arg1 ) ) : Qnil;
3977
+ }
3978
+ return vresult;
3979
+ fail:
3980
+ return Qnil;
3981
+ }
3982
+
3983
+
3984
+ SWIGINTERN VALUE
3985
+ _wrap_sqlite3_value_bytes(int argc, VALUE *argv, VALUE self) {
3986
+ sqlite3_value *arg1 = (sqlite3_value *) 0 ;
3987
+ void *argp1 = 0 ;
3988
+ int res1 = 0 ;
3989
+ int result;
3990
+ VALUE vresult = Qnil;
3991
+
3992
+ if ((argc < 1) || (argc > 1)) {
3993
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3994
+ }
3995
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_value, 0 | 0 );
3996
+ if (!SWIG_IsOK(res1)) {
3997
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_value *","sqlite3_value_bytes", 1, argv[0] ));
3998
+ }
3999
+ arg1 = (sqlite3_value *)(argp1);
4000
+ result = (int)sqlite3_value_bytes(arg1);
4001
+ vresult = SWIG_From_int((int)(result));
4002
+ return vresult;
4003
+ fail:
4004
+ return Qnil;
4005
+ }
4006
+
4007
+
4008
+ SWIGINTERN VALUE
4009
+ _wrap_sqlite3_value_bytes16(int argc, VALUE *argv, VALUE self) {
4010
+ sqlite3_value *arg1 = (sqlite3_value *) 0 ;
4011
+ void *argp1 = 0 ;
4012
+ int res1 = 0 ;
4013
+ int result;
4014
+ VALUE vresult = Qnil;
4015
+
4016
+ if ((argc < 1) || (argc > 1)) {
4017
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4018
+ }
4019
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_value, 0 | 0 );
4020
+ if (!SWIG_IsOK(res1)) {
4021
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_value *","sqlite3_value_bytes16", 1, argv[0] ));
4022
+ }
4023
+ arg1 = (sqlite3_value *)(argp1);
4024
+ result = (int)sqlite3_value_bytes16(arg1);
4025
+ vresult = SWIG_From_int((int)(result));
4026
+ return vresult;
4027
+ fail:
4028
+ return Qnil;
4029
+ }
4030
+
4031
+
4032
+ SWIGINTERN VALUE
4033
+ _wrap_sqlite3_value_double(int argc, VALUE *argv, VALUE self) {
4034
+ sqlite3_value *arg1 = (sqlite3_value *) 0 ;
4035
+ void *argp1 = 0 ;
4036
+ int res1 = 0 ;
4037
+ double result;
4038
+ VALUE vresult = Qnil;
4039
+
4040
+ if ((argc < 1) || (argc > 1)) {
4041
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4042
+ }
4043
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_value, 0 | 0 );
4044
+ if (!SWIG_IsOK(res1)) {
4045
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_value *","sqlite3_value_double", 1, argv[0] ));
4046
+ }
4047
+ arg1 = (sqlite3_value *)(argp1);
4048
+ result = (double)sqlite3_value_double(arg1);
4049
+ vresult = SWIG_From_double((double)(result));
4050
+ return vresult;
4051
+ fail:
4052
+ return Qnil;
4053
+ }
4054
+
4055
+
4056
+ SWIGINTERN VALUE
4057
+ _wrap_sqlite3_value_int(int argc, VALUE *argv, VALUE self) {
4058
+ sqlite3_value *arg1 = (sqlite3_value *) 0 ;
4059
+ void *argp1 = 0 ;
4060
+ int res1 = 0 ;
4061
+ int result;
4062
+ VALUE vresult = Qnil;
4063
+
4064
+ if ((argc < 1) || (argc > 1)) {
4065
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4066
+ }
4067
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_value, 0 | 0 );
4068
+ if (!SWIG_IsOK(res1)) {
4069
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_value *","sqlite3_value_int", 1, argv[0] ));
4070
+ }
4071
+ arg1 = (sqlite3_value *)(argp1);
4072
+ result = (int)sqlite3_value_int(arg1);
4073
+ vresult = SWIG_From_int((int)(result));
4074
+ return vresult;
4075
+ fail:
4076
+ return Qnil;
4077
+ }
4078
+
4079
+
4080
+ SWIGINTERN VALUE
4081
+ _wrap_sqlite3_value_int64(int argc, VALUE *argv, VALUE self) {
4082
+ sqlite3_value *arg1 = (sqlite3_value *) 0 ;
4083
+ void *argp1 = 0 ;
4084
+ int res1 = 0 ;
4085
+ sqlite_int64 result;
4086
+ VALUE vresult = Qnil;
4087
+
4088
+ if ((argc < 1) || (argc > 1)) {
4089
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4090
+ }
4091
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_value, 0 | 0 );
4092
+ if (!SWIG_IsOK(res1)) {
4093
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_value *","sqlite3_value_int64", 1, argv[0] ));
4094
+ }
4095
+ arg1 = (sqlite3_value *)(argp1);
4096
+ result = sqlite3_value_int64(arg1);
4097
+ {
4098
+ vresult = rb_ll2inum( result );
4099
+ }
4100
+ return vresult;
4101
+ fail:
4102
+ return Qnil;
4103
+ }
4104
+
4105
+
4106
+ SWIGINTERN VALUE
4107
+ _wrap_sqlite3_value_text(int argc, VALUE *argv, VALUE self) {
4108
+ sqlite3_value *arg1 = (sqlite3_value *) 0 ;
4109
+ void *argp1 = 0 ;
4110
+ int res1 = 0 ;
4111
+ char *result = 0 ;
4112
+ VALUE vresult = Qnil;
4113
+
4114
+ if ((argc < 1) || (argc > 1)) {
4115
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4116
+ }
4117
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_value, 0 | 0 );
4118
+ if (!SWIG_IsOK(res1)) {
4119
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_value *","sqlite3_value_text", 1, argv[0] ));
4120
+ }
4121
+ arg1 = (sqlite3_value *)(argp1);
4122
+ result = (char *)sqlite3_value_text(arg1);
4123
+ {
4124
+ vresult = result ? rb_str_new2(result) : Qnil;
4125
+ }
4126
+ return vresult;
4127
+ fail:
4128
+ return Qnil;
4129
+ }
4130
+
4131
+
4132
+ SWIGINTERN VALUE
4133
+ _wrap_sqlite3_value_text16(int argc, VALUE *argv, VALUE self) {
4134
+ sqlite3_value *arg1 = (sqlite3_value *) 0 ;
4135
+ void *argp1 = 0 ;
4136
+ int res1 = 0 ;
4137
+ void *result = 0 ;
4138
+ VALUE vresult = Qnil;
4139
+
4140
+ if ((argc < 1) || (argc > 1)) {
4141
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4142
+ }
4143
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_value, 0 | 0 );
4144
+ if (!SWIG_IsOK(res1)) {
4145
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_value *","sqlite3_value_text16", 1, argv[0] ));
4146
+ }
4147
+ arg1 = (sqlite3_value *)(argp1);
4148
+ result = (void *)sqlite3_value_text16(arg1);
4149
+ {
4150
+ int i;
4151
+ if( result ) {
4152
+ for( i = 0; ((char*)result)[i]; i += 2 );
4153
+ vresult = rb_str_new( (char*)result, i );
4154
+ } else vresult = Qnil;
4155
+ }
4156
+ return vresult;
4157
+ fail:
4158
+ return Qnil;
4159
+ }
4160
+
4161
+
4162
+ SWIGINTERN VALUE
4163
+ _wrap_sqlite3_value_text16le(int argc, VALUE *argv, VALUE self) {
4164
+ sqlite3_value *arg1 = (sqlite3_value *) 0 ;
4165
+ void *argp1 = 0 ;
4166
+ int res1 = 0 ;
4167
+ void *result = 0 ;
4168
+ VALUE vresult = Qnil;
4169
+
4170
+ if ((argc < 1) || (argc > 1)) {
4171
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4172
+ }
4173
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_value, 0 | 0 );
4174
+ if (!SWIG_IsOK(res1)) {
4175
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_value *","sqlite3_value_text16le", 1, argv[0] ));
4176
+ }
4177
+ arg1 = (sqlite3_value *)(argp1);
4178
+ result = (void *)sqlite3_value_text16le(arg1);
4179
+ {
4180
+ int i;
4181
+ if( result ) {
4182
+ for( i = 0; ((char*)result)[i]; i += 2 );
4183
+ vresult = rb_str_new( (char*)result, i );
4184
+ } else vresult = Qnil;
4185
+ }
4186
+ return vresult;
4187
+ fail:
4188
+ return Qnil;
4189
+ }
4190
+
4191
+
4192
+ SWIGINTERN VALUE
4193
+ _wrap_sqlite3_value_text16be(int argc, VALUE *argv, VALUE self) {
4194
+ sqlite3_value *arg1 = (sqlite3_value *) 0 ;
4195
+ void *argp1 = 0 ;
4196
+ int res1 = 0 ;
4197
+ void *result = 0 ;
4198
+ VALUE vresult = Qnil;
4199
+
4200
+ if ((argc < 1) || (argc > 1)) {
4201
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4202
+ }
4203
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_value, 0 | 0 );
4204
+ if (!SWIG_IsOK(res1)) {
4205
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_value *","sqlite3_value_text16be", 1, argv[0] ));
4206
+ }
4207
+ arg1 = (sqlite3_value *)(argp1);
4208
+ result = (void *)sqlite3_value_text16be(arg1);
4209
+ {
4210
+ int i;
4211
+ if( result ) {
4212
+ for( i = 0; ((char*)result)[i]; i += 2 );
4213
+ vresult = rb_str_new( (char*)result, i );
4214
+ } else vresult = Qnil;
4215
+ }
4216
+ return vresult;
4217
+ fail:
4218
+ return Qnil;
4219
+ }
4220
+
4221
+
4222
+ SWIGINTERN VALUE
4223
+ _wrap_sqlite3_value_type(int argc, VALUE *argv, VALUE self) {
4224
+ sqlite3_value *arg1 = (sqlite3_value *) 0 ;
4225
+ void *argp1 = 0 ;
4226
+ int res1 = 0 ;
4227
+ int result;
4228
+ VALUE vresult = Qnil;
4229
+
4230
+ if ((argc < 1) || (argc > 1)) {
4231
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4232
+ }
4233
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_value, 0 | 0 );
4234
+ if (!SWIG_IsOK(res1)) {
4235
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_value *","sqlite3_value_type", 1, argv[0] ));
4236
+ }
4237
+ arg1 = (sqlite3_value *)(argp1);
4238
+ result = (int)sqlite3_value_type(arg1);
4239
+ vresult = SWIG_From_int((int)(result));
4240
+ return vresult;
4241
+ fail:
4242
+ return Qnil;
4243
+ }
4244
+
4245
+
4246
+ SWIGINTERN VALUE
4247
+ _wrap_sqlite3_result_blob(int argc, VALUE *argv, VALUE self) {
4248
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
4249
+ void *arg2 = (void *) 0 ;
4250
+ int arg3 ;
4251
+ void (*arg4)(void *) = (void (*)(void *)) 0 ;
4252
+ void *argp1 = 0 ;
4253
+ int res1 = 0 ;
4254
+
4255
+ if ((argc < 2) || (argc > 2)) {
4256
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4257
+ }
4258
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_context, 0 | 0 );
4259
+ if (!SWIG_IsOK(res1)) {
4260
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_context *","sqlite3_result_blob", 1, argv[0] ));
4261
+ }
4262
+ arg1 = (sqlite3_context *)(argp1);
4263
+ {
4264
+ arg2 = (void*)RSTRING_PTR(argv[1]);
4265
+ arg3 = RSTRING_LEN(argv[1]);
4266
+ arg4 = SQLITE_TRANSIENT;
4267
+ }
4268
+ sqlite3_result_blob(arg1,(void const *)arg2,arg3,arg4);
4269
+ return Qnil;
4270
+ fail:
4271
+ return Qnil;
4272
+ }
4273
+
4274
+
4275
+ SWIGINTERN VALUE
4276
+ _wrap_sqlite3_result_double(int argc, VALUE *argv, VALUE self) {
4277
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
4278
+ double arg2 ;
4279
+ void *argp1 = 0 ;
4280
+ int res1 = 0 ;
4281
+ double val2 ;
4282
+ int ecode2 = 0 ;
4283
+
4284
+ if ((argc < 2) || (argc > 2)) {
4285
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4286
+ }
4287
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_context, 0 | 0 );
4288
+ if (!SWIG_IsOK(res1)) {
4289
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_context *","sqlite3_result_double", 1, argv[0] ));
4290
+ }
4291
+ arg1 = (sqlite3_context *)(argp1);
4292
+ ecode2 = SWIG_AsVal_double(argv[1], &val2);
4293
+ if (!SWIG_IsOK(ecode2)) {
4294
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","sqlite3_result_double", 2, argv[1] ));
4295
+ }
4296
+ arg2 = (double)(val2);
4297
+ sqlite3_result_double(arg1,arg2);
4298
+ return Qnil;
4299
+ fail:
4300
+ return Qnil;
4301
+ }
4302
+
4303
+
4304
+ SWIGINTERN VALUE
4305
+ _wrap_sqlite3_result_error(int argc, VALUE *argv, VALUE self) {
4306
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
4307
+ char *arg2 = (char *) 0 ;
4308
+ int arg3 ;
4309
+ void *argp1 = 0 ;
4310
+ int res1 = 0 ;
4311
+
4312
+ if ((argc < 2) || (argc > 2)) {
4313
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4314
+ }
4315
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_context, 0 | 0 );
4316
+ if (!SWIG_IsOK(res1)) {
4317
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_context *","sqlite3_result_error", 1, argv[0] ));
4318
+ }
4319
+ arg1 = (sqlite3_context *)(argp1);
4320
+ {
4321
+ arg2 = RSTRING_PTR(argv[1]);
4322
+ arg3 = RSTRING_LEN(argv[1]);
4323
+ }
4324
+ sqlite3_result_error(arg1,(char const *)arg2,arg3);
4325
+ return Qnil;
4326
+ fail:
4327
+ return Qnil;
4328
+ }
4329
+
4330
+
4331
+ SWIGINTERN VALUE
4332
+ _wrap_sqlite3_result_error16(int argc, VALUE *argv, VALUE self) {
4333
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
4334
+ void *arg2 = (void *) 0 ;
4335
+ int arg3 ;
4336
+ void *argp1 = 0 ;
4337
+ int res1 = 0 ;
4338
+
4339
+ if ((argc < 2) || (argc > 2)) {
4340
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4341
+ }
4342
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_context, 0 | 0 );
4343
+ if (!SWIG_IsOK(res1)) {
4344
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_context *","sqlite3_result_error16", 1, argv[0] ));
4345
+ }
4346
+ arg1 = (sqlite3_context *)(argp1);
4347
+ {
4348
+ arg2 = (void*)RSTRING_PTR(argv[1]);
4349
+ arg3 = RSTRING_LEN(argv[1]);
4350
+ }
4351
+ sqlite3_result_error16(arg1,(void const *)arg2,arg3);
4352
+ return Qnil;
4353
+ fail:
4354
+ return Qnil;
4355
+ }
4356
+
4357
+
4358
+ SWIGINTERN VALUE
4359
+ _wrap_sqlite3_result_int(int argc, VALUE *argv, VALUE self) {
4360
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
4361
+ int arg2 ;
4362
+ void *argp1 = 0 ;
4363
+ int res1 = 0 ;
4364
+ int val2 ;
4365
+ int ecode2 = 0 ;
4366
+
4367
+ if ((argc < 2) || (argc > 2)) {
4368
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4369
+ }
4370
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_context, 0 | 0 );
4371
+ if (!SWIG_IsOK(res1)) {
4372
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_context *","sqlite3_result_int", 1, argv[0] ));
4373
+ }
4374
+ arg1 = (sqlite3_context *)(argp1);
4375
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
4376
+ if (!SWIG_IsOK(ecode2)) {
4377
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sqlite3_result_int", 2, argv[1] ));
4378
+ }
4379
+ arg2 = (int)(val2);
4380
+ sqlite3_result_int(arg1,arg2);
4381
+ return Qnil;
4382
+ fail:
4383
+ return Qnil;
4384
+ }
4385
+
4386
+
4387
+ SWIGINTERN VALUE
4388
+ _wrap_sqlite3_result_int64(int argc, VALUE *argv, VALUE self) {
4389
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
4390
+ sqlite_int64 arg2 ;
4391
+ void *argp1 = 0 ;
4392
+ int res1 = 0 ;
4393
+
4394
+ if ((argc < 2) || (argc > 2)) {
4395
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4396
+ }
4397
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_context, 0 | 0 );
4398
+ if (!SWIG_IsOK(res1)) {
4399
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_context *","sqlite3_result_int64", 1, argv[0] ));
4400
+ }
4401
+ arg1 = (sqlite3_context *)(argp1);
4402
+ {
4403
+ arg2 = rb_num2ll( argv[1] );
4404
+ }
4405
+ sqlite3_result_int64(arg1,arg2);
4406
+ return Qnil;
4407
+ fail:
4408
+ return Qnil;
4409
+ }
4410
+
4411
+
4412
+ SWIGINTERN VALUE
4413
+ _wrap_sqlite3_result_text(int argc, VALUE *argv, VALUE self) {
4414
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
4415
+ char *arg2 = (char *) 0 ;
4416
+ int arg3 ;
4417
+ void (*arg4)(void *) = (void (*)(void *)) 0 ;
4418
+ void *argp1 = 0 ;
4419
+ int res1 = 0 ;
4420
+
4421
+ if ((argc < 2) || (argc > 2)) {
4422
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4423
+ }
4424
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_context, 0 | 0 );
4425
+ if (!SWIG_IsOK(res1)) {
4426
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_context *","sqlite3_result_text", 1, argv[0] ));
4427
+ }
4428
+ arg1 = (sqlite3_context *)(argp1);
4429
+ {
4430
+ arg2 = RSTRING_PTR(argv[1]);
4431
+ arg3 = RSTRING_LEN(argv[1]);
4432
+ arg4 = SQLITE_TRANSIENT;
4433
+ }
4434
+ sqlite3_result_text(arg1,(char const *)arg2,arg3,arg4);
4435
+ return Qnil;
4436
+ fail:
4437
+ return Qnil;
4438
+ }
4439
+
4440
+
4441
+ SWIGINTERN VALUE
4442
+ _wrap_sqlite3_result_text16(int argc, VALUE *argv, VALUE self) {
4443
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
4444
+ void *arg2 = (void *) 0 ;
4445
+ int arg3 ;
4446
+ void (*arg4)(void *) = (void (*)(void *)) 0 ;
4447
+ void *argp1 = 0 ;
4448
+ int res1 = 0 ;
4449
+
4450
+ if ((argc < 2) || (argc > 2)) {
4451
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4452
+ }
4453
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_context, 0 | 0 );
4454
+ if (!SWIG_IsOK(res1)) {
4455
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_context *","sqlite3_result_text16", 1, argv[0] ));
4456
+ }
4457
+ arg1 = (sqlite3_context *)(argp1);
4458
+ {
4459
+ arg2 = (void*)RSTRING_PTR(argv[1]);
4460
+ arg3 = RSTRING_LEN(argv[1]);
4461
+ arg4 = SQLITE_TRANSIENT;
4462
+ }
4463
+ sqlite3_result_text16(arg1,(void const *)arg2,arg3,arg4);
4464
+ return Qnil;
4465
+ fail:
4466
+ return Qnil;
4467
+ }
4468
+
4469
+
4470
+ SWIGINTERN VALUE
4471
+ _wrap_sqlite3_result_text16le(int argc, VALUE *argv, VALUE self) {
4472
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
4473
+ void *arg2 = (void *) 0 ;
4474
+ int arg3 ;
4475
+ void (*arg4)(void *) = (void (*)(void *)) 0 ;
4476
+ void *argp1 = 0 ;
4477
+ int res1 = 0 ;
4478
+
4479
+ if ((argc < 2) || (argc > 2)) {
4480
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4481
+ }
4482
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_context, 0 | 0 );
4483
+ if (!SWIG_IsOK(res1)) {
4484
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_context *","sqlite3_result_text16le", 1, argv[0] ));
4485
+ }
4486
+ arg1 = (sqlite3_context *)(argp1);
4487
+ {
4488
+ arg2 = (void*)RSTRING_PTR(argv[1]);
4489
+ arg3 = RSTRING_LEN(argv[1]);
4490
+ arg4 = SQLITE_TRANSIENT;
4491
+ }
4492
+ sqlite3_result_text16le(arg1,(void const *)arg2,arg3,arg4);
4493
+ return Qnil;
4494
+ fail:
4495
+ return Qnil;
4496
+ }
4497
+
4498
+
4499
+ SWIGINTERN VALUE
4500
+ _wrap_sqlite3_result_text16be(int argc, VALUE *argv, VALUE self) {
4501
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
4502
+ void *arg2 = (void *) 0 ;
4503
+ int arg3 ;
4504
+ void (*arg4)(void *) = (void (*)(void *)) 0 ;
4505
+ void *argp1 = 0 ;
4506
+ int res1 = 0 ;
4507
+
4508
+ if ((argc < 2) || (argc > 2)) {
4509
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4510
+ }
4511
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_context, 0 | 0 );
4512
+ if (!SWIG_IsOK(res1)) {
4513
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_context *","sqlite3_result_text16be", 1, argv[0] ));
4514
+ }
4515
+ arg1 = (sqlite3_context *)(argp1);
4516
+ {
4517
+ arg2 = (void*)RSTRING_PTR(argv[1]);
4518
+ arg3 = RSTRING_LEN(argv[1]);
4519
+ arg4 = SQLITE_TRANSIENT;
4520
+ }
4521
+ sqlite3_result_text16be(arg1,(void const *)arg2,arg3,arg4);
4522
+ return Qnil;
4523
+ fail:
4524
+ return Qnil;
4525
+ }
4526
+
4527
+
4528
+ SWIGINTERN VALUE
4529
+ _wrap_sqlite3_result_value(int argc, VALUE *argv, VALUE self) {
4530
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
4531
+ sqlite3_value *arg2 = (sqlite3_value *) 0 ;
4532
+ void *argp1 = 0 ;
4533
+ int res1 = 0 ;
4534
+ void *argp2 = 0 ;
4535
+ int res2 = 0 ;
4536
+
4537
+ if ((argc < 2) || (argc > 2)) {
4538
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4539
+ }
4540
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_sqlite3_context, 0 | 0 );
4541
+ if (!SWIG_IsOK(res1)) {
4542
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "sqlite3_context *","sqlite3_result_value", 1, argv[0] ));
4543
+ }
4544
+ arg1 = (sqlite3_context *)(argp1);
4545
+ res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_sqlite3_value, 0 | 0 );
4546
+ if (!SWIG_IsOK(res2)) {
4547
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "sqlite3_value *","sqlite3_result_value", 2, argv[1] ));
4548
+ }
4549
+ arg2 = (sqlite3_value *)(argp2);
4550
+ sqlite3_result_value(arg1,arg2);
4551
+ return Qnil;
4552
+ fail:
4553
+ return Qnil;
4554
+ }
4555
+
4556
+
4557
+ SWIGINTERN VALUE
4558
+ _wrap_sqlite3_aggregate_context(int argc, VALUE *argv, VALUE self) {
4559
+ sqlite3_context *arg1 = (sqlite3_context *) 0 ;
4560
+ int arg2 ;
4561
+ VALUE *result = 0 ;
4562
+ VALUE vresult = Qnil;
4563
+
4564
+ if ((argc < 1) || (argc > 1)) {
4565
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4566
+ }
4567
+ {
4568
+ SWIG_ConvertPtr(argv[0],(void**)&arg1, SWIGTYPE_p_sqlite3_context, 1);
4569
+ arg2 = 4;
4570
+ }
4571
+ result = (VALUE *)sqlite3_aggregate_context(arg1,arg2);
4572
+ {
4573
+ vresult = *(VALUE*)result;
4574
+ }
4575
+ return vresult;
4576
+ fail:
4577
+ return Qnil;
4578
+ }
4579
+
4580
+
4581
+
4582
+ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
4583
+
4584
+ static swig_type_info _swigt__p_CallbackData = {"_p_CallbackData", "CallbackData *|struct CallbackData *", 0, 0, (void*)0, 0};
4585
+ static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
4586
+ static swig_type_info _swigt__p_f_p_sqlite3_context__void = {"_p_f_p_sqlite3_context__void", "void (*)(sqlite3_context *)", 0, 0, (void*)0, 0};
4587
+ static swig_type_info _swigt__p_f_p_sqlite3_context_int_p_p_sqlite3_value__void = {"_p_f_p_sqlite3_context_int_p_p_sqlite3_value__void", "void (*)(sqlite3_context *,int,sqlite3_value **)", 0, 0, (void*)0, 0};
4588
+ static swig_type_info _swigt__p_f_p_void__void = {"_p_f_p_void__void", "void (*)(void *)", 0, 0, (void*)0, 0};
4589
+ static swig_type_info _swigt__p_f_p_void_int__int = {"_p_f_p_void_int__int", "int (*)(void *,int)", 0, 0, (void*)0, 0};
4590
+ static swig_type_info _swigt__p_f_p_void_int_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char__int = {"_p_f_p_void_int_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char__int", "int (*)(void *,int,char const *,char const *,char const *,char const *)", 0, 0, (void*)0, 0};
4591
+ static swig_type_info _swigt__p_f_p_void_p_q_const__char__void = {"_p_f_p_void_p_q_const__char__void", "void (*)(void *,char const *)", 0, 0, (void*)0, 0};
4592
+ static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
4593
+ static swig_type_info _swigt__p_p_sqlite3 = {"_p_p_sqlite3", "sqlite3 **", 0, 0, (void*)0, 0};
4594
+ static swig_type_info _swigt__p_p_sqlite3_stmt = {"_p_p_sqlite3_stmt", "sqlite3_stmt **", 0, 0, (void*)0, 0};
4595
+ static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
4596
+ static swig_type_info _swigt__p_sqlite3 = {"_p_sqlite3", "sqlite3 *", 0, 0, (void*)0, 0};
4597
+ static swig_type_info _swigt__p_sqlite3_context = {"_p_sqlite3_context", "sqlite3_context *", 0, 0, (void*)0, 0};
4598
+ static swig_type_info _swigt__p_sqlite3_stmt = {"_p_sqlite3_stmt", "sqlite3_stmt *", 0, 0, (void*)0, 0};
4599
+ static swig_type_info _swigt__p_sqlite3_value = {"_p_sqlite3_value", "sqlite3_value *", 0, 0, (void*)0, 0};
4600
+ static swig_type_info _swigt__p_sqlite_int64 = {"_p_sqlite_int64", "sqlite_int64 *", 0, 0, (void*)0, 0};
4601
+ static swig_type_info _swigt__p_void = {"_p_void", "RUBY_VALBLOB *|RUBY_BLOB *|void *", 0, 0, (void*)0, 0};
4602
+
4603
+ static swig_type_info *swig_type_initial[] = {
4604
+ &_swigt__p_CallbackData,
4605
+ &_swigt__p_char,
4606
+ &_swigt__p_f_p_sqlite3_context__void,
4607
+ &_swigt__p_f_p_sqlite3_context_int_p_p_sqlite3_value__void,
4608
+ &_swigt__p_f_p_void__void,
4609
+ &_swigt__p_f_p_void_int__int,
4610
+ &_swigt__p_f_p_void_int_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char__int,
4611
+ &_swigt__p_f_p_void_p_q_const__char__void,
4612
+ &_swigt__p_p_char,
4613
+ &_swigt__p_p_sqlite3,
4614
+ &_swigt__p_p_sqlite3_stmt,
4615
+ &_swigt__p_p_void,
4616
+ &_swigt__p_sqlite3,
4617
+ &_swigt__p_sqlite3_context,
4618
+ &_swigt__p_sqlite3_stmt,
4619
+ &_swigt__p_sqlite3_value,
4620
+ &_swigt__p_sqlite_int64,
4621
+ &_swigt__p_void,
4622
+ };
4623
+
4624
+ static swig_cast_info _swigc__p_CallbackData[] = { {&_swigt__p_CallbackData, 0, 0, 0},{0, 0, 0, 0}};
4625
+ static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
4626
+ static swig_cast_info _swigc__p_f_p_sqlite3_context__void[] = { {&_swigt__p_f_p_sqlite3_context__void, 0, 0, 0},{0, 0, 0, 0}};
4627
+ static swig_cast_info _swigc__p_f_p_sqlite3_context_int_p_p_sqlite3_value__void[] = { {&_swigt__p_f_p_sqlite3_context_int_p_p_sqlite3_value__void, 0, 0, 0},{0, 0, 0, 0}};
4628
+ static swig_cast_info _swigc__p_f_p_void__void[] = { {&_swigt__p_f_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
4629
+ static swig_cast_info _swigc__p_f_p_void_int__int[] = { {&_swigt__p_f_p_void_int__int, 0, 0, 0},{0, 0, 0, 0}};
4630
+ static swig_cast_info _swigc__p_f_p_void_int_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char__int[] = { {&_swigt__p_f_p_void_int_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char__int, 0, 0, 0},{0, 0, 0, 0}};
4631
+ static swig_cast_info _swigc__p_f_p_void_p_q_const__char__void[] = { {&_swigt__p_f_p_void_p_q_const__char__void, 0, 0, 0},{0, 0, 0, 0}};
4632
+ static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
4633
+ static swig_cast_info _swigc__p_p_sqlite3[] = { {&_swigt__p_p_sqlite3, 0, 0, 0},{0, 0, 0, 0}};
4634
+ static swig_cast_info _swigc__p_p_sqlite3_stmt[] = { {&_swigt__p_p_sqlite3_stmt, 0, 0, 0},{0, 0, 0, 0}};
4635
+ static swig_cast_info _swigc__p_p_void[] = { {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
4636
+ static swig_cast_info _swigc__p_sqlite3[] = { {&_swigt__p_sqlite3, 0, 0, 0},{0, 0, 0, 0}};
4637
+ static swig_cast_info _swigc__p_sqlite3_context[] = { {&_swigt__p_sqlite3_context, 0, 0, 0},{0, 0, 0, 0}};
4638
+ static swig_cast_info _swigc__p_sqlite3_stmt[] = { {&_swigt__p_sqlite3_stmt, 0, 0, 0},{0, 0, 0, 0}};
4639
+ static swig_cast_info _swigc__p_sqlite3_value[] = { {&_swigt__p_sqlite3_value, 0, 0, 0},{0, 0, 0, 0}};
4640
+ static swig_cast_info _swigc__p_sqlite_int64[] = { {&_swigt__p_sqlite_int64, 0, 0, 0},{0, 0, 0, 0}};
4641
+ static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
4642
+
4643
+ static swig_cast_info *swig_cast_initial[] = {
4644
+ _swigc__p_CallbackData,
4645
+ _swigc__p_char,
4646
+ _swigc__p_f_p_sqlite3_context__void,
4647
+ _swigc__p_f_p_sqlite3_context_int_p_p_sqlite3_value__void,
4648
+ _swigc__p_f_p_void__void,
4649
+ _swigc__p_f_p_void_int__int,
4650
+ _swigc__p_f_p_void_int_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char__int,
4651
+ _swigc__p_f_p_void_p_q_const__char__void,
4652
+ _swigc__p_p_char,
4653
+ _swigc__p_p_sqlite3,
4654
+ _swigc__p_p_sqlite3_stmt,
4655
+ _swigc__p_p_void,
4656
+ _swigc__p_sqlite3,
4657
+ _swigc__p_sqlite3_context,
4658
+ _swigc__p_sqlite3_stmt,
4659
+ _swigc__p_sqlite3_value,
4660
+ _swigc__p_sqlite_int64,
4661
+ _swigc__p_void,
4662
+ };
4663
+
4664
+
4665
+ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
4666
+
4667
+ /* -----------------------------------------------------------------------------
4668
+ * Type initialization:
4669
+ * This problem is tough by the requirement that no dynamic
4670
+ * memory is used. Also, since swig_type_info structures store pointers to
4671
+ * swig_cast_info structures and swig_cast_info structures store pointers back
4672
+ * to swig_type_info structures, we need some lookup code at initialization.
4673
+ * The idea is that swig generates all the structures that are needed.
4674
+ * The runtime then collects these partially filled structures.
4675
+ * The SWIG_InitializeModule function takes these initial arrays out of
4676
+ * swig_module, and does all the lookup, filling in the swig_module.types
4677
+ * array with the correct data and linking the correct swig_cast_info
4678
+ * structures together.
4679
+ *
4680
+ * The generated swig_type_info structures are assigned staticly to an initial
4681
+ * array. We just loop through that array, and handle each type individually.
4682
+ * First we lookup if this type has been already loaded, and if so, use the
4683
+ * loaded structure instead of the generated one. Then we have to fill in the
4684
+ * cast linked list. The cast data is initially stored in something like a
4685
+ * two-dimensional array. Each row corresponds to a type (there are the same
4686
+ * number of rows as there are in the swig_type_initial array). Each entry in
4687
+ * a column is one of the swig_cast_info structures for that type.
4688
+ * The cast_initial array is actually an array of arrays, because each row has
4689
+ * a variable number of columns. So to actually build the cast linked list,
4690
+ * we find the array of casts associated with the type, and loop through it
4691
+ * adding the casts to the list. The one last trick we need to do is making
4692
+ * sure the type pointer in the swig_cast_info struct is correct.
4693
+ *
4694
+ * First off, we lookup the cast->type name to see if it is already loaded.
4695
+ * There are three cases to handle:
4696
+ * 1) If the cast->type has already been loaded AND the type we are adding
4697
+ * casting info to has not been loaded (it is in this module), THEN we
4698
+ * replace the cast->type pointer with the type pointer that has already
4699
+ * been loaded.
4700
+ * 2) If BOTH types (the one we are adding casting info to, and the
4701
+ * cast->type) are loaded, THEN the cast info has already been loaded by
4702
+ * the previous module so we just ignore it.
4703
+ * 3) Finally, if cast->type has not already been loaded, then we add that
4704
+ * swig_cast_info to the linked list (because the cast->type) pointer will
4705
+ * be correct.
4706
+ * ----------------------------------------------------------------------------- */
4707
+
4708
+ #ifdef __cplusplus
4709
+ extern "C" {
4710
+ #if 0
4711
+ } /* c-mode */
4712
+ #endif
4713
+ #endif
4714
+
4715
+ #if 0
4716
+ #define SWIGRUNTIME_DEBUG
4717
+ #endif
4718
+
4719
+
4720
+ SWIGRUNTIME void
4721
+ SWIG_InitializeModule(void *clientdata) {
4722
+ size_t i;
4723
+ swig_module_info *module_head, *iter;
4724
+ int found, init;
4725
+
4726
+ clientdata = clientdata;
4727
+
4728
+ /* check to see if the circular list has been setup, if not, set it up */
4729
+ if (swig_module.next==0) {
4730
+ /* Initialize the swig_module */
4731
+ swig_module.type_initial = swig_type_initial;
4732
+ swig_module.cast_initial = swig_cast_initial;
4733
+ swig_module.next = &swig_module;
4734
+ init = 1;
4735
+ } else {
4736
+ init = 0;
4737
+ }
4738
+
4739
+ /* Try and load any already created modules */
4740
+ module_head = SWIG_GetModule(clientdata);
4741
+ if (!module_head) {
4742
+ /* This is the first module loaded for this interpreter */
4743
+ /* so set the swig module into the interpreter */
4744
+ SWIG_SetModule(clientdata, &swig_module);
4745
+ module_head = &swig_module;
4746
+ } else {
4747
+ /* the interpreter has loaded a SWIG module, but has it loaded this one? */
4748
+ found=0;
4749
+ iter=module_head;
4750
+ do {
4751
+ if (iter==&swig_module) {
4752
+ found=1;
4753
+ break;
4754
+ }
4755
+ iter=iter->next;
4756
+ } while (iter!= module_head);
4757
+
4758
+ /* if the is found in the list, then all is done and we may leave */
4759
+ if (found) return;
4760
+ /* otherwise we must add out module into the list */
4761
+ swig_module.next = module_head->next;
4762
+ module_head->next = &swig_module;
4763
+ }
4764
+
4765
+ /* When multiple interpeters are used, a module could have already been initialized in
4766
+ a different interpreter, but not yet have a pointer in this interpreter.
4767
+ In this case, we do not want to continue adding types... everything should be
4768
+ set up already */
4769
+ if (init == 0) return;
4770
+
4771
+ /* Now work on filling in swig_module.types */
4772
+ #ifdef SWIGRUNTIME_DEBUG
4773
+ printf("SWIG_InitializeModule: size %d\n", swig_module.size);
4774
+ #endif
4775
+ for (i = 0; i < swig_module.size; ++i) {
4776
+ swig_type_info *type = 0;
4777
+ swig_type_info *ret;
4778
+ swig_cast_info *cast;
4779
+
4780
+ #ifdef SWIGRUNTIME_DEBUG
4781
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4782
+ #endif
4783
+
4784
+ /* if there is another module already loaded */
4785
+ if (swig_module.next != &swig_module) {
4786
+ type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
4787
+ }
4788
+ if (type) {
4789
+ /* Overwrite clientdata field */
4790
+ #ifdef SWIGRUNTIME_DEBUG
4791
+ printf("SWIG_InitializeModule: found type %s\n", type->name);
4792
+ #endif
4793
+ if (swig_module.type_initial[i]->clientdata) {
4794
+ type->clientdata = swig_module.type_initial[i]->clientdata;
4795
+ #ifdef SWIGRUNTIME_DEBUG
4796
+ printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
4797
+ #endif
4798
+ }
4799
+ } else {
4800
+ type = swig_module.type_initial[i];
4801
+ }
4802
+
4803
+ /* Insert casting types */
4804
+ cast = swig_module.cast_initial[i];
4805
+ while (cast->type) {
4806
+
4807
+ /* Don't need to add information already in the list */
4808
+ ret = 0;
4809
+ #ifdef SWIGRUNTIME_DEBUG
4810
+ printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
4811
+ #endif
4812
+ if (swig_module.next != &swig_module) {
4813
+ ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
4814
+ #ifdef SWIGRUNTIME_DEBUG
4815
+ if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
4816
+ #endif
4817
+ }
4818
+ if (ret) {
4819
+ if (type == swig_module.type_initial[i]) {
4820
+ #ifdef SWIGRUNTIME_DEBUG
4821
+ printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
4822
+ #endif
4823
+ cast->type = ret;
4824
+ ret = 0;
4825
+ } else {
4826
+ /* Check for casting already in the list */
4827
+ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
4828
+ #ifdef SWIGRUNTIME_DEBUG
4829
+ if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
4830
+ #endif
4831
+ if (!ocast) ret = 0;
4832
+ }
4833
+ }
4834
+
4835
+ if (!ret) {
4836
+ #ifdef SWIGRUNTIME_DEBUG
4837
+ printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
4838
+ #endif
4839
+ if (type->cast) {
4840
+ type->cast->prev = cast;
4841
+ cast->next = type->cast;
4842
+ }
4843
+ type->cast = cast;
4844
+ }
4845
+ cast++;
4846
+ }
4847
+ /* Set entry in modules->types array equal to the type */
4848
+ swig_module.types[i] = type;
4849
+ }
4850
+ swig_module.types[i] = 0;
4851
+
4852
+ #ifdef SWIGRUNTIME_DEBUG
4853
+ printf("**** SWIG_InitializeModule: Cast List ******\n");
4854
+ for (i = 0; i < swig_module.size; ++i) {
4855
+ int j = 0;
4856
+ swig_cast_info *cast = swig_module.cast_initial[i];
4857
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4858
+ while (cast->type) {
4859
+ printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
4860
+ cast++;
4861
+ ++j;
4862
+ }
4863
+ printf("---- Total casts: %d\n",j);
4864
+ }
4865
+ printf("**** SWIG_InitializeModule: Cast List ******\n");
4866
+ #endif
4867
+ }
4868
+
4869
+ /* This function will propagate the clientdata field of type to
4870
+ * any new swig_type_info structures that have been added into the list
4871
+ * of equivalent types. It is like calling
4872
+ * SWIG_TypeClientData(type, clientdata) a second time.
4873
+ */
4874
+ SWIGRUNTIME void
4875
+ SWIG_PropagateClientData(void) {
4876
+ size_t i;
4877
+ swig_cast_info *equiv;
4878
+ static int init_run = 0;
4879
+
4880
+ if (init_run) return;
4881
+ init_run = 1;
4882
+
4883
+ for (i = 0; i < swig_module.size; i++) {
4884
+ if (swig_module.types[i]->clientdata) {
4885
+ equiv = swig_module.types[i]->cast;
4886
+ while (equiv) {
4887
+ if (!equiv->converter) {
4888
+ if (equiv->type && !equiv->type->clientdata)
4889
+ SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
4890
+ }
4891
+ equiv = equiv->next;
4892
+ }
4893
+ }
4894
+ }
4895
+ }
4896
+
4897
+ #ifdef __cplusplus
4898
+ #if 0
4899
+ { /* c-mode */
4900
+ #endif
4901
+ }
4902
+ #endif
4903
+
4904
+ /*
4905
+
4906
+ */
4907
+ #ifdef __cplusplus
4908
+ extern "C"
4909
+ #endif
4910
+ SWIGEXPORT void Init_API(void) {
4911
+ size_t i;
4912
+
4913
+ SWIG_InitRuntime();
4914
+ mAPI = rb_define_module("SQLite3");
4915
+ mAPI = rb_define_module_under(mAPI, "Driver");
4916
+ mAPI = rb_define_module_under(mAPI, "Native");
4917
+ mAPI = rb_define_module_under(mAPI, "API");
4918
+
4919
+ SWIG_InitializeModule(0);
4920
+ for (i = 0; i < swig_module.size; i++) {
4921
+ SWIG_define_class(swig_module.types[i]);
4922
+ }
4923
+
4924
+ SWIG_RubyInitializeTrackings();
4925
+
4926
+ SwigClassCallbackData.klass = rb_define_class_under(mAPI, "CallbackData", rb_cObject);
4927
+ SWIG_TypeClientData(SWIGTYPE_p_CallbackData, (void *) &SwigClassCallbackData);
4928
+ rb_define_alloc_func(SwigClassCallbackData.klass, _wrap_CallbackData_allocate);
4929
+ rb_define_method(SwigClassCallbackData.klass, "initialize", _wrap_new_CallbackData, -1);
4930
+ rb_define_method(SwigClassCallbackData.klass, "proc=", _wrap_CallbackData_proc_set, -1);
4931
+ rb_define_method(SwigClassCallbackData.klass, "proc", _wrap_CallbackData_proc_get, -1);
4932
+ rb_define_method(SwigClassCallbackData.klass, "proc2=", _wrap_CallbackData_proc2_set, -1);
4933
+ rb_define_method(SwigClassCallbackData.klass, "proc2", _wrap_CallbackData_proc2_get, -1);
4934
+ rb_define_method(SwigClassCallbackData.klass, "data=", _wrap_CallbackData_data_set, -1);
4935
+ rb_define_method(SwigClassCallbackData.klass, "data", _wrap_CallbackData_data_get, -1);
4936
+ SwigClassCallbackData.mark = (void (*)(void *)) mark_CallbackData;
4937
+ SwigClassCallbackData.destroy = (void (*)(void *)) free_CallbackData;
4938
+ SwigClassCallbackData.trackObjects = 0;
4939
+ rb_define_const(mAPI, "Sqlite3_ruby_busy_handler", SWIG_NewFunctionPtrObj((void *)Sqlite3_ruby_busy_handler, SWIGTYPE_p_f_p_void_int__int));
4940
+ rb_define_const(mAPI, "Sqlite3_ruby_authorizer", SWIG_NewFunctionPtrObj((void *)Sqlite3_ruby_authorizer, SWIGTYPE_p_f_p_void_int_p_q_const__char_p_q_const__char_p_q_const__char_p_q_const__char__int));
4941
+ rb_define_const(mAPI, "Sqlite3_ruby_trace", SWIG_NewFunctionPtrObj((void *)Sqlite3_ruby_trace, SWIGTYPE_p_f_p_void_p_q_const__char__void));
4942
+ rb_define_const(mAPI, "Sqlite3_ruby_function_step", SWIG_NewFunctionPtrObj((void *)Sqlite3_ruby_function_step, SWIGTYPE_p_f_p_sqlite3_context_int_p_p_sqlite3_value__void));
4943
+ rb_define_const(mAPI, "Sqlite3_ruby_function_final", SWIG_NewFunctionPtrObj((void *)Sqlite3_ruby_function_final, SWIGTYPE_p_f_p_sqlite3_context__void));
4944
+ rb_define_module_function(mAPI, "sqlite3_libversion", _wrap_sqlite3_libversion, -1);
4945
+ rb_define_module_function(mAPI, "sqlite3_close", _wrap_sqlite3_close, -1);
4946
+ rb_define_module_function(mAPI, "sqlite3_last_insert_rowid", _wrap_sqlite3_last_insert_rowid, -1);
4947
+ rb_define_module_function(mAPI, "sqlite3_changes", _wrap_sqlite3_changes, -1);
4948
+ rb_define_module_function(mAPI, "sqlite3_total_changes", _wrap_sqlite3_total_changes, -1);
4949
+ rb_define_module_function(mAPI, "sqlite3_interrupt", _wrap_sqlite3_interrupt, -1);
4950
+ rb_define_module_function(mAPI, "sqlite3_complete", _wrap_sqlite3_complete, -1);
4951
+ rb_define_module_function(mAPI, "sqlite3_complete16", _wrap_sqlite3_complete16, -1);
4952
+ rb_define_module_function(mAPI, "sqlite3_busy_handler", _wrap_sqlite3_busy_handler, -1);
4953
+ rb_define_module_function(mAPI, "sqlite3_busy_timeout", _wrap_sqlite3_busy_timeout, -1);
4954
+ rb_define_module_function(mAPI, "sqlite3_set_authorizer", _wrap_sqlite3_set_authorizer, -1);
4955
+ rb_define_module_function(mAPI, "sqlite3_trace", _wrap_sqlite3_trace, -1);
4956
+ rb_define_module_function(mAPI, "sqlite3_open", _wrap_sqlite3_open, -1);
4957
+ rb_define_module_function(mAPI, "sqlite3_open16", _wrap_sqlite3_open16, -1);
4958
+ rb_define_module_function(mAPI, "sqlite3_errcode", _wrap_sqlite3_errcode, -1);
4959
+ rb_define_module_function(mAPI, "sqlite3_errmsg", _wrap_sqlite3_errmsg, -1);
4960
+ rb_define_module_function(mAPI, "sqlite3_errmsg16", _wrap_sqlite3_errmsg16, -1);
4961
+ rb_define_module_function(mAPI, "sqlite3_prepare", _wrap_sqlite3_prepare, -1);
4962
+ rb_define_module_function(mAPI, "sqlite3_prepare16", _wrap_sqlite3_prepare16, -1);
4963
+ rb_define_module_function(mAPI, "sqlite3_bind_blob", _wrap_sqlite3_bind_blob, -1);
4964
+ rb_define_module_function(mAPI, "sqlite3_bind_double", _wrap_sqlite3_bind_double, -1);
4965
+ rb_define_module_function(mAPI, "sqlite3_bind_int", _wrap_sqlite3_bind_int, -1);
4966
+ rb_define_module_function(mAPI, "sqlite3_bind_int64", _wrap_sqlite3_bind_int64, -1);
4967
+ rb_define_module_function(mAPI, "sqlite3_bind_null", _wrap_sqlite3_bind_null, -1);
4968
+ rb_define_module_function(mAPI, "sqlite3_bind_text", _wrap_sqlite3_bind_text, -1);
4969
+ rb_define_module_function(mAPI, "sqlite3_bind_text16", _wrap_sqlite3_bind_text16, -1);
4970
+ rb_define_module_function(mAPI, "sqlite3_bind_parameter_count", _wrap_sqlite3_bind_parameter_count, -1);
4971
+ rb_define_module_function(mAPI, "sqlite3_bind_parameter_name", _wrap_sqlite3_bind_parameter_name, -1);
4972
+ rb_define_module_function(mAPI, "sqlite3_bind_parameter_index", _wrap_sqlite3_bind_parameter_index, -1);
4973
+ rb_define_module_function(mAPI, "sqlite3_column_count", _wrap_sqlite3_column_count, -1);
4974
+ rb_define_module_function(mAPI, "sqlite3_column_name", _wrap_sqlite3_column_name, -1);
4975
+ rb_define_module_function(mAPI, "sqlite3_column_name16", _wrap_sqlite3_column_name16, -1);
4976
+ rb_define_module_function(mAPI, "sqlite3_column_decltype", _wrap_sqlite3_column_decltype, -1);
4977
+ rb_define_module_function(mAPI, "sqlite3_column_decltype16", _wrap_sqlite3_column_decltype16, -1);
4978
+ rb_define_module_function(mAPI, "sqlite3_step", _wrap_sqlite3_step, -1);
4979
+ rb_define_module_function(mAPI, "sqlite3_data_count", _wrap_sqlite3_data_count, -1);
4980
+ rb_define_module_function(mAPI, "sqlite3_column_blob", _wrap_sqlite3_column_blob, -1);
4981
+ rb_define_module_function(mAPI, "sqlite3_column_bytes", _wrap_sqlite3_column_bytes, -1);
4982
+ rb_define_module_function(mAPI, "sqlite3_column_bytes16", _wrap_sqlite3_column_bytes16, -1);
4983
+ rb_define_module_function(mAPI, "sqlite3_column_double", _wrap_sqlite3_column_double, -1);
4984
+ rb_define_module_function(mAPI, "sqlite3_column_int", _wrap_sqlite3_column_int, -1);
4985
+ rb_define_module_function(mAPI, "sqlite3_column_int64", _wrap_sqlite3_column_int64, -1);
4986
+ rb_define_module_function(mAPI, "sqlite3_column_text", _wrap_sqlite3_column_text, -1);
4987
+ rb_define_module_function(mAPI, "sqlite3_column_text16", _wrap_sqlite3_column_text16, -1);
4988
+ rb_define_module_function(mAPI, "sqlite3_column_type", _wrap_sqlite3_column_type, -1);
4989
+ rb_define_module_function(mAPI, "sqlite3_finalize", _wrap_sqlite3_finalize, -1);
4990
+ rb_define_module_function(mAPI, "sqlite3_reset", _wrap_sqlite3_reset, -1);
4991
+ rb_define_module_function(mAPI, "sqlite3_create_function", _wrap_sqlite3_create_function, -1);
4992
+ rb_define_module_function(mAPI, "sqlite3_create_function16", _wrap_sqlite3_create_function16, -1);
4993
+ rb_define_module_function(mAPI, "sqlite3_aggregate_count", _wrap_sqlite3_aggregate_count, -1);
4994
+ rb_define_module_function(mAPI, "sqlite3_value_blob", _wrap_sqlite3_value_blob, -1);
4995
+ rb_define_module_function(mAPI, "sqlite3_value_bytes", _wrap_sqlite3_value_bytes, -1);
4996
+ rb_define_module_function(mAPI, "sqlite3_value_bytes16", _wrap_sqlite3_value_bytes16, -1);
4997
+ rb_define_module_function(mAPI, "sqlite3_value_double", _wrap_sqlite3_value_double, -1);
4998
+ rb_define_module_function(mAPI, "sqlite3_value_int", _wrap_sqlite3_value_int, -1);
4999
+ rb_define_module_function(mAPI, "sqlite3_value_int64", _wrap_sqlite3_value_int64, -1);
5000
+ rb_define_module_function(mAPI, "sqlite3_value_text", _wrap_sqlite3_value_text, -1);
5001
+ rb_define_module_function(mAPI, "sqlite3_value_text16", _wrap_sqlite3_value_text16, -1);
5002
+ rb_define_module_function(mAPI, "sqlite3_value_text16le", _wrap_sqlite3_value_text16le, -1);
5003
+ rb_define_module_function(mAPI, "sqlite3_value_text16be", _wrap_sqlite3_value_text16be, -1);
5004
+ rb_define_module_function(mAPI, "sqlite3_value_type", _wrap_sqlite3_value_type, -1);
5005
+ rb_define_module_function(mAPI, "sqlite3_result_blob", _wrap_sqlite3_result_blob, -1);
5006
+ rb_define_module_function(mAPI, "sqlite3_result_double", _wrap_sqlite3_result_double, -1);
5007
+ rb_define_module_function(mAPI, "sqlite3_result_error", _wrap_sqlite3_result_error, -1);
5008
+ rb_define_module_function(mAPI, "sqlite3_result_error16", _wrap_sqlite3_result_error16, -1);
5009
+ rb_define_module_function(mAPI, "sqlite3_result_int", _wrap_sqlite3_result_int, -1);
5010
+ rb_define_module_function(mAPI, "sqlite3_result_int64", _wrap_sqlite3_result_int64, -1);
5011
+ rb_define_module_function(mAPI, "sqlite3_result_text", _wrap_sqlite3_result_text, -1);
5012
+ rb_define_module_function(mAPI, "sqlite3_result_text16", _wrap_sqlite3_result_text16, -1);
5013
+ rb_define_module_function(mAPI, "sqlite3_result_text16le", _wrap_sqlite3_result_text16le, -1);
5014
+ rb_define_module_function(mAPI, "sqlite3_result_text16be", _wrap_sqlite3_result_text16be, -1);
5015
+ rb_define_module_function(mAPI, "sqlite3_result_value", _wrap_sqlite3_result_value, -1);
5016
+ rb_define_module_function(mAPI, "sqlite3_aggregate_context", _wrap_sqlite3_aggregate_context, -1);
5017
+ }
5018
+