1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 2.0.7
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 an 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)
SWIG_AddCast(int r)394 SWIGINTERNINLINE int SWIG_AddCast(int r) {
395 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
396 }
SWIG_CheckState(int r)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
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)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
SWIG_TypeEquiv(const char * nb,const char * tb)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
SWIG_TypeCompare(const char * nb,const char * tb)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 *
SWIG_TypeCheck(const char * c,swig_type_info * ty)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 *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * ty)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 *
SWIG_TypeCast(swig_cast_info * ty,void * ptr,int * newmemory)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 *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)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 *
SWIG_TypeName(const swig_type_info * ty)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 *
SWIG_TypePrettyName(const swig_type_info * type)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
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)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
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)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 *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)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 *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)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 *
SWIG_PackData(char * c,void * ptr,size_t sz)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 *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)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 *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)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 *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)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 *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)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 *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)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 /* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
835 * breaks using rb_intern as an lvalue, as SWIG does. We work around this
836 * issue for now by disabling this.
837 * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
838 */
839 #ifdef rb_intern
840 # undef rb_intern
841 #endif
842
843 /* Remove global macros defined in Ruby's win32.h */
844 #ifdef write
845 # undef write
846 #endif
847 #ifdef read
848 # undef read
849 #endif
850 #ifdef bind
851 # undef bind
852 #endif
853 #ifdef close
854 # undef close
855 #endif
856 #ifdef connect
857 # undef connect
858 #endif
859
860
861 /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
862 #ifndef NUM2LL
863 #define NUM2LL(x) NUM2LONG((x))
864 #endif
865 #ifndef LL2NUM
866 #define LL2NUM(x) INT2NUM((long) (x))
867 #endif
868 #ifndef ULL2NUM
869 #define ULL2NUM(x) UINT2NUM((unsigned long) (x))
870 #endif
871
872 /* Ruby 1.7 doesn't (yet) define NUM2ULL() */
873 #ifndef NUM2ULL
874 #ifdef HAVE_LONG_LONG
875 #define NUM2ULL(x) rb_num2ull((x))
876 #else
877 #define NUM2ULL(x) NUM2ULONG(x)
878 #endif
879 #endif
880
881 /* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */
882 /* Define these for older versions so we can just write code the new way */
883 #ifndef RSTRING_LEN
884 # define RSTRING_LEN(x) RSTRING(x)->len
885 #endif
886 #ifndef RSTRING_PTR
887 # define RSTRING_PTR(x) RSTRING(x)->ptr
888 #endif
889 #ifndef RSTRING_END
890 # define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
891 #endif
892 #ifndef RARRAY_LEN
893 # define RARRAY_LEN(x) RARRAY(x)->len
894 #endif
895 #ifndef RARRAY_PTR
896 # define RARRAY_PTR(x) RARRAY(x)->ptr
897 #endif
898 #ifndef RFLOAT_VALUE
899 # define RFLOAT_VALUE(x) RFLOAT(x)->value
900 #endif
901 #ifndef DOUBLE2NUM
902 # define DOUBLE2NUM(x) rb_float_new(x)
903 #endif
904 #ifndef RHASH_TBL
905 # define RHASH_TBL(x) (RHASH(x)->tbl)
906 #endif
907 #ifndef RHASH_ITER_LEV
908 # define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
909 #endif
910 #ifndef RHASH_IFNONE
911 # define RHASH_IFNONE(x) (RHASH(x)->ifnone)
912 #endif
913 #ifndef RHASH_SIZE
914 # define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
915 #endif
916 #ifndef RHASH_EMPTY_P
917 # define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
918 #endif
919 #ifndef RSTRUCT_LEN
920 # define RSTRUCT_LEN(x) RSTRUCT(x)->len
921 #endif
922 #ifndef RSTRUCT_PTR
923 # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
924 #endif
925
926
927
928 /*
929 * Need to be very careful about how these macros are defined, especially
930 * when compiling C++ code or C code with an ANSI C compiler.
931 *
932 * VALUEFUNC(f) is a macro used to typecast a C function that implements
933 * a Ruby method so that it can be passed as an argument to API functions
934 * like rb_define_method() and rb_define_singleton_method().
935 *
936 * VOIDFUNC(f) is a macro used to typecast a C function that implements
937 * either the "mark" or "free" stuff for a Ruby Data object, so that it
938 * can be passed as an argument to API functions like Data_Wrap_Struct()
939 * and Data_Make_Struct().
940 */
941
942 #ifdef __cplusplus
943 # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
944 # define PROTECTFUNC(f) ((VALUE (*)()) f)
945 # define VALUEFUNC(f) ((VALUE (*)()) f)
946 # define VOIDFUNC(f) ((void (*)()) f)
947 # else
948 # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
949 # define PROTECTFUNC(f) ((VALUE (*)()) f)
950 # define VALUEFUNC(f) ((VALUE (*)()) f)
951 # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
952 # else /* These definitions should work for Ruby 1.7+ */
953 # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
954 # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
955 # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
956 # endif
957 # endif
958 #else
959 # define VALUEFUNC(f) (f)
960 # define VOIDFUNC(f) (f)
961 #endif
962
963 /* Don't use for expressions have side effect */
964 #ifndef RB_STRING_VALUE
965 #define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
966 #endif
967 #ifndef StringValue
968 #define StringValue(s) RB_STRING_VALUE(s)
969 #endif
970 #ifndef StringValuePtr
971 #define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
972 #endif
973 #ifndef StringValueLen
974 #define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
975 #endif
976 #ifndef SafeStringValue
977 #define SafeStringValue(v) do {\
978 StringValue(v);\
979 rb_check_safe_str(v);\
980 } while (0)
981 #endif
982
983 #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
984 #define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
985 #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
986 #endif
987
988 static VALUE _mSWIG = Qnil;
989
990 /* -----------------------------------------------------------------------------
991 * error manipulation
992 * ----------------------------------------------------------------------------- */
993
994
995 /* Define some additional error types */
996 #define SWIG_ObjectPreviouslyDeletedError -100
997
998
999 /* Define custom exceptions for errors that do not map to existing Ruby
1000 exceptions. Note this only works for C++ since a global cannot be
1001 initialized by a function in C. For C, fallback to rb_eRuntimeError.*/
1002
1003 SWIGINTERN VALUE
getNullReferenceError(void)1004 getNullReferenceError(void) {
1005 static int init = 0;
1006 static VALUE rb_eNullReferenceError ;
1007 if (!init) {
1008 init = 1;
1009 rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
1010 }
1011 return rb_eNullReferenceError;
1012 }
1013
1014 SWIGINTERN VALUE
getObjectPreviouslyDeletedError(void)1015 getObjectPreviouslyDeletedError(void) {
1016 static int init = 0;
1017 static VALUE rb_eObjectPreviouslyDeleted ;
1018 if (!init) {
1019 init = 1;
1020 rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
1021 }
1022 return rb_eObjectPreviouslyDeleted;
1023 }
1024
1025
1026 SWIGINTERN VALUE
SWIG_Ruby_ErrorType(int SWIG_code)1027 SWIG_Ruby_ErrorType(int SWIG_code) {
1028 VALUE type;
1029 switch (SWIG_code) {
1030 case SWIG_MemoryError:
1031 type = rb_eNoMemError;
1032 break;
1033 case SWIG_IOError:
1034 type = rb_eIOError;
1035 break;
1036 case SWIG_RuntimeError:
1037 type = rb_eRuntimeError;
1038 break;
1039 case SWIG_IndexError:
1040 type = rb_eIndexError;
1041 break;
1042 case SWIG_TypeError:
1043 type = rb_eTypeError;
1044 break;
1045 case SWIG_DivisionByZero:
1046 type = rb_eZeroDivError;
1047 break;
1048 case SWIG_OverflowError:
1049 type = rb_eRangeError;
1050 break;
1051 case SWIG_SyntaxError:
1052 type = rb_eSyntaxError;
1053 break;
1054 case SWIG_ValueError:
1055 type = rb_eArgError;
1056 break;
1057 case SWIG_SystemError:
1058 type = rb_eFatal;
1059 break;
1060 case SWIG_AttributeError:
1061 type = rb_eRuntimeError;
1062 break;
1063 case SWIG_NullReferenceError:
1064 type = getNullReferenceError();
1065 break;
1066 case SWIG_ObjectPreviouslyDeletedError:
1067 type = getObjectPreviouslyDeletedError();
1068 break;
1069 case SWIG_UnknownError:
1070 type = rb_eRuntimeError;
1071 break;
1072 default:
1073 type = rb_eRuntimeError;
1074 }
1075 return type;
1076 }
1077
1078
1079 /* This function is called when a user inputs a wrong argument to
1080 a method.
1081 */
1082 SWIGINTERN
Ruby_Format_TypeError(const char * msg,const char * type,const char * name,const int argn,VALUE input)1083 const char* Ruby_Format_TypeError( const char* msg,
1084 const char* type,
1085 const char* name,
1086 const int argn,
1087 VALUE input )
1088 {
1089 char buf[128];
1090 VALUE str;
1091 VALUE asStr;
1092 if ( msg && *msg )
1093 {
1094 str = rb_str_new2(msg);
1095 }
1096 else
1097 {
1098 str = rb_str_new(NULL, 0);
1099 }
1100
1101 str = rb_str_cat2( str, "Expected argument " );
1102 sprintf( buf, "%d of type ", argn-1 );
1103 str = rb_str_cat2( str, buf );
1104 str = rb_str_cat2( str, type );
1105 str = rb_str_cat2( str, ", but got " );
1106 str = rb_str_cat2( str, rb_obj_classname(input) );
1107 str = rb_str_cat2( str, " " );
1108 asStr = rb_inspect(input);
1109 if ( RSTRING_LEN(asStr) > 30 )
1110 {
1111 str = rb_str_cat( str, StringValuePtr(asStr), 30 );
1112 str = rb_str_cat2( str, "..." );
1113 }
1114 else
1115 {
1116 str = rb_str_append( str, asStr );
1117 }
1118
1119 if ( name )
1120 {
1121 str = rb_str_cat2( str, "\n\tin SWIG method '" );
1122 str = rb_str_cat2( str, name );
1123 str = rb_str_cat2( str, "'" );
1124 }
1125
1126 return StringValuePtr( str );
1127 }
1128
1129 /* This function is called when an overloaded method fails */
1130 SWIGINTERN
Ruby_Format_OverloadedError(const int argc,const int maxargs,const char * method,const char * prototypes)1131 void Ruby_Format_OverloadedError(
1132 const int argc,
1133 const int maxargs,
1134 const char* method,
1135 const char* prototypes
1136 )
1137 {
1138 const char* msg = "Wrong # of arguments";
1139 if ( argc <= maxargs ) msg = "Wrong arguments";
1140 rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"
1141 "Possible C/C++ prototypes are:\n%s",
1142 msg, method, prototypes);
1143 }
1144
1145 /* -----------------------------------------------------------------------------
1146 * rubytracking.swg
1147 *
1148 * This file contains support for tracking mappings from
1149 * Ruby objects to C++ objects. This functionality is needed
1150 * to implement mark functions for Ruby's mark and sweep
1151 * garbage collector.
1152 * ----------------------------------------------------------------------------- */
1153
1154 #ifdef __cplusplus
1155 extern "C" {
1156 #endif
1157
1158 /* Ruby 1.8 actually assumes the first case. */
1159 #if SIZEOF_VOIDP == SIZEOF_LONG
1160 # define SWIG2NUM(v) LONG2NUM((unsigned long)v)
1161 # define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
1162 #elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
1163 # define SWIG2NUM(v) LL2NUM((unsigned long long)v)
1164 # define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
1165 #else
1166 # error sizeof(void*) is not the same as long or long long
1167 #endif
1168
1169
1170 /* Global Ruby hash table to store Trackings from C/C++
1171 structs to Ruby Objects.
1172 */
1173 static VALUE swig_ruby_trackings = Qnil;
1174
1175 /* Global variable that stores a reference to the ruby
1176 hash table delete function. */
1177 static ID swig_ruby_hash_delete;
1178
1179 /* Setup a Ruby hash table to store Trackings */
SWIG_RubyInitializeTrackings(void)1180 SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1181 /* Create a ruby hash table to store Trackings from C++
1182 objects to Ruby objects. */
1183
1184 /* Try to see if some other .so has already created a
1185 tracking hash table, which we keep hidden in an instance var
1186 in the SWIG module.
1187 This is done to allow multiple DSOs to share the same
1188 tracking table.
1189 */
1190 ID trackings_id = rb_intern( "@__trackings__" );
1191 VALUE verbose = rb_gv_get("VERBOSE");
1192 rb_gv_set("VERBOSE", Qfalse);
1193 swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
1194 rb_gv_set("VERBOSE", verbose);
1195
1196 /* No, it hasn't. Create one ourselves */
1197 if ( swig_ruby_trackings == Qnil )
1198 {
1199 swig_ruby_trackings = rb_hash_new();
1200 rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
1201 }
1202
1203 /* Now store a reference to the hash table delete function
1204 so that we only have to look it up once.*/
1205 swig_ruby_hash_delete = rb_intern("delete");
1206 }
1207
1208 /* Get a Ruby number to reference a pointer */
SWIG_RubyPtrToReference(void * ptr)1209 SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
1210 /* We cast the pointer to an unsigned long
1211 and then store a reference to it using
1212 a Ruby number object. */
1213
1214 /* Convert the pointer to a Ruby number */
1215 return SWIG2NUM(ptr);
1216 }
1217
1218 /* Get a Ruby number to reference an object */
SWIG_RubyObjectToReference(VALUE object)1219 SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
1220 /* We cast the object to an unsigned long
1221 and then store a reference to it using
1222 a Ruby number object. */
1223
1224 /* Convert the Object to a Ruby number */
1225 return SWIG2NUM(object);
1226 }
1227
1228 /* Get a Ruby object from a previously stored reference */
SWIG_RubyReferenceToObject(VALUE reference)1229 SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
1230 /* The provided Ruby number object is a reference
1231 to the Ruby object we want.*/
1232
1233 /* Convert the Ruby number to a Ruby object */
1234 return NUM2SWIG(reference);
1235 }
1236
1237 /* Add a Tracking from a C/C++ struct to a Ruby object */
SWIG_RubyAddTracking(void * ptr,VALUE object)1238 SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
1239 /* In a Ruby hash table we store the pointer and
1240 the associated Ruby object. The trick here is
1241 that we cannot store the Ruby object directly - if
1242 we do then it cannot be garbage collected. So
1243 instead we typecast it as a unsigned long and
1244 convert it to a Ruby number object.*/
1245
1246 /* Get a reference to the pointer as a Ruby number */
1247 VALUE key = SWIG_RubyPtrToReference(ptr);
1248
1249 /* Get a reference to the Ruby object as a Ruby number */
1250 VALUE value = SWIG_RubyObjectToReference(object);
1251
1252 /* Store the mapping to the global hash table. */
1253 rb_hash_aset(swig_ruby_trackings, key, value);
1254 }
1255
1256 /* Get the Ruby object that owns the specified C/C++ struct */
SWIG_RubyInstanceFor(void * ptr)1257 SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1258 /* Get a reference to the pointer as a Ruby number */
1259 VALUE key = SWIG_RubyPtrToReference(ptr);
1260
1261 /* Now lookup the value stored in the global hash table */
1262 VALUE value = rb_hash_aref(swig_ruby_trackings, key);
1263
1264 if (value == Qnil) {
1265 /* No object exists - return nil. */
1266 return Qnil;
1267 }
1268 else {
1269 /* Convert this value to Ruby object */
1270 return SWIG_RubyReferenceToObject(value);
1271 }
1272 }
1273
1274 /* Remove a Tracking from a C/C++ struct to a Ruby object. It
1275 is very important to remove objects once they are destroyed
1276 since the same memory address may be reused later to create
1277 a new object. */
SWIG_RubyRemoveTracking(void * ptr)1278 SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
1279 /* Get a reference to the pointer as a Ruby number */
1280 VALUE key = SWIG_RubyPtrToReference(ptr);
1281
1282 /* Delete the object from the hash table by calling Ruby's
1283 do this we need to call the Hash.delete method.*/
1284 rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
1285 }
1286
1287 /* This is a helper method that unlinks a Ruby object from its
1288 underlying C++ object. This is needed if the lifetime of the
1289 Ruby object is longer than the C++ object */
SWIG_RubyUnlinkObjects(void * ptr)1290 SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1291 VALUE object = SWIG_RubyInstanceFor(ptr);
1292
1293 if (object != Qnil) {
1294 DATA_PTR(object) = 0;
1295 }
1296 }
1297
1298
1299 #ifdef __cplusplus
1300 }
1301 #endif
1302
1303 /* -----------------------------------------------------------------------------
1304 * Ruby API portion that goes into the runtime
1305 * ----------------------------------------------------------------------------- */
1306
1307 #ifdef __cplusplus
1308 extern "C" {
1309 #endif
1310
1311 SWIGINTERN VALUE
SWIG_Ruby_AppendOutput(VALUE target,VALUE o)1312 SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1313 if (NIL_P(target)) {
1314 target = o;
1315 } else {
1316 if (TYPE(target) != T_ARRAY) {
1317 VALUE o2 = target;
1318 target = rb_ary_new();
1319 rb_ary_push(target, o2);
1320 }
1321 rb_ary_push(target, o);
1322 }
1323 return target;
1324 }
1325
1326 /* For ruby1.8.4 and earlier. */
1327 #ifndef RUBY_INIT_STACK
1328 RUBY_EXTERN void Init_stack(VALUE* addr);
1329 # define RUBY_INIT_STACK \
1330 VALUE variable_in_this_stack_frame; \
1331 Init_stack(&variable_in_this_stack_frame);
1332 #endif
1333
1334
1335 #ifdef __cplusplus
1336 }
1337 #endif
1338
1339
1340 /* -----------------------------------------------------------------------------
1341 * rubyrun.swg
1342 *
1343 * This file contains the runtime support for Ruby modules
1344 * and includes code for managing global variables and pointer
1345 * type checking.
1346 * ----------------------------------------------------------------------------- */
1347
1348 /* For backward compatibility only */
1349 #define SWIG_POINTER_EXCEPTION 0
1350
1351 /* for raw pointers */
1352 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1353 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1354 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
1355 #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
1356 #define swig_owntype ruby_owntype
1357
1358 /* for raw packed data */
1359 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
1360 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1361
1362 /* for class or struct pointers */
1363 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1364 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1365
1366 /* for C or C++ function pointers */
1367 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
1368 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
1369
1370 /* for C++ member pointers, ie, member methods */
1371 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
1372 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
1373
1374
1375 /* Runtime API */
1376
1377 #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule()
1378 #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
1379
1380
1381 /* Error manipulation */
1382
1383 #define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
1384 #define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
1385 #define SWIG_fail goto fail
1386
1387
1388 /* Ruby-specific SWIG API */
1389
1390 #define SWIG_InitRuntime() SWIG_Ruby_InitRuntime()
1391 #define SWIG_define_class(ty) SWIG_Ruby_define_class(ty)
1392 #define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty)
1393 #define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
1394 #define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
1395
1396 #include "assert.h"
1397
1398 /* -----------------------------------------------------------------------------
1399 * pointers/data manipulation
1400 * ----------------------------------------------------------------------------- */
1401
1402 #ifdef __cplusplus
1403 extern "C" {
1404 #endif
1405
1406 typedef struct {
1407 VALUE klass;
1408 VALUE mImpl;
1409 void (*mark)(void *);
1410 void (*destroy)(void *);
1411 int trackObjects;
1412 } swig_class;
1413
1414
1415 /* Global pointer used to keep some internal SWIG stuff */
1416 static VALUE _cSWIG_Pointer = Qnil;
1417 static VALUE swig_runtime_data_type_pointer = Qnil;
1418
1419 /* Global IDs used to keep some internal SWIG stuff */
1420 static ID swig_arity_id = 0;
1421 static ID swig_call_id = 0;
1422
1423 /*
1424 If your swig extension is to be run within an embedded ruby and has
1425 director callbacks, you should set -DRUBY_EMBEDDED during compilation.
1426 This will reset ruby's stack frame on each entry point from the main
1427 program the first time a virtual director function is invoked (in a
1428 non-recursive way).
1429 If this is not done, you run the risk of Ruby trashing the stack.
1430 */
1431
1432 #ifdef RUBY_EMBEDDED
1433
1434 # define SWIG_INIT_STACK \
1435 if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
1436 ++swig_virtual_calls;
1437 # define SWIG_RELEASE_STACK --swig_virtual_calls;
1438 # define Ruby_DirectorTypeMismatchException(x) \
1439 rb_raise( rb_eTypeError, "%s", x ); return c_result;
1440
1441 static unsigned int swig_virtual_calls = 0;
1442
1443 #else /* normal non-embedded extension */
1444
1445 # define SWIG_INIT_STACK
1446 # define SWIG_RELEASE_STACK
1447 # define Ruby_DirectorTypeMismatchException(x) \
1448 throw Swig::DirectorTypeMismatchException( x );
1449
1450 #endif /* RUBY_EMBEDDED */
1451
1452
1453 SWIGRUNTIME VALUE
getExceptionClass(void)1454 getExceptionClass(void) {
1455 static int init = 0;
1456 static VALUE rubyExceptionClass ;
1457 if (!init) {
1458 init = 1;
1459 rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
1460 }
1461 return rubyExceptionClass;
1462 }
1463
1464 /* This code checks to see if the Ruby object being raised as part
1465 of an exception inherits from the Ruby class Exception. If so,
1466 the object is simply returned. If not, then a new Ruby exception
1467 object is created and that will be returned to Ruby.*/
1468 SWIGRUNTIME VALUE
SWIG_Ruby_ExceptionType(swig_type_info * desc,VALUE obj)1469 SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
1470 VALUE exceptionClass = getExceptionClass();
1471 if (rb_obj_is_kind_of(obj, exceptionClass)) {
1472 return obj;
1473 } else {
1474 return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
1475 }
1476 }
1477
1478 /* Initialize Ruby runtime support */
1479 SWIGRUNTIME void
SWIG_Ruby_InitRuntime(void)1480 SWIG_Ruby_InitRuntime(void)
1481 {
1482 if (_mSWIG == Qnil) {
1483 _mSWIG = rb_define_module("SWIG");
1484 swig_call_id = rb_intern("call");
1485 swig_arity_id = rb_intern("arity");
1486 }
1487 }
1488
1489 /* Define Ruby class for C type */
1490 SWIGRUNTIME void
SWIG_Ruby_define_class(swig_type_info * type)1491 SWIG_Ruby_define_class(swig_type_info *type)
1492 {
1493 VALUE klass;
1494 char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1495 sprintf(klass_name, "TYPE%s", type->name);
1496 if (NIL_P(_cSWIG_Pointer)) {
1497 _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1498 rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1499 }
1500 klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1501 free((void *) klass_name);
1502 }
1503
1504 /* Create a new pointer object */
1505 SWIGRUNTIME VALUE
SWIG_Ruby_NewPointerObj(void * ptr,swig_type_info * type,int flags)1506 SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1507 {
1508 int own = flags & SWIG_POINTER_OWN;
1509 int track;
1510 char *klass_name;
1511 swig_class *sklass;
1512 VALUE klass;
1513 VALUE obj;
1514
1515 if (!ptr)
1516 return Qnil;
1517
1518 if (type->clientdata) {
1519 sklass = (swig_class *) type->clientdata;
1520
1521 /* Are we tracking this class and have we already returned this Ruby object? */
1522 track = sklass->trackObjects;
1523 if (track) {
1524 obj = SWIG_RubyInstanceFor(ptr);
1525
1526 /* Check the object's type and make sure it has the correct type.
1527 It might not in cases where methods do things like
1528 downcast methods. */
1529 if (obj != Qnil) {
1530 VALUE value = rb_iv_get(obj, "@__swigtype__");
1531 const char* type_name = RSTRING_PTR(value);
1532
1533 if (strcmp(type->name, type_name) == 0) {
1534 return obj;
1535 }
1536 }
1537 }
1538
1539 /* Create a new Ruby object */
1540 obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
1541 ( own ? VOIDFUNC(sklass->destroy) :
1542 (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
1543 ), ptr);
1544
1545 /* If tracking is on for this class then track this object. */
1546 if (track) {
1547 SWIG_RubyAddTracking(ptr, obj);
1548 }
1549 } else {
1550 klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1551 sprintf(klass_name, "TYPE%s", type->name);
1552 klass = rb_const_get(_mSWIG, rb_intern(klass_name));
1553 free((void *) klass_name);
1554 obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1555 }
1556 rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1557
1558 return obj;
1559 }
1560
1561 /* Create a new class instance (always owned) */
1562 SWIGRUNTIME VALUE
SWIG_Ruby_NewClassInstance(VALUE klass,swig_type_info * type)1563 SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
1564 {
1565 VALUE obj;
1566 swig_class *sklass = (swig_class *) type->clientdata;
1567 obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
1568 rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1569 return obj;
1570 }
1571
1572 /* Get type mangle from class name */
1573 SWIGRUNTIMEINLINE char *
SWIG_Ruby_MangleStr(VALUE obj)1574 SWIG_Ruby_MangleStr(VALUE obj)
1575 {
1576 VALUE stype = rb_iv_get(obj, "@__swigtype__");
1577 return StringValuePtr(stype);
1578 }
1579
1580 /* Acquire a pointer value */
1581 typedef void (*ruby_owntype)(void*);
1582
1583 SWIGRUNTIME ruby_owntype
SWIG_Ruby_AcquirePtr(VALUE obj,ruby_owntype own)1584 SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
1585 if (obj) {
1586 ruby_owntype oldown = RDATA(obj)->dfree;
1587 RDATA(obj)->dfree = own;
1588 return oldown;
1589 } else {
1590 return 0;
1591 }
1592 }
1593
1594 /* Convert a pointer value */
1595 SWIGRUNTIME int
SWIG_Ruby_ConvertPtrAndOwn(VALUE obj,void ** ptr,swig_type_info * ty,int flags,ruby_owntype * own)1596 SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
1597 {
1598 char *c;
1599 swig_cast_info *tc;
1600 void *vptr = 0;
1601
1602 /* Grab the pointer */
1603 if (NIL_P(obj)) {
1604 *ptr = 0;
1605 return SWIG_OK;
1606 } else {
1607 if (TYPE(obj) != T_DATA) {
1608 return SWIG_ERROR;
1609 }
1610 Data_Get_Struct(obj, void, vptr);
1611 }
1612
1613 if (own) *own = RDATA(obj)->dfree;
1614
1615 /* Check to see if the input object is giving up ownership
1616 of the underlying C struct or C++ object. If so then we
1617 need to reset the destructor since the Ruby object no
1618 longer owns the underlying C++ object.*/
1619 if (flags & SWIG_POINTER_DISOWN) {
1620 /* Is tracking on for this class? */
1621 int track = 0;
1622 if (ty && ty->clientdata) {
1623 swig_class *sklass = (swig_class *) ty->clientdata;
1624 track = sklass->trackObjects;
1625 }
1626
1627 if (track) {
1628 /* We are tracking objects for this class. Thus we change the destructor
1629 * to SWIG_RubyRemoveTracking. This allows us to
1630 * remove the mapping from the C++ to Ruby object
1631 * when the Ruby object is garbage collected. If we don't
1632 * do this, then it is possible we will return a reference
1633 * to a Ruby object that no longer exists thereby crashing Ruby. */
1634 RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
1635 } else {
1636 RDATA(obj)->dfree = 0;
1637 }
1638 }
1639
1640 /* Do type-checking if type info was provided */
1641 if (ty) {
1642 if (ty->clientdata) {
1643 if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
1644 if (vptr == 0) {
1645 /* The object has already been deleted */
1646 return SWIG_ObjectPreviouslyDeletedError;
1647 }
1648 *ptr = vptr;
1649 return SWIG_OK;
1650 }
1651 }
1652 if ((c = SWIG_MangleStr(obj)) == NULL) {
1653 return SWIG_ERROR;
1654 }
1655 tc = SWIG_TypeCheck(c, ty);
1656 if (!tc) {
1657 return SWIG_ERROR;
1658 } else {
1659 int newmemory = 0;
1660 *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
1661 assert(!newmemory); /* newmemory handling not yet implemented */
1662 }
1663 } else {
1664 *ptr = vptr;
1665 }
1666
1667 return SWIG_OK;
1668 }
1669
1670 /* Check convert */
1671 SWIGRUNTIMEINLINE int
SWIG_Ruby_CheckConvert(VALUE obj,swig_type_info * ty)1672 SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
1673 {
1674 char *c = SWIG_MangleStr(obj);
1675 if (!c) return 0;
1676 return SWIG_TypeCheck(c,ty) != 0;
1677 }
1678
1679 SWIGRUNTIME VALUE
SWIG_Ruby_NewPackedObj(void * ptr,int sz,swig_type_info * type)1680 SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1681 char result[1024];
1682 char *r = result;
1683 if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
1684 *(r++) = '_';
1685 r = SWIG_PackData(r, ptr, sz);
1686 strcpy(r, type->name);
1687 return rb_str_new2(result);
1688 }
1689
1690 /* Convert a packed value value */
1691 SWIGRUNTIME int
SWIG_Ruby_ConvertPacked(VALUE obj,void * ptr,int sz,swig_type_info * ty)1692 SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1693 swig_cast_info *tc;
1694 const char *c;
1695
1696 if (TYPE(obj) != T_STRING) goto type_error;
1697 c = StringValuePtr(obj);
1698 /* Pointer values must start with leading underscore */
1699 if (*c != '_') goto type_error;
1700 c++;
1701 c = SWIG_UnpackData(c, ptr, sz);
1702 if (ty) {
1703 tc = SWIG_TypeCheck(c, ty);
1704 if (!tc) goto type_error;
1705 }
1706 return SWIG_OK;
1707
1708 type_error:
1709 return SWIG_ERROR;
1710 }
1711
1712 SWIGRUNTIME swig_module_info *
SWIG_Ruby_GetModule(void)1713 SWIG_Ruby_GetModule(void)
1714 {
1715 VALUE pointer;
1716 swig_module_info *ret = 0;
1717 VALUE verbose = rb_gv_get("VERBOSE");
1718
1719 /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
1720 rb_gv_set("VERBOSE", Qfalse);
1721
1722 /* first check if pointer already created */
1723 pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1724 if (pointer != Qnil) {
1725 Data_Get_Struct(pointer, swig_module_info, ret);
1726 }
1727
1728 /* reinstate warnings */
1729 rb_gv_set("VERBOSE", verbose);
1730 return ret;
1731 }
1732
1733 SWIGRUNTIME void
SWIG_Ruby_SetModule(swig_module_info * pointer)1734 SWIG_Ruby_SetModule(swig_module_info *pointer)
1735 {
1736 /* register a new class */
1737 VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1738 /* create and store the structure pointer to a global variable */
1739 swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1740 rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
1741 }
1742
1743 /* This function can be used to check whether a proc or method or similarly
1744 callable function has been passed. Usually used in a %typecheck, like:
1745
1746 %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
1747 $result = SWIG_Ruby_isCallable( $input );
1748 }
1749 */
1750 SWIGINTERN
SWIG_Ruby_isCallable(VALUE proc)1751 int SWIG_Ruby_isCallable( VALUE proc )
1752 {
1753 if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
1754 return 1;
1755 return 0;
1756 }
1757
1758 /* This function can be used to check the arity (number of arguments)
1759 a proc or method can take. Usually used in a %typecheck.
1760 Valid arities will be that equal to minimal or those < 0
1761 which indicate a variable number of parameters at the end.
1762 */
1763 SWIGINTERN
SWIG_Ruby_arity(VALUE proc,int minimal)1764 int SWIG_Ruby_arity( VALUE proc, int minimal )
1765 {
1766 if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
1767 {
1768 VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1769 int arity = NUM2INT(num);
1770 if ( arity < 0 && (arity+1) < -minimal ) return 1;
1771 if ( arity == minimal ) return 1;
1772 return 1;
1773 }
1774 return 0;
1775 }
1776
1777
1778 #ifdef __cplusplus
1779 }
1780 #endif
1781
1782
1783
1784 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1785
1786 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1787
1788
1789
1790 /* -------- TYPES TABLE (BEGIN) -------- */
1791
1792 #define SWIGTYPE_p_char swig_types[0]
1793 #define SWIGTYPE_p_librdf_digest_s swig_types[1]
1794 #define SWIGTYPE_p_librdf_hash_s swig_types[2]
1795 #define SWIGTYPE_p_librdf_iterator_s swig_types[3]
1796 #define SWIGTYPE_p_librdf_log_func swig_types[4]
1797 #define SWIGTYPE_p_librdf_log_message swig_types[5]
1798 #define SWIGTYPE_p_librdf_model_s swig_types[6]
1799 #define SWIGTYPE_p_librdf_node_s swig_types[7]
1800 #define SWIGTYPE_p_librdf_parser_s swig_types[8]
1801 #define SWIGTYPE_p_librdf_query swig_types[9]
1802 #define SWIGTYPE_p_librdf_query_results swig_types[10]
1803 #define SWIGTYPE_p_librdf_serializer_s swig_types[11]
1804 #define SWIGTYPE_p_librdf_statement_s swig_types[12]
1805 #define SWIGTYPE_p_librdf_storage_s swig_types[13]
1806 #define SWIGTYPE_p_librdf_stream_s swig_types[14]
1807 #define SWIGTYPE_p_librdf_uri_s swig_types[15]
1808 #define SWIGTYPE_p_librdf_world_s swig_types[16]
1809 #define SWIGTYPE_p_p_char swig_types[17]
1810 #define SWIGTYPE_p_raptor_locator swig_types[18]
1811 static swig_type_info *swig_types[20];
1812 static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0};
1813 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1814 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1815
1816 /* -------- TYPES TABLE (END) -------- */
1817
1818 #define SWIG_init Init_redland
1819 #define SWIG_name "Redland"
1820
1821 static VALUE mRedland;
1822
1823 #define SWIG_RUBY_THREAD_BEGIN_BLOCK
1824 #define SWIG_RUBY_THREAD_END_BLOCK
1825
1826
1827 #define SWIGVERSION 0x020007
1828 #define SWIG_VERSION SWIGVERSION
1829
1830
1831 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1832 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1833
1834
1835 #ifdef __cplusplus
1836 extern "C" {
1837 #endif
1838
1839 // Ruby 1.9 changed the file name of this header
1840 #ifdef HAVE_RUBY_IO_H
1841 #include "ruby/io.h"
1842 #else
1843 #include "rubyio.h"
1844 #endif
1845
1846 #ifdef __cplusplus
1847 }
1848 #endif
1849
1850
1851 #ifdef __cplusplus
1852 extern "C" {
1853 #endif
1854 #ifdef HAVE_SYS_TIME_H
1855 # include <sys/time.h>
1856 struct timeval rb_time_timeval(VALUE);
1857 #endif
1858 #ifdef __cplusplus
1859 }
1860 #endif
1861
1862
1863
1864 /* compile-time include (inside a % ... % block) */
1865 #ifdef REDLAND_PRE_I
1866 #include <redland-pre.i>
1867 #endif
1868
1869 #include <redland.h>
1870
1871 /*
1872 * Thanks to the patch in this Debian bug for the solution
1873 * to the crash inside vsnprintf on some architectures.
1874 *
1875 * "reuse of args inside the while(1) loop is in violation of the
1876 * specs and only happens to work by accident on other systems."
1877 *
1878 * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=104325
1879 */
1880
1881 #ifndef va_copy
1882 #ifdef __va_copy
1883 #define va_copy(dest,src) __va_copy(dest,src)
1884 #else
1885 #define va_copy(dest,src) (dest) = (src)
1886 #endif
1887 #endif
1888
1889 /* compile-time include (inside a % ... % block) */
1890 #ifdef REDLAND_POST_I
1891 #include <redland-post.i>
1892 #endif
1893
1894 /* Internal prototypes */
1895 /* FOR TESTING ERRORS ONLY - NOT PART OF API */
1896 void librdf_internal_test_error(librdf_world *world);
1897 void librdf_internal_test_warning(librdf_world *world);
1898
1899
1900 /* prototypes for internal routines called below - NOT PART OF API */
1901 void librdf_test_error(librdf_world* world, const char* message);
1902 void librdf_test_warning(librdf_world* world, const char* message);
1903
1904 /* FOR TESTING ERRORS ONLY - NOT PART OF API */
1905 void
librdf_internal_test_error(librdf_world * world)1906 librdf_internal_test_error(librdf_world *world)
1907 {
1908 librdf_test_error(world, "test error message number 1.");
1909 }
1910
1911 void
librdf_internal_test_warning(librdf_world * world)1912 librdf_internal_test_warning(librdf_world *world)
1913 {
1914 librdf_test_warning(world, "test warning message number 2.");
1915 }
1916
1917
1918
1919 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)1920 SWIG_pchar_descriptor(void)
1921 {
1922 static int init = 0;
1923 static swig_type_info* info = 0;
1924 if (!init) {
1925 info = SWIG_TypeQuery("_p_char");
1926 init = 1;
1927 }
1928 return info;
1929 }
1930
1931
1932 SWIGINTERN int
SWIG_AsCharPtrAndSize(VALUE obj,char ** cptr,size_t * psize,int * alloc)1933 SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
1934 {
1935 if (TYPE(obj) == T_STRING) {
1936 #if defined(StringValuePtr)
1937 char *cstr = StringValuePtr(obj);
1938 #else
1939 char *cstr = STR2CSTR(obj);
1940 #endif
1941 size_t size = RSTRING_LEN(obj) + 1;
1942 if (cptr) {
1943 if (alloc) {
1944 if (*alloc == SWIG_NEWOBJ) {
1945 *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
1946 } else {
1947 *cptr = cstr;
1948 *alloc = SWIG_OLDOBJ;
1949 }
1950 }
1951 }
1952 if (psize) *psize = size;
1953 return SWIG_OK;
1954 } else {
1955 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1956 if (pchar_descriptor) {
1957 void* vptr = 0;
1958 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
1959 if (cptr) *cptr = (char *)vptr;
1960 if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
1961 if (alloc) *alloc = SWIG_OLDOBJ;
1962 return SWIG_OK;
1963 }
1964 }
1965 }
1966 return SWIG_TypeError;
1967 }
1968
1969
1970
1971
1972
1973 SWIGINTERN VALUE
SWIG_ruby_failed(void)1974 SWIG_ruby_failed(void)
1975 {
1976 return Qnil;
1977 }
1978
1979
1980 /*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIG_AUX_NUM2ULONG(VALUE * args)1981 SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
1982 {
1983 VALUE obj = args[0];
1984 VALUE type = TYPE(obj);
1985 unsigned long *res = (unsigned long *)(args[1]);
1986 *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj);
1987 return obj;
1988 }
1989 /*@SWIG@*/
1990
1991 SWIGINTERN int
SWIG_AsVal_unsigned_SS_long(VALUE obj,unsigned long * val)1992 SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
1993 {
1994 VALUE type = TYPE(obj);
1995 if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
1996 unsigned long v;
1997 VALUE a[2];
1998 a[0] = obj;
1999 a[1] = (VALUE)(&v);
2000 if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2001 if (val) *val = v;
2002 return SWIG_OK;
2003 }
2004 }
2005 return SWIG_TypeError;
2006 }
2007
2008
2009 SWIGINTERNINLINE int
SWIG_AsVal_size_t(VALUE obj,size_t * val)2010 SWIG_AsVal_size_t (VALUE obj, size_t *val)
2011 {
2012 unsigned long v;
2013 int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
2014 if (SWIG_IsOK(res) && val) *val = (size_t)(v);
2015 return res;
2016 }
2017
2018
2019 #include <limits.h>
2020 #if !defined(SWIG_NO_LLONG_MAX)
2021 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
2022 # define LLONG_MAX __LONG_LONG_MAX__
2023 # define LLONG_MIN (-LLONG_MAX - 1LL)
2024 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
2025 # endif
2026 #endif
2027
2028
2029 #define SWIG_From_long LONG2NUM
2030
2031
2032 SWIGINTERNINLINE VALUE
SWIG_From_int(int value)2033 SWIG_From_int (int value)
2034 {
2035 return SWIG_From_long (value);
2036 }
2037
2038
2039 /*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIG_AUX_NUM2LONG(VALUE * args)2040 SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
2041 {
2042 VALUE obj = args[0];
2043 VALUE type = TYPE(obj);
2044 long *res = (long *)(args[1]);
2045 *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
2046 return obj;
2047 }
2048 /*@SWIG@*/
2049
2050 SWIGINTERN int
SWIG_AsVal_long(VALUE obj,long * val)2051 SWIG_AsVal_long (VALUE obj, long* val)
2052 {
2053 VALUE type = TYPE(obj);
2054 if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
2055 long v;
2056 VALUE a[2];
2057 a[0] = obj;
2058 a[1] = (VALUE)(&v);
2059 if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2060 if (val) *val = v;
2061 return SWIG_OK;
2062 }
2063 }
2064 return SWIG_TypeError;
2065 }
2066
2067
2068 SWIGINTERN int
SWIG_AsVal_int(VALUE obj,int * val)2069 SWIG_AsVal_int (VALUE obj, int *val)
2070 {
2071 long v;
2072 int res = SWIG_AsVal_long (obj, &v);
2073 if (SWIG_IsOK(res)) {
2074 if ((v < INT_MIN || v > INT_MAX)) {
2075 return SWIG_OverflowError;
2076 } else {
2077 if (val) *val = (int)(v);
2078 }
2079 }
2080 return res;
2081 }
2082
2083
2084 SWIGINTERNINLINE VALUE
SWIG_FromCharPtrAndSize(const char * carray,size_t size)2085 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2086 {
2087 if (carray) {
2088 if (size > LONG_MAX) {
2089 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2090 return pchar_descriptor ?
2091 SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : Qnil;
2092 } else {
2093 return rb_str_new(carray, (long)(size));
2094 }
2095 } else {
2096 return Qnil;
2097 }
2098 }
2099
2100
2101 SWIGINTERNINLINE VALUE
SWIG_FromCharPtr(const char * cptr)2102 SWIG_FromCharPtr(const char *cptr)
2103 {
2104 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2105 }
2106
2107
2108 SWIGINTERNINLINE VALUE
SWIG_From_unsigned_SS_long(unsigned long value)2109 SWIG_From_unsigned_SS_long (unsigned long value)
2110 {
2111 return ULONG2NUM(value);
2112 }
2113
2114
2115 SWIGINTERNINLINE VALUE
SWIG_From_unsigned_SS_int(unsigned int value)2116 SWIG_From_unsigned_SS_int (unsigned int value)
2117 {
2118 return SWIG_From_unsigned_SS_long (value);
2119 }
2120
2121 SWIGINTERN VALUE
_wrap_librdf_new_digest(int argc,VALUE * argv,VALUE self)2122 _wrap_librdf_new_digest(int argc, VALUE *argv, VALUE self) {
2123 librdf_world *arg1 = (librdf_world *) 0 ;
2124 char *arg2 = (char *) 0 ;
2125 void *argp1 = 0 ;
2126 int res1 = 0 ;
2127 int res2 ;
2128 char *buf2 = 0 ;
2129 int alloc2 = 0 ;
2130 librdf_digest *result = 0 ;
2131 VALUE vresult = Qnil;
2132
2133 if ((argc < 2) || (argc > 2)) {
2134 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2135 }
2136 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
2137 if (!SWIG_IsOK(res1)) {
2138 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_digest", 1, argv[0] ));
2139 }
2140 arg1 = (librdf_world *)(argp1);
2141 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2142 if (!SWIG_IsOK(res2)) {
2143 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","librdf_new_digest", 2, argv[1] ));
2144 }
2145 arg2 = (char *)(buf2);
2146 result = (librdf_digest *)librdf_new_digest(arg1,arg2);
2147 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_digest_s, SWIG_POINTER_OWN | 0 );
2148 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2149 return vresult;
2150 fail:
2151 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2152 return Qnil;
2153 }
2154
2155
2156 SWIGINTERN VALUE
_wrap_librdf_free_digest(int argc,VALUE * argv,VALUE self)2157 _wrap_librdf_free_digest(int argc, VALUE *argv, VALUE self) {
2158 librdf_digest *arg1 = (librdf_digest *) 0 ;
2159 void *argp1 = 0 ;
2160 int res1 = 0 ;
2161
2162 if ((argc < 1) || (argc > 1)) {
2163 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2164 }
2165 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_digest_s, 0 | 0 );
2166 if (!SWIG_IsOK(res1)) {
2167 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_digest *","librdf_free_digest", 1, argv[0] ));
2168 }
2169 arg1 = (librdf_digest *)(argp1);
2170 librdf_free_digest(arg1);
2171 return Qnil;
2172 fail:
2173 return Qnil;
2174 }
2175
2176
2177 SWIGINTERN VALUE
_wrap_librdf_digest_init(int argc,VALUE * argv,VALUE self)2178 _wrap_librdf_digest_init(int argc, VALUE *argv, VALUE self) {
2179 librdf_digest *arg1 = (librdf_digest *) 0 ;
2180 void *argp1 = 0 ;
2181 int res1 = 0 ;
2182
2183 if ((argc < 1) || (argc > 1)) {
2184 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2185 }
2186 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_digest_s, 0 | 0 );
2187 if (!SWIG_IsOK(res1)) {
2188 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_digest *","librdf_digest_init", 1, argv[0] ));
2189 }
2190 arg1 = (librdf_digest *)(argp1);
2191 librdf_digest_init(arg1);
2192 return Qnil;
2193 fail:
2194 return Qnil;
2195 }
2196
2197
2198 SWIGINTERN VALUE
_wrap_librdf_digest_update(int argc,VALUE * argv,VALUE self)2199 _wrap_librdf_digest_update(int argc, VALUE *argv, VALUE self) {
2200 librdf_digest *arg1 = (librdf_digest *) 0 ;
2201 char *arg2 = (char *) 0 ;
2202 size_t arg3 ;
2203 void *argp1 = 0 ;
2204 int res1 = 0 ;
2205 int res2 ;
2206 char *buf2 = 0 ;
2207 int alloc2 = 0 ;
2208 size_t val3 ;
2209 int ecode3 = 0 ;
2210
2211 if ((argc < 3) || (argc > 3)) {
2212 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2213 }
2214 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_digest_s, 0 | 0 );
2215 if (!SWIG_IsOK(res1)) {
2216 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_digest *","librdf_digest_update", 1, argv[0] ));
2217 }
2218 arg1 = (librdf_digest *)(argp1);
2219 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2220 if (!SWIG_IsOK(res2)) {
2221 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_digest_update", 2, argv[1] ));
2222 }
2223 arg2 = (char *)(buf2);
2224 ecode3 = SWIG_AsVal_size_t(argv[2], &val3);
2225 if (!SWIG_IsOK(ecode3)) {
2226 SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","librdf_digest_update", 3, argv[2] ));
2227 }
2228 arg3 = (size_t)(val3);
2229 librdf_digest_update(arg1,(char const *)arg2,arg3);
2230 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2231 return Qnil;
2232 fail:
2233 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2234 return Qnil;
2235 }
2236
2237
2238 SWIGINTERN VALUE
_wrap_librdf_digest_update_string(int argc,VALUE * argv,VALUE self)2239 _wrap_librdf_digest_update_string(int argc, VALUE *argv, VALUE self) {
2240 librdf_digest *arg1 = (librdf_digest *) 0 ;
2241 char *arg2 = (char *) 0 ;
2242 void *argp1 = 0 ;
2243 int res1 = 0 ;
2244 int res2 ;
2245 char *buf2 = 0 ;
2246 int alloc2 = 0 ;
2247
2248 if ((argc < 2) || (argc > 2)) {
2249 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2250 }
2251 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_digest_s, 0 | 0 );
2252 if (!SWIG_IsOK(res1)) {
2253 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_digest *","librdf_digest_update_string", 1, argv[0] ));
2254 }
2255 arg1 = (librdf_digest *)(argp1);
2256 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2257 if (!SWIG_IsOK(res2)) {
2258 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_digest_update_string", 2, argv[1] ));
2259 }
2260 arg2 = (char *)(buf2);
2261 librdf_digest_update_string(arg1,(char const *)arg2);
2262 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2263 return Qnil;
2264 fail:
2265 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2266 return Qnil;
2267 }
2268
2269
2270 SWIGINTERN VALUE
_wrap_librdf_digest_final(int argc,VALUE * argv,VALUE self)2271 _wrap_librdf_digest_final(int argc, VALUE *argv, VALUE self) {
2272 librdf_digest *arg1 = (librdf_digest *) 0 ;
2273 void *argp1 = 0 ;
2274 int res1 = 0 ;
2275
2276 if ((argc < 1) || (argc > 1)) {
2277 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2278 }
2279 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_digest_s, 0 | 0 );
2280 if (!SWIG_IsOK(res1)) {
2281 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_digest *","librdf_digest_final", 1, argv[0] ));
2282 }
2283 arg1 = (librdf_digest *)(argp1);
2284 librdf_digest_final(arg1);
2285 return Qnil;
2286 fail:
2287 return Qnil;
2288 }
2289
2290
2291 SWIGINTERN VALUE
_wrap_librdf_digest_to_string(int argc,VALUE * argv,VALUE self)2292 _wrap_librdf_digest_to_string(int argc, VALUE *argv, VALUE self) {
2293 librdf_digest *arg1 = (librdf_digest *) 0 ;
2294 void *argp1 = 0 ;
2295 int res1 = 0 ;
2296 char *result = 0 ;
2297 VALUE vresult = Qnil;
2298
2299 if ((argc < 1) || (argc > 1)) {
2300 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2301 }
2302 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_digest_s, 0 | 0 );
2303 if (!SWIG_IsOK(res1)) {
2304 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_digest *","librdf_digest_to_string", 1, argv[0] ));
2305 }
2306 arg1 = (librdf_digest *)(argp1);
2307 result = (char *)librdf_digest_to_string(arg1);
2308 {
2309 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
2310 }
2311 free((char*)result);
2312 return vresult;
2313 fail:
2314 return Qnil;
2315 }
2316
2317
2318 SWIGINTERN VALUE
_wrap_librdf_new_hash(int argc,VALUE * argv,VALUE self)2319 _wrap_librdf_new_hash(int argc, VALUE *argv, VALUE self) {
2320 librdf_world *arg1 = (librdf_world *) 0 ;
2321 char *arg2 = (char *) 0 ;
2322 void *argp1 = 0 ;
2323 int res1 = 0 ;
2324 int res2 ;
2325 char *buf2 = 0 ;
2326 int alloc2 = 0 ;
2327 librdf_hash *result = 0 ;
2328 VALUE vresult = Qnil;
2329
2330 if ((argc < 2) || (argc > 2)) {
2331 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2332 }
2333 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
2334 if (!SWIG_IsOK(res1)) {
2335 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_hash", 1, argv[0] ));
2336 }
2337 arg1 = (librdf_world *)(argp1);
2338 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2339 if (!SWIG_IsOK(res2)) {
2340 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_new_hash", 2, argv[1] ));
2341 }
2342 arg2 = (char *)(buf2);
2343 result = (librdf_hash *)librdf_new_hash(arg1,(char const *)arg2);
2344 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_hash_s, SWIG_POINTER_OWN | 0 );
2345 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2346 return vresult;
2347 fail:
2348 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2349 return Qnil;
2350 }
2351
2352
2353 SWIGINTERN VALUE
_wrap_librdf_new_hash_from_string(int argc,VALUE * argv,VALUE self)2354 _wrap_librdf_new_hash_from_string(int argc, VALUE *argv, VALUE self) {
2355 librdf_world *arg1 = (librdf_world *) 0 ;
2356 char *arg2 = (char *) 0 ;
2357 char *arg3 = (char *) 0 ;
2358 void *argp1 = 0 ;
2359 int res1 = 0 ;
2360 int res2 ;
2361 char *buf2 = 0 ;
2362 int alloc2 = 0 ;
2363 int res3 ;
2364 char *buf3 = 0 ;
2365 int alloc3 = 0 ;
2366 librdf_hash *result = 0 ;
2367 VALUE vresult = Qnil;
2368
2369 if ((argc < 3) || (argc > 3)) {
2370 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2371 }
2372 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
2373 if (!SWIG_IsOK(res1)) {
2374 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_hash_from_string", 1, argv[0] ));
2375 }
2376 arg1 = (librdf_world *)(argp1);
2377 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2378 if (!SWIG_IsOK(res2)) {
2379 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_new_hash_from_string", 2, argv[1] ));
2380 }
2381 arg2 = (char *)(buf2);
2382 res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
2383 if (!SWIG_IsOK(res3)) {
2384 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","librdf_new_hash_from_string", 3, argv[2] ));
2385 }
2386 arg3 = (char *)(buf3);
2387 result = (librdf_hash *)librdf_new_hash_from_string(arg1,(char const *)arg2,(char const *)arg3);
2388 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_hash_s, SWIG_POINTER_OWN | 0 );
2389 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2390 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2391 return vresult;
2392 fail:
2393 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2394 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2395 return Qnil;
2396 }
2397
2398
2399 SWIGINTERN VALUE
_wrap_librdf_new_hash_from_array_of_strings(int argc,VALUE * argv,VALUE self)2400 _wrap_librdf_new_hash_from_array_of_strings(int argc, VALUE *argv, VALUE self) {
2401 librdf_world *arg1 = (librdf_world *) 0 ;
2402 char *arg2 = (char *) 0 ;
2403 char **arg3 = (char **) 0 ;
2404 void *argp1 = 0 ;
2405 int res1 = 0 ;
2406 int res2 ;
2407 char *buf2 = 0 ;
2408 int alloc2 = 0 ;
2409 void *argp3 = 0 ;
2410 int res3 = 0 ;
2411 librdf_hash *result = 0 ;
2412 VALUE vresult = Qnil;
2413
2414 if ((argc < 3) || (argc > 3)) {
2415 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2416 }
2417 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
2418 if (!SWIG_IsOK(res1)) {
2419 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_hash_from_array_of_strings", 1, argv[0] ));
2420 }
2421 arg1 = (librdf_world *)(argp1);
2422 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2423 if (!SWIG_IsOK(res2)) {
2424 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_new_hash_from_array_of_strings", 2, argv[1] ));
2425 }
2426 arg2 = (char *)(buf2);
2427 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_p_char, 0 | 0 );
2428 if (!SWIG_IsOK(res3)) {
2429 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const **","librdf_new_hash_from_array_of_strings", 3, argv[2] ));
2430 }
2431 arg3 = (char **)(argp3);
2432 result = (librdf_hash *)librdf_new_hash_from_array_of_strings(arg1,(char const *)arg2,(char const **)arg3);
2433 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_hash_s, SWIG_POINTER_OWN | 0 );
2434 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2435 return vresult;
2436 fail:
2437 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2438 return Qnil;
2439 }
2440
2441
2442 SWIGINTERN VALUE
_wrap_librdf_hash_to_string(int argc,VALUE * argv,VALUE self)2443 _wrap_librdf_hash_to_string(int argc, VALUE *argv, VALUE self) {
2444 librdf_hash *arg1 = (librdf_hash *) 0 ;
2445 char **arg2 ;
2446 void *argp1 = 0 ;
2447 int res1 = 0 ;
2448 void *argp2 = 0 ;
2449 int res2 = 0 ;
2450 char *result = 0 ;
2451 VALUE vresult = Qnil;
2452
2453 if ((argc < 2) || (argc > 2)) {
2454 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2455 }
2456 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_hash_s, 0 | 0 );
2457 if (!SWIG_IsOK(res1)) {
2458 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_hash *","librdf_hash_to_string", 1, argv[0] ));
2459 }
2460 arg1 = (librdf_hash *)(argp1);
2461 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_p_char, 0 | 0 );
2462 if (!SWIG_IsOK(res2)) {
2463 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *[]","librdf_hash_to_string", 2, argv[1] ));
2464 }
2465 arg2 = (char **)(argp2);
2466 result = (char *)librdf_hash_to_string(arg1,(char const *(*))arg2);
2467 {
2468 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
2469 }
2470 free((char*)result);
2471 return vresult;
2472 fail:
2473 return Qnil;
2474 }
2475
2476
2477 SWIGINTERN VALUE
_wrap_librdf_free_hash(int argc,VALUE * argv,VALUE self)2478 _wrap_librdf_free_hash(int argc, VALUE *argv, VALUE self) {
2479 librdf_hash *arg1 = (librdf_hash *) 0 ;
2480 void *argp1 = 0 ;
2481 int res1 = 0 ;
2482
2483 if ((argc < 1) || (argc > 1)) {
2484 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2485 }
2486 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_hash_s, 0 | 0 );
2487 if (!SWIG_IsOK(res1)) {
2488 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_hash *","librdf_free_hash", 1, argv[0] ));
2489 }
2490 arg1 = (librdf_hash *)(argp1);
2491 librdf_free_hash(arg1);
2492 return Qnil;
2493 fail:
2494 return Qnil;
2495 }
2496
2497
2498 SWIGINTERN VALUE
_wrap_librdf_new_world(int argc,VALUE * argv,VALUE self)2499 _wrap_librdf_new_world(int argc, VALUE *argv, VALUE self) {
2500 librdf_world *result = 0 ;
2501 VALUE vresult = Qnil;
2502
2503 if ((argc < 0) || (argc > 0)) {
2504 rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2505 }
2506 result = (librdf_world *)librdf_new_world();
2507 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_world_s, SWIG_POINTER_OWN | 0 );
2508 return vresult;
2509 fail:
2510 return Qnil;
2511 }
2512
2513
2514 SWIGINTERN VALUE
_wrap_librdf_free_world(int argc,VALUE * argv,VALUE self)2515 _wrap_librdf_free_world(int argc, VALUE *argv, VALUE self) {
2516 librdf_world *arg1 = (librdf_world *) 0 ;
2517 void *argp1 = 0 ;
2518 int res1 = 0 ;
2519
2520 if ((argc < 1) || (argc > 1)) {
2521 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2522 }
2523 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
2524 if (!SWIG_IsOK(res1)) {
2525 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_free_world", 1, argv[0] ));
2526 }
2527 arg1 = (librdf_world *)(argp1);
2528 librdf_free_world(arg1);
2529 return Qnil;
2530 fail:
2531 return Qnil;
2532 }
2533
2534
2535 SWIGINTERN VALUE
_wrap_librdf_world_open(int argc,VALUE * argv,VALUE self)2536 _wrap_librdf_world_open(int argc, VALUE *argv, VALUE self) {
2537 librdf_world *arg1 = (librdf_world *) 0 ;
2538 void *argp1 = 0 ;
2539 int res1 = 0 ;
2540
2541 if ((argc < 1) || (argc > 1)) {
2542 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2543 }
2544 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
2545 if (!SWIG_IsOK(res1)) {
2546 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_world_open", 1, argv[0] ));
2547 }
2548 arg1 = (librdf_world *)(argp1);
2549 librdf_world_open(arg1);
2550 return Qnil;
2551 fail:
2552 return Qnil;
2553 }
2554
2555
2556 SWIGINTERN VALUE
_wrap_librdf_world_get_feature(int argc,VALUE * argv,VALUE self)2557 _wrap_librdf_world_get_feature(int argc, VALUE *argv, VALUE self) {
2558 librdf_world *arg1 = (librdf_world *) 0 ;
2559 librdf_uri *arg2 = (librdf_uri *) 0 ;
2560 void *argp1 = 0 ;
2561 int res1 = 0 ;
2562 void *argp2 = 0 ;
2563 int res2 = 0 ;
2564 librdf_node *result = 0 ;
2565 VALUE vresult = Qnil;
2566
2567 if ((argc < 2) || (argc > 2)) {
2568 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2569 }
2570 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
2571 if (!SWIG_IsOK(res1)) {
2572 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_world_get_feature", 1, argv[0] ));
2573 }
2574 arg1 = (librdf_world *)(argp1);
2575 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
2576 if (!SWIG_IsOK(res2)) {
2577 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_world_get_feature", 2, argv[1] ));
2578 }
2579 arg2 = (librdf_uri *)(argp2);
2580 result = (librdf_node *)librdf_world_get_feature(arg1,arg2);
2581 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
2582 return vresult;
2583 fail:
2584 return Qnil;
2585 }
2586
2587
2588 SWIGINTERN VALUE
_wrap_librdf_world_set_feature(int argc,VALUE * argv,VALUE self)2589 _wrap_librdf_world_set_feature(int argc, VALUE *argv, VALUE self) {
2590 librdf_world *arg1 = (librdf_world *) 0 ;
2591 librdf_uri *arg2 = (librdf_uri *) 0 ;
2592 librdf_node *arg3 = (librdf_node *) 0 ;
2593 void *argp1 = 0 ;
2594 int res1 = 0 ;
2595 void *argp2 = 0 ;
2596 int res2 = 0 ;
2597 void *argp3 = 0 ;
2598 int res3 = 0 ;
2599 int result;
2600 VALUE vresult = Qnil;
2601
2602 if ((argc < 3) || (argc > 3)) {
2603 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2604 }
2605 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
2606 if (!SWIG_IsOK(res1)) {
2607 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_world_set_feature", 1, argv[0] ));
2608 }
2609 arg1 = (librdf_world *)(argp1);
2610 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
2611 if (!SWIG_IsOK(res2)) {
2612 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_world_set_feature", 2, argv[1] ));
2613 }
2614 arg2 = (librdf_uri *)(argp2);
2615 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
2616 if (!SWIG_IsOK(res3)) {
2617 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_world_set_feature", 3, argv[2] ));
2618 }
2619 arg3 = (librdf_node *)(argp3);
2620 result = (int)librdf_world_set_feature(arg1,arg2,arg3);
2621 vresult = SWIG_From_int((int)(result));
2622 return vresult;
2623 fail:
2624 return Qnil;
2625 }
2626
2627
2628 SWIGINTERN VALUE
_wrap_librdf_parser_get_accept_header(int argc,VALUE * argv,VALUE self)2629 _wrap_librdf_parser_get_accept_header(int argc, VALUE *argv, VALUE self) {
2630 librdf_parser *arg1 = (librdf_parser *) 0 ;
2631 void *argp1 = 0 ;
2632 int res1 = 0 ;
2633 char *result = 0 ;
2634 VALUE vresult = Qnil;
2635
2636 if ((argc < 1) || (argc > 1)) {
2637 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2638 }
2639 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
2640 if (!SWIG_IsOK(res1)) {
2641 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_parser_get_accept_header", 1, argv[0] ));
2642 }
2643 arg1 = (librdf_parser *)(argp1);
2644 result = (char *)librdf_parser_get_accept_header(arg1);
2645 {
2646 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
2647 }
2648 free((char*)result);
2649 return vresult;
2650 fail:
2651 return Qnil;
2652 }
2653
2654
2655 SWIGINTERN VALUE
_wrap_librdf_world_set_logger(int argc,VALUE * argv,VALUE self)2656 _wrap_librdf_world_set_logger(int argc, VALUE *argv, VALUE self) {
2657 librdf_world *arg1 = (librdf_world *) 0 ;
2658 void *arg2 = (void *) 0 ;
2659 librdf_log_func arg3 ;
2660 void *argp1 = 0 ;
2661 int res1 = 0 ;
2662 int res2 ;
2663 void *argp3 ;
2664 int res3 = 0 ;
2665
2666 if ((argc < 3) || (argc > 3)) {
2667 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2668 }
2669 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
2670 if (!SWIG_IsOK(res1)) {
2671 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_world_set_logger", 1, argv[0] ));
2672 }
2673 arg1 = (librdf_world *)(argp1);
2674 res2 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg2), 0, 0);
2675 if (!SWIG_IsOK(res2)) {
2676 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","librdf_world_set_logger", 2, argv[1] ));
2677 }
2678 {
2679 res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_librdf_log_func, 0 );
2680 if (!SWIG_IsOK(res3)) {
2681 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_log_func","librdf_world_set_logger", 3, argv[2] ));
2682 }
2683 if (!argp3) {
2684 SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "librdf_log_func","librdf_world_set_logger", 3, argv[2]));
2685 } else {
2686 arg3 = *((librdf_log_func *)(argp3));
2687 }
2688 }
2689 librdf_world_set_logger(arg1,arg2,arg3);
2690 return Qnil;
2691 fail:
2692 return Qnil;
2693 }
2694
2695
2696 SWIGINTERN VALUE
_wrap_librdf_free_iterator(int argc,VALUE * argv,VALUE self)2697 _wrap_librdf_free_iterator(int argc, VALUE *argv, VALUE self) {
2698 librdf_iterator *arg1 = (librdf_iterator *) 0 ;
2699 void *argp1 = 0 ;
2700 int res1 = 0 ;
2701
2702 if ((argc < 1) || (argc > 1)) {
2703 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2704 }
2705 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_iterator_s, 0 | 0 );
2706 if (!SWIG_IsOK(res1)) {
2707 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_iterator *","librdf_free_iterator", 1, argv[0] ));
2708 }
2709 arg1 = (librdf_iterator *)(argp1);
2710 librdf_free_iterator(arg1);
2711 return Qnil;
2712 fail:
2713 return Qnil;
2714 }
2715
2716
2717 SWIGINTERN VALUE
_wrap_librdf_iterator_end(int argc,VALUE * argv,VALUE self)2718 _wrap_librdf_iterator_end(int argc, VALUE *argv, VALUE self) {
2719 librdf_iterator *arg1 = (librdf_iterator *) 0 ;
2720 void *argp1 = 0 ;
2721 int res1 = 0 ;
2722 int result;
2723 VALUE vresult = Qnil;
2724
2725 if ((argc < 1) || (argc > 1)) {
2726 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2727 }
2728 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_iterator_s, 0 | 0 );
2729 if (!SWIG_IsOK(res1)) {
2730 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_iterator *","librdf_iterator_end", 1, argv[0] ));
2731 }
2732 arg1 = (librdf_iterator *)(argp1);
2733 result = (int)librdf_iterator_end(arg1);
2734 vresult = SWIG_From_int((int)(result));
2735 return vresult;
2736 fail:
2737 return Qnil;
2738 }
2739
2740
2741 SWIGINTERN VALUE
_wrap_librdf_iterator_get_object(int argc,VALUE * argv,VALUE self)2742 _wrap_librdf_iterator_get_object(int argc, VALUE *argv, VALUE self) {
2743 librdf_iterator *arg1 = (librdf_iterator *) 0 ;
2744 void *argp1 = 0 ;
2745 int res1 = 0 ;
2746 librdf_node *result = 0 ;
2747 VALUE vresult = Qnil;
2748
2749 if ((argc < 1) || (argc > 1)) {
2750 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2751 }
2752 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_iterator_s, 0 | 0 );
2753 if (!SWIG_IsOK(res1)) {
2754 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_iterator *","librdf_iterator_get_object", 1, argv[0] ));
2755 }
2756 arg1 = (librdf_iterator *)(argp1);
2757 result = (librdf_node *)librdf_iterator_get_object(arg1);
2758 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, 0 | 0 );
2759 return vresult;
2760 fail:
2761 return Qnil;
2762 }
2763
2764
2765 SWIGINTERN VALUE
_wrap_librdf_iterator_get_context(int argc,VALUE * argv,VALUE self)2766 _wrap_librdf_iterator_get_context(int argc, VALUE *argv, VALUE self) {
2767 librdf_iterator *arg1 = (librdf_iterator *) 0 ;
2768 void *argp1 = 0 ;
2769 int res1 = 0 ;
2770 librdf_node *result = 0 ;
2771 VALUE vresult = Qnil;
2772
2773 if ((argc < 1) || (argc > 1)) {
2774 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2775 }
2776 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_iterator_s, 0 | 0 );
2777 if (!SWIG_IsOK(res1)) {
2778 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_iterator *","librdf_iterator_get_context", 1, argv[0] ));
2779 }
2780 arg1 = (librdf_iterator *)(argp1);
2781 result = (librdf_node *)librdf_iterator_get_context(arg1);
2782 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, 0 | 0 );
2783 return vresult;
2784 fail:
2785 return Qnil;
2786 }
2787
2788
2789 SWIGINTERN VALUE
_wrap_librdf_iterator_next(int argc,VALUE * argv,VALUE self)2790 _wrap_librdf_iterator_next(int argc, VALUE *argv, VALUE self) {
2791 librdf_iterator *arg1 = (librdf_iterator *) 0 ;
2792 void *argp1 = 0 ;
2793 int res1 = 0 ;
2794 int result;
2795 VALUE vresult = Qnil;
2796
2797 if ((argc < 1) || (argc > 1)) {
2798 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2799 }
2800 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_iterator_s, 0 | 0 );
2801 if (!SWIG_IsOK(res1)) {
2802 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_iterator *","librdf_iterator_next", 1, argv[0] ));
2803 }
2804 arg1 = (librdf_iterator *)(argp1);
2805 result = (int)librdf_iterator_next(arg1);
2806 vresult = SWIG_From_int((int)(result));
2807 return vresult;
2808 fail:
2809 return Qnil;
2810 }
2811
2812
2813 SWIGINTERN VALUE
_wrap_librdf_new_uri(int argc,VALUE * argv,VALUE self)2814 _wrap_librdf_new_uri(int argc, VALUE *argv, VALUE self) {
2815 librdf_world *arg1 = (librdf_world *) 0 ;
2816 char *arg2 = (char *) 0 ;
2817 void *argp1 = 0 ;
2818 int res1 = 0 ;
2819 int res2 ;
2820 char *buf2 = 0 ;
2821 int alloc2 = 0 ;
2822 librdf_uri *result = 0 ;
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_librdf_world_s, 0 | 0 );
2829 if (!SWIG_IsOK(res1)) {
2830 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_uri", 1, argv[0] ));
2831 }
2832 arg1 = (librdf_world *)(argp1);
2833 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2834 if (!SWIG_IsOK(res2)) {
2835 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","librdf_new_uri", 2, argv[1] ));
2836 }
2837 arg2 = (char *)(buf2);
2838 result = (librdf_uri *)librdf_new_uri(arg1,arg2);
2839 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_uri_s, SWIG_POINTER_OWN | 0 );
2840 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2841 return vresult;
2842 fail:
2843 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2844 return Qnil;
2845 }
2846
2847
2848 SWIGINTERN VALUE
_wrap_librdf_new_uri_from_uri(int argc,VALUE * argv,VALUE self)2849 _wrap_librdf_new_uri_from_uri(int argc, VALUE *argv, VALUE self) {
2850 librdf_uri *arg1 = (librdf_uri *) 0 ;
2851 void *argp1 = 0 ;
2852 int res1 = 0 ;
2853 librdf_uri *result = 0 ;
2854 VALUE vresult = Qnil;
2855
2856 if ((argc < 1) || (argc > 1)) {
2857 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2858 }
2859 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
2860 if (!SWIG_IsOK(res1)) {
2861 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_uri *","librdf_new_uri_from_uri", 1, argv[0] ));
2862 }
2863 arg1 = (librdf_uri *)(argp1);
2864 result = (librdf_uri *)librdf_new_uri_from_uri(arg1);
2865 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_uri_s, SWIG_POINTER_OWN | 0 );
2866 return vresult;
2867 fail:
2868 return Qnil;
2869 }
2870
2871
2872 SWIGINTERN VALUE
_wrap_librdf_new_uri_from_filename(int argc,VALUE * argv,VALUE self)2873 _wrap_librdf_new_uri_from_filename(int argc, VALUE *argv, VALUE self) {
2874 librdf_world *arg1 = (librdf_world *) 0 ;
2875 char *arg2 = (char *) 0 ;
2876 void *argp1 = 0 ;
2877 int res1 = 0 ;
2878 int res2 ;
2879 char *buf2 = 0 ;
2880 int alloc2 = 0 ;
2881 librdf_uri *result = 0 ;
2882 VALUE vresult = Qnil;
2883
2884 if ((argc < 2) || (argc > 2)) {
2885 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2886 }
2887 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
2888 if (!SWIG_IsOK(res1)) {
2889 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_uri_from_filename", 1, argv[0] ));
2890 }
2891 arg1 = (librdf_world *)(argp1);
2892 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2893 if (!SWIG_IsOK(res2)) {
2894 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_new_uri_from_filename", 2, argv[1] ));
2895 }
2896 arg2 = (char *)(buf2);
2897 result = (librdf_uri *)librdf_new_uri_from_filename(arg1,(char const *)arg2);
2898 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_uri_s, 0 | 0 );
2899 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2900 return vresult;
2901 fail:
2902 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2903 return Qnil;
2904 }
2905
2906
2907 SWIGINTERN VALUE
_wrap_librdf_free_uri(int argc,VALUE * argv,VALUE self)2908 _wrap_librdf_free_uri(int argc, VALUE *argv, VALUE self) {
2909 librdf_uri *arg1 = (librdf_uri *) 0 ;
2910 void *argp1 = 0 ;
2911 int res1 = 0 ;
2912
2913 if ((argc < 1) || (argc > 1)) {
2914 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2915 }
2916 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
2917 if (!SWIG_IsOK(res1)) {
2918 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_uri *","librdf_free_uri", 1, argv[0] ));
2919 }
2920 arg1 = (librdf_uri *)(argp1);
2921 librdf_free_uri(arg1);
2922 return Qnil;
2923 fail:
2924 return Qnil;
2925 }
2926
2927
2928 SWIGINTERN VALUE
_wrap_librdf_uri_to_string(int argc,VALUE * argv,VALUE self)2929 _wrap_librdf_uri_to_string(int argc, VALUE *argv, VALUE self) {
2930 librdf_uri *arg1 = (librdf_uri *) 0 ;
2931 void *argp1 = 0 ;
2932 int res1 = 0 ;
2933 char *result = 0 ;
2934 VALUE vresult = Qnil;
2935
2936 if ((argc < 1) || (argc > 1)) {
2937 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2938 }
2939 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
2940 if (!SWIG_IsOK(res1)) {
2941 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_uri *","librdf_uri_to_string", 1, argv[0] ));
2942 }
2943 arg1 = (librdf_uri *)(argp1);
2944 result = (char *)librdf_uri_to_string(arg1);
2945 {
2946 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
2947 }
2948 free((char*)result);
2949 return vresult;
2950 fail:
2951 return Qnil;
2952 }
2953
2954
2955 SWIGINTERN VALUE
_wrap_librdf_uri_equals(int argc,VALUE * argv,VALUE self)2956 _wrap_librdf_uri_equals(int argc, VALUE *argv, VALUE self) {
2957 librdf_uri *arg1 = (librdf_uri *) 0 ;
2958 librdf_uri *arg2 = (librdf_uri *) 0 ;
2959 void *argp1 = 0 ;
2960 int res1 = 0 ;
2961 void *argp2 = 0 ;
2962 int res2 = 0 ;
2963 int result;
2964 VALUE vresult = Qnil;
2965
2966 if ((argc < 2) || (argc > 2)) {
2967 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2968 }
2969 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
2970 if (!SWIG_IsOK(res1)) {
2971 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_uri *","librdf_uri_equals", 1, argv[0] ));
2972 }
2973 arg1 = (librdf_uri *)(argp1);
2974 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
2975 if (!SWIG_IsOK(res2)) {
2976 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_uri_equals", 2, argv[1] ));
2977 }
2978 arg2 = (librdf_uri *)(argp2);
2979 result = (int)librdf_uri_equals(arg1,arg2);
2980 vresult = SWIG_From_int((int)(result));
2981 return vresult;
2982 fail:
2983 return Qnil;
2984 }
2985
2986
2987 SWIGINTERN VALUE
_wrap_librdf_uri_compare(int argc,VALUE * argv,VALUE self)2988 _wrap_librdf_uri_compare(int argc, VALUE *argv, VALUE self) {
2989 librdf_uri *arg1 = (librdf_uri *) 0 ;
2990 librdf_uri *arg2 = (librdf_uri *) 0 ;
2991 void *argp1 = 0 ;
2992 int res1 = 0 ;
2993 void *argp2 = 0 ;
2994 int res2 = 0 ;
2995 int result;
2996 VALUE vresult = Qnil;
2997
2998 if ((argc < 2) || (argc > 2)) {
2999 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3000 }
3001 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
3002 if (!SWIG_IsOK(res1)) {
3003 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_uri *","librdf_uri_compare", 1, argv[0] ));
3004 }
3005 arg1 = (librdf_uri *)(argp1);
3006 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
3007 if (!SWIG_IsOK(res2)) {
3008 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_uri_compare", 2, argv[1] ));
3009 }
3010 arg2 = (librdf_uri *)(argp2);
3011 result = (int)librdf_uri_compare(arg1,arg2);
3012 vresult = SWIG_From_int((int)(result));
3013 return vresult;
3014 fail:
3015 return Qnil;
3016 }
3017
3018
3019 SWIGINTERN VALUE
_wrap_librdf_new_node(int argc,VALUE * argv,VALUE self)3020 _wrap_librdf_new_node(int argc, VALUE *argv, VALUE self) {
3021 librdf_world *arg1 = (librdf_world *) 0 ;
3022 void *argp1 = 0 ;
3023 int res1 = 0 ;
3024 librdf_node *result = 0 ;
3025 VALUE vresult = Qnil;
3026
3027 if ((argc < 1) || (argc > 1)) {
3028 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3029 }
3030 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
3031 if (!SWIG_IsOK(res1)) {
3032 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_node", 1, argv[0] ));
3033 }
3034 arg1 = (librdf_world *)(argp1);
3035 result = (librdf_node *)librdf_new_node(arg1);
3036 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
3037 return vresult;
3038 fail:
3039 return Qnil;
3040 }
3041
3042
3043 SWIGINTERN VALUE
_wrap_librdf_new_node_from_uri_string(int argc,VALUE * argv,VALUE self)3044 _wrap_librdf_new_node_from_uri_string(int argc, VALUE *argv, VALUE self) {
3045 librdf_world *arg1 = (librdf_world *) 0 ;
3046 char *arg2 = (char *) 0 ;
3047 void *argp1 = 0 ;
3048 int res1 = 0 ;
3049 int res2 ;
3050 char *buf2 = 0 ;
3051 int alloc2 = 0 ;
3052 librdf_node *result = 0 ;
3053 VALUE vresult = Qnil;
3054
3055 if ((argc < 2) || (argc > 2)) {
3056 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3057 }
3058 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
3059 if (!SWIG_IsOK(res1)) {
3060 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_node_from_uri_string", 1, argv[0] ));
3061 }
3062 arg1 = (librdf_world *)(argp1);
3063 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3064 if (!SWIG_IsOK(res2)) {
3065 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_new_node_from_uri_string", 2, argv[1] ));
3066 }
3067 arg2 = (char *)(buf2);
3068 result = (librdf_node *)librdf_new_node_from_uri_string(arg1,(char const *)arg2);
3069 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
3070 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3071 return vresult;
3072 fail:
3073 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3074 return Qnil;
3075 }
3076
3077
3078 SWIGINTERN VALUE
_wrap_librdf_new_node_from_uri(int argc,VALUE * argv,VALUE self)3079 _wrap_librdf_new_node_from_uri(int argc, VALUE *argv, VALUE self) {
3080 librdf_world *arg1 = (librdf_world *) 0 ;
3081 librdf_uri *arg2 = (librdf_uri *) 0 ;
3082 void *argp1 = 0 ;
3083 int res1 = 0 ;
3084 void *argp2 = 0 ;
3085 int res2 = 0 ;
3086 librdf_node *result = 0 ;
3087 VALUE vresult = Qnil;
3088
3089 if ((argc < 2) || (argc > 2)) {
3090 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3091 }
3092 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
3093 if (!SWIG_IsOK(res1)) {
3094 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_node_from_uri", 1, argv[0] ));
3095 }
3096 arg1 = (librdf_world *)(argp1);
3097 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
3098 if (!SWIG_IsOK(res2)) {
3099 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_new_node_from_uri", 2, argv[1] ));
3100 }
3101 arg2 = (librdf_uri *)(argp2);
3102 result = (librdf_node *)librdf_new_node_from_uri(arg1,arg2);
3103 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
3104 return vresult;
3105 fail:
3106 return Qnil;
3107 }
3108
3109
3110 SWIGINTERN VALUE
_wrap_librdf_new_node_from_uri_local_name(int argc,VALUE * argv,VALUE self)3111 _wrap_librdf_new_node_from_uri_local_name(int argc, VALUE *argv, VALUE self) {
3112 librdf_world *arg1 = (librdf_world *) 0 ;
3113 librdf_uri *arg2 = (librdf_uri *) 0 ;
3114 char *arg3 = (char *) 0 ;
3115 void *argp1 = 0 ;
3116 int res1 = 0 ;
3117 void *argp2 = 0 ;
3118 int res2 = 0 ;
3119 int res3 ;
3120 char *buf3 = 0 ;
3121 int alloc3 = 0 ;
3122 librdf_node *result = 0 ;
3123 VALUE vresult = Qnil;
3124
3125 if ((argc < 3) || (argc > 3)) {
3126 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3127 }
3128 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
3129 if (!SWIG_IsOK(res1)) {
3130 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_node_from_uri_local_name", 1, argv[0] ));
3131 }
3132 arg1 = (librdf_world *)(argp1);
3133 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
3134 if (!SWIG_IsOK(res2)) {
3135 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_new_node_from_uri_local_name", 2, argv[1] ));
3136 }
3137 arg2 = (librdf_uri *)(argp2);
3138 res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
3139 if (!SWIG_IsOK(res3)) {
3140 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","librdf_new_node_from_uri_local_name", 3, argv[2] ));
3141 }
3142 arg3 = (char *)(buf3);
3143 result = (librdf_node *)librdf_new_node_from_uri_local_name(arg1,arg2,(char const *)arg3);
3144 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
3145 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3146 return vresult;
3147 fail:
3148 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3149 return Qnil;
3150 }
3151
3152
3153 SWIGINTERN VALUE
_wrap_librdf_new_node_from_normalised_uri_string(int argc,VALUE * argv,VALUE self)3154 _wrap_librdf_new_node_from_normalised_uri_string(int argc, VALUE *argv, VALUE self) {
3155 librdf_world *arg1 = (librdf_world *) 0 ;
3156 char *arg2 = (char *) 0 ;
3157 librdf_uri *arg3 = (librdf_uri *) 0 ;
3158 librdf_uri *arg4 = (librdf_uri *) 0 ;
3159 void *argp1 = 0 ;
3160 int res1 = 0 ;
3161 int res2 ;
3162 char *buf2 = 0 ;
3163 int alloc2 = 0 ;
3164 void *argp3 = 0 ;
3165 int res3 = 0 ;
3166 void *argp4 = 0 ;
3167 int res4 = 0 ;
3168 librdf_node *result = 0 ;
3169 VALUE vresult = Qnil;
3170
3171 if ((argc < 4) || (argc > 4)) {
3172 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
3173 }
3174 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
3175 if (!SWIG_IsOK(res1)) {
3176 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_node_from_normalised_uri_string", 1, argv[0] ));
3177 }
3178 arg1 = (librdf_world *)(argp1);
3179 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3180 if (!SWIG_IsOK(res2)) {
3181 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_new_node_from_normalised_uri_string", 2, argv[1] ));
3182 }
3183 arg2 = (char *)(buf2);
3184 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
3185 if (!SWIG_IsOK(res3)) {
3186 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_uri *","librdf_new_node_from_normalised_uri_string", 3, argv[2] ));
3187 }
3188 arg3 = (librdf_uri *)(argp3);
3189 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
3190 if (!SWIG_IsOK(res4)) {
3191 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_uri *","librdf_new_node_from_normalised_uri_string", 4, argv[3] ));
3192 }
3193 arg4 = (librdf_uri *)(argp4);
3194 result = (librdf_node *)librdf_new_node_from_normalised_uri_string(arg1,(char const *)arg2,arg3,arg4);
3195 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
3196 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3197 return vresult;
3198 fail:
3199 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3200 return Qnil;
3201 }
3202
3203
3204 SWIGINTERN VALUE
_wrap_librdf_new_node_from_literal(int argc,VALUE * argv,VALUE self)3205 _wrap_librdf_new_node_from_literal(int argc, VALUE *argv, VALUE self) {
3206 librdf_world *arg1 = (librdf_world *) 0 ;
3207 char *arg2 = (char *) 0 ;
3208 char *arg3 = (char *) NULL ;
3209 int arg4 = (int) 0 ;
3210 void *argp1 = 0 ;
3211 int res1 = 0 ;
3212 int res2 ;
3213 char *buf2 = 0 ;
3214 int alloc2 = 0 ;
3215 int val4 ;
3216 int ecode4 = 0 ;
3217 librdf_node *result = 0 ;
3218 VALUE vresult = Qnil;
3219
3220 if ((argc < 2) || (argc > 4)) {
3221 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3222 }
3223 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
3224 if (!SWIG_IsOK(res1)) {
3225 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_node_from_literal", 1, argv[0] ));
3226 }
3227 arg1 = (librdf_world *)(argp1);
3228 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3229 if (!SWIG_IsOK(res2)) {
3230 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_new_node_from_literal", 2, argv[1] ));
3231 }
3232 arg2 = (char *)(buf2);
3233 if (argc > 2) {
3234 {
3235 arg3 = (argv[2] == Qnil) ? NULL : STR2CSTR(argv[2]);
3236 }
3237 }
3238 if (argc > 3) {
3239 ecode4 = SWIG_AsVal_int(argv[3], &val4);
3240 if (!SWIG_IsOK(ecode4)) {
3241 SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","librdf_new_node_from_literal", 4, argv[3] ));
3242 }
3243 arg4 = (int)(val4);
3244 }
3245 result = (librdf_node *)librdf_new_node_from_literal(arg1,(char const *)arg2,(char const *)arg3,arg4);
3246 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
3247 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3248 return vresult;
3249 fail:
3250 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3251 return Qnil;
3252 }
3253
3254
3255 SWIGINTERN VALUE
_wrap_librdf_new_node_from_typed_literal(int argc,VALUE * argv,VALUE self)3256 _wrap_librdf_new_node_from_typed_literal(int argc, VALUE *argv, VALUE self) {
3257 librdf_world *arg1 = (librdf_world *) 0 ;
3258 char *arg2 = (char *) 0 ;
3259 char *arg3 = (char *) NULL ;
3260 librdf_uri *arg4 = (librdf_uri *) NULL ;
3261 void *argp1 = 0 ;
3262 int res1 = 0 ;
3263 int res2 ;
3264 char *buf2 = 0 ;
3265 int alloc2 = 0 ;
3266 void *argp4 = 0 ;
3267 int res4 = 0 ;
3268 librdf_node *result = 0 ;
3269 VALUE vresult = Qnil;
3270
3271 if ((argc < 2) || (argc > 4)) {
3272 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3273 }
3274 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
3275 if (!SWIG_IsOK(res1)) {
3276 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_node_from_typed_literal", 1, argv[0] ));
3277 }
3278 arg1 = (librdf_world *)(argp1);
3279 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3280 if (!SWIG_IsOK(res2)) {
3281 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_new_node_from_typed_literal", 2, argv[1] ));
3282 }
3283 arg2 = (char *)(buf2);
3284 if (argc > 2) {
3285 {
3286 arg3 = (argv[2] == Qnil) ? NULL : STR2CSTR(argv[2]);
3287 }
3288 }
3289 if (argc > 3) {
3290 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
3291 if (!SWIG_IsOK(res4)) {
3292 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_uri *","librdf_new_node_from_typed_literal", 4, argv[3] ));
3293 }
3294 arg4 = (librdf_uri *)(argp4);
3295 }
3296 result = (librdf_node *)librdf_new_node_from_typed_literal(arg1,(char const *)arg2,(char const *)arg3,arg4);
3297 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
3298 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3299 return vresult;
3300 fail:
3301 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3302 return Qnil;
3303 }
3304
3305
3306 SWIGINTERN VALUE
_wrap_librdf_new_node_from_node(int argc,VALUE * argv,VALUE self)3307 _wrap_librdf_new_node_from_node(int argc, VALUE *argv, VALUE self) {
3308 librdf_node *arg1 = (librdf_node *) 0 ;
3309 void *argp1 = 0 ;
3310 int res1 = 0 ;
3311 librdf_node *result = 0 ;
3312 VALUE vresult = Qnil;
3313
3314 if ((argc < 1) || (argc > 1)) {
3315 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3316 }
3317 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3318 if (!SWIG_IsOK(res1)) {
3319 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_new_node_from_node", 1, argv[0] ));
3320 }
3321 arg1 = (librdf_node *)(argp1);
3322 result = (librdf_node *)librdf_new_node_from_node(arg1);
3323 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
3324 return vresult;
3325 fail:
3326 return Qnil;
3327 }
3328
3329
3330 SWIGINTERN VALUE
_wrap_librdf_new_node_from_blank_identifier(int argc,VALUE * argv,VALUE self)3331 _wrap_librdf_new_node_from_blank_identifier(int argc, VALUE *argv, VALUE self) {
3332 librdf_world *arg1 = (librdf_world *) 0 ;
3333 char *arg2 = (char *) NULL ;
3334 void *argp1 = 0 ;
3335 int res1 = 0 ;
3336 librdf_node *result = 0 ;
3337 VALUE vresult = Qnil;
3338
3339 if ((argc < 1) || (argc > 2)) {
3340 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3341 }
3342 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
3343 if (!SWIG_IsOK(res1)) {
3344 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_node_from_blank_identifier", 1, argv[0] ));
3345 }
3346 arg1 = (librdf_world *)(argp1);
3347 if (argc > 1) {
3348 {
3349 arg2 = (argv[1] == Qnil) ? NULL : STR2CSTR(argv[1]);
3350 }
3351 }
3352 result = (librdf_node *)librdf_new_node_from_blank_identifier(arg1,(char const *)arg2);
3353 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
3354 return vresult;
3355 fail:
3356 return Qnil;
3357 }
3358
3359
3360 SWIGINTERN VALUE
_wrap_librdf_free_node(int argc,VALUE * argv,VALUE self)3361 _wrap_librdf_free_node(int argc, VALUE *argv, VALUE self) {
3362 librdf_node *arg1 = (librdf_node *) 0 ;
3363 void *argp1 = 0 ;
3364 int res1 = 0 ;
3365
3366 if ((argc < 1) || (argc > 1)) {
3367 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3368 }
3369 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3370 if (!SWIG_IsOK(res1)) {
3371 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_free_node", 1, argv[0] ));
3372 }
3373 arg1 = (librdf_node *)(argp1);
3374 librdf_free_node(arg1);
3375 return Qnil;
3376 fail:
3377 return Qnil;
3378 }
3379
3380
3381 SWIGINTERN VALUE
_wrap_librdf_node_get_uri(int argc,VALUE * argv,VALUE self)3382 _wrap_librdf_node_get_uri(int argc, VALUE *argv, VALUE self) {
3383 librdf_node *arg1 = (librdf_node *) 0 ;
3384 void *argp1 = 0 ;
3385 int res1 = 0 ;
3386 librdf_uri *result = 0 ;
3387 VALUE vresult = Qnil;
3388
3389 if ((argc < 1) || (argc > 1)) {
3390 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3391 }
3392 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3393 if (!SWIG_IsOK(res1)) {
3394 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_get_uri", 1, argv[0] ));
3395 }
3396 arg1 = (librdf_node *)(argp1);
3397 result = (librdf_uri *)librdf_node_get_uri(arg1);
3398 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_uri_s, 0 | 0 );
3399 return vresult;
3400 fail:
3401 return Qnil;
3402 }
3403
3404
3405 SWIGINTERN VALUE
_wrap_librdf_node_get_type(int argc,VALUE * argv,VALUE self)3406 _wrap_librdf_node_get_type(int argc, VALUE *argv, VALUE self) {
3407 librdf_node *arg1 = (librdf_node *) 0 ;
3408 void *argp1 = 0 ;
3409 int res1 = 0 ;
3410 int result;
3411 VALUE vresult = Qnil;
3412
3413 if ((argc < 1) || (argc > 1)) {
3414 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3415 }
3416 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3417 if (!SWIG_IsOK(res1)) {
3418 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_get_type", 1, argv[0] ));
3419 }
3420 arg1 = (librdf_node *)(argp1);
3421 result = (int)librdf_node_get_type(arg1);
3422 vresult = SWIG_From_int((int)(result));
3423 return vresult;
3424 fail:
3425 return Qnil;
3426 }
3427
3428
3429 SWIGINTERN VALUE
_wrap_librdf_node_get_literal_value(int argc,VALUE * argv,VALUE self)3430 _wrap_librdf_node_get_literal_value(int argc, VALUE *argv, VALUE self) {
3431 librdf_node *arg1 = (librdf_node *) 0 ;
3432 void *argp1 = 0 ;
3433 int res1 = 0 ;
3434 char *result = 0 ;
3435 VALUE vresult = Qnil;
3436
3437 if ((argc < 1) || (argc > 1)) {
3438 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3439 }
3440 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3441 if (!SWIG_IsOK(res1)) {
3442 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_get_literal_value", 1, argv[0] ));
3443 }
3444 arg1 = (librdf_node *)(argp1);
3445 result = (char *)librdf_node_get_literal_value(arg1);
3446 {
3447 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
3448 }
3449 return vresult;
3450 fail:
3451 return Qnil;
3452 }
3453
3454
3455 SWIGINTERN VALUE
_wrap_librdf_node_get_literal_value_as_latin1(int argc,VALUE * argv,VALUE self)3456 _wrap_librdf_node_get_literal_value_as_latin1(int argc, VALUE *argv, VALUE self) {
3457 librdf_node *arg1 = (librdf_node *) 0 ;
3458 void *argp1 = 0 ;
3459 int res1 = 0 ;
3460 char *result = 0 ;
3461 VALUE vresult = Qnil;
3462
3463 if ((argc < 1) || (argc > 1)) {
3464 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3465 }
3466 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3467 if (!SWIG_IsOK(res1)) {
3468 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_get_literal_value_as_latin1", 1, argv[0] ));
3469 }
3470 arg1 = (librdf_node *)(argp1);
3471 result = (char *)librdf_node_get_literal_value_as_latin1(arg1);
3472 {
3473 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
3474 }
3475 return vresult;
3476 fail:
3477 return Qnil;
3478 }
3479
3480
3481 SWIGINTERN VALUE
_wrap_librdf_node_get_literal_value_language(int argc,VALUE * argv,VALUE self)3482 _wrap_librdf_node_get_literal_value_language(int argc, VALUE *argv, VALUE self) {
3483 librdf_node *arg1 = (librdf_node *) 0 ;
3484 void *argp1 = 0 ;
3485 int res1 = 0 ;
3486 char *result = 0 ;
3487 VALUE vresult = Qnil;
3488
3489 if ((argc < 1) || (argc > 1)) {
3490 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3491 }
3492 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3493 if (!SWIG_IsOK(res1)) {
3494 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_get_literal_value_language", 1, argv[0] ));
3495 }
3496 arg1 = (librdf_node *)(argp1);
3497 result = (char *)librdf_node_get_literal_value_language(arg1);
3498 {
3499 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
3500 }
3501 return vresult;
3502 fail:
3503 return Qnil;
3504 }
3505
3506
3507 SWIGINTERN VALUE
_wrap_librdf_node_get_literal_value_datatype_uri(int argc,VALUE * argv,VALUE self)3508 _wrap_librdf_node_get_literal_value_datatype_uri(int argc, VALUE *argv, VALUE self) {
3509 librdf_node *arg1 = (librdf_node *) 0 ;
3510 void *argp1 = 0 ;
3511 int res1 = 0 ;
3512 librdf_uri *result = 0 ;
3513 VALUE vresult = Qnil;
3514
3515 if ((argc < 1) || (argc > 1)) {
3516 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3517 }
3518 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3519 if (!SWIG_IsOK(res1)) {
3520 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_get_literal_value_datatype_uri", 1, argv[0] ));
3521 }
3522 arg1 = (librdf_node *)(argp1);
3523 result = (librdf_uri *)librdf_node_get_literal_value_datatype_uri(arg1);
3524 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_uri_s, 0 | 0 );
3525 return vresult;
3526 fail:
3527 return Qnil;
3528 }
3529
3530
3531 SWIGINTERN VALUE
_wrap_librdf_node_get_literal_value_is_wf_xml(int argc,VALUE * argv,VALUE self)3532 _wrap_librdf_node_get_literal_value_is_wf_xml(int argc, VALUE *argv, VALUE self) {
3533 librdf_node *arg1 = (librdf_node *) 0 ;
3534 void *argp1 = 0 ;
3535 int res1 = 0 ;
3536 int result;
3537 VALUE vresult = Qnil;
3538
3539 if ((argc < 1) || (argc > 1)) {
3540 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3541 }
3542 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3543 if (!SWIG_IsOK(res1)) {
3544 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_get_literal_value_is_wf_xml", 1, argv[0] ));
3545 }
3546 arg1 = (librdf_node *)(argp1);
3547 result = (int)librdf_node_get_literal_value_is_wf_xml(arg1);
3548 vresult = SWIG_From_int((int)(result));
3549 return vresult;
3550 fail:
3551 return Qnil;
3552 }
3553
3554
3555 SWIGINTERN VALUE
_wrap_librdf_node_get_li_ordinal(int argc,VALUE * argv,VALUE self)3556 _wrap_librdf_node_get_li_ordinal(int argc, VALUE *argv, VALUE self) {
3557 librdf_node *arg1 = (librdf_node *) 0 ;
3558 void *argp1 = 0 ;
3559 int res1 = 0 ;
3560 int result;
3561 VALUE vresult = Qnil;
3562
3563 if ((argc < 1) || (argc > 1)) {
3564 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3565 }
3566 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3567 if (!SWIG_IsOK(res1)) {
3568 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_get_li_ordinal", 1, argv[0] ));
3569 }
3570 arg1 = (librdf_node *)(argp1);
3571 result = (int)librdf_node_get_li_ordinal(arg1);
3572 vresult = SWIG_From_int((int)(result));
3573 return vresult;
3574 fail:
3575 return Qnil;
3576 }
3577
3578
3579 SWIGINTERN VALUE
_wrap_librdf_node_to_string(int argc,VALUE * argv,VALUE self)3580 _wrap_librdf_node_to_string(int argc, VALUE *argv, VALUE self) {
3581 librdf_node *arg1 = (librdf_node *) 0 ;
3582 void *argp1 = 0 ;
3583 int res1 = 0 ;
3584 char *result = 0 ;
3585 VALUE vresult = Qnil;
3586
3587 if ((argc < 1) || (argc > 1)) {
3588 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3589 }
3590 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3591 if (!SWIG_IsOK(res1)) {
3592 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_to_string", 1, argv[0] ));
3593 }
3594 arg1 = (librdf_node *)(argp1);
3595 result = (char *)librdf_node_to_string(arg1);
3596 {
3597 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
3598 }
3599 free((char*)result);
3600 return vresult;
3601 fail:
3602 return Qnil;
3603 }
3604
3605
3606 SWIGINTERN VALUE
_wrap_librdf_node_get_blank_identifier(int argc,VALUE * argv,VALUE self)3607 _wrap_librdf_node_get_blank_identifier(int argc, VALUE *argv, VALUE self) {
3608 librdf_node *arg1 = (librdf_node *) 0 ;
3609 void *argp1 = 0 ;
3610 int res1 = 0 ;
3611 char *result = 0 ;
3612 VALUE vresult = Qnil;
3613
3614 if ((argc < 1) || (argc > 1)) {
3615 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3616 }
3617 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3618 if (!SWIG_IsOK(res1)) {
3619 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_get_blank_identifier", 1, argv[0] ));
3620 }
3621 arg1 = (librdf_node *)(argp1);
3622 result = (char *)librdf_node_get_blank_identifier(arg1);
3623 {
3624 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
3625 }
3626 return vresult;
3627 fail:
3628 return Qnil;
3629 }
3630
3631
3632 SWIGINTERN VALUE
_wrap_librdf_node_is_resource(int argc,VALUE * argv,VALUE self)3633 _wrap_librdf_node_is_resource(int argc, VALUE *argv, VALUE self) {
3634 librdf_node *arg1 = (librdf_node *) 0 ;
3635 void *argp1 = 0 ;
3636 int res1 = 0 ;
3637 int result;
3638 VALUE vresult = Qnil;
3639
3640 if ((argc < 1) || (argc > 1)) {
3641 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3642 }
3643 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3644 if (!SWIG_IsOK(res1)) {
3645 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_is_resource", 1, argv[0] ));
3646 }
3647 arg1 = (librdf_node *)(argp1);
3648 result = (int)librdf_node_is_resource(arg1);
3649 vresult = SWIG_From_int((int)(result));
3650 return vresult;
3651 fail:
3652 return Qnil;
3653 }
3654
3655
3656 SWIGINTERN VALUE
_wrap_librdf_node_is_literal(int argc,VALUE * argv,VALUE self)3657 _wrap_librdf_node_is_literal(int argc, VALUE *argv, VALUE self) {
3658 librdf_node *arg1 = (librdf_node *) 0 ;
3659 void *argp1 = 0 ;
3660 int res1 = 0 ;
3661 int result;
3662 VALUE vresult = Qnil;
3663
3664 if ((argc < 1) || (argc > 1)) {
3665 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3666 }
3667 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3668 if (!SWIG_IsOK(res1)) {
3669 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_is_literal", 1, argv[0] ));
3670 }
3671 arg1 = (librdf_node *)(argp1);
3672 result = (int)librdf_node_is_literal(arg1);
3673 vresult = SWIG_From_int((int)(result));
3674 return vresult;
3675 fail:
3676 return Qnil;
3677 }
3678
3679
3680 SWIGINTERN VALUE
_wrap_librdf_node_is_blank(int argc,VALUE * argv,VALUE self)3681 _wrap_librdf_node_is_blank(int argc, VALUE *argv, VALUE self) {
3682 librdf_node *arg1 = (librdf_node *) 0 ;
3683 void *argp1 = 0 ;
3684 int res1 = 0 ;
3685 int result;
3686 VALUE vresult = Qnil;
3687
3688 if ((argc < 1) || (argc > 1)) {
3689 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3690 }
3691 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3692 if (!SWIG_IsOK(res1)) {
3693 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_is_blank", 1, argv[0] ));
3694 }
3695 arg1 = (librdf_node *)(argp1);
3696 result = (int)librdf_node_is_blank(arg1);
3697 vresult = SWIG_From_int((int)(result));
3698 return vresult;
3699 fail:
3700 return Qnil;
3701 }
3702
3703
3704 SWIGINTERN VALUE
_wrap_librdf_node_equals(int argc,VALUE * argv,VALUE self)3705 _wrap_librdf_node_equals(int argc, VALUE *argv, VALUE self) {
3706 librdf_node *arg1 = (librdf_node *) 0 ;
3707 librdf_node *arg2 = (librdf_node *) 0 ;
3708 void *argp1 = 0 ;
3709 int res1 = 0 ;
3710 void *argp2 = 0 ;
3711 int res2 = 0 ;
3712 int result;
3713 VALUE vresult = Qnil;
3714
3715 if ((argc < 2) || (argc > 2)) {
3716 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3717 }
3718 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3719 if (!SWIG_IsOK(res1)) {
3720 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_equals", 1, argv[0] ));
3721 }
3722 arg1 = (librdf_node *)(argp1);
3723 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3724 if (!SWIG_IsOK(res2)) {
3725 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_node_equals", 2, argv[1] ));
3726 }
3727 arg2 = (librdf_node *)(argp2);
3728 result = (int)librdf_node_equals(arg1,arg2);
3729 vresult = SWIG_From_int((int)(result));
3730 return vresult;
3731 fail:
3732 return Qnil;
3733 }
3734
3735
3736 SWIGINTERN VALUE
_wrap_librdf_new_statement(int argc,VALUE * argv,VALUE self)3737 _wrap_librdf_new_statement(int argc, VALUE *argv, VALUE self) {
3738 librdf_world *arg1 = (librdf_world *) 0 ;
3739 void *argp1 = 0 ;
3740 int res1 = 0 ;
3741 librdf_statement *result = 0 ;
3742 VALUE vresult = Qnil;
3743
3744 if ((argc < 1) || (argc > 1)) {
3745 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3746 }
3747 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
3748 if (!SWIG_IsOK(res1)) {
3749 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_statement", 1, argv[0] ));
3750 }
3751 arg1 = (librdf_world *)(argp1);
3752 result = (librdf_statement *)librdf_new_statement(arg1);
3753 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_statement_s, SWIG_POINTER_OWN | 0 );
3754 return vresult;
3755 fail:
3756 return Qnil;
3757 }
3758
3759
3760 SWIGINTERN VALUE
_wrap_librdf_new_statement_from_statement(int argc,VALUE * argv,VALUE self)3761 _wrap_librdf_new_statement_from_statement(int argc, VALUE *argv, VALUE self) {
3762 librdf_statement *arg1 = (librdf_statement *) 0 ;
3763 void *argp1 = 0 ;
3764 int res1 = 0 ;
3765 librdf_statement *result = 0 ;
3766 VALUE vresult = Qnil;
3767
3768 if ((argc < 1) || (argc > 1)) {
3769 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3770 }
3771 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
3772 if (!SWIG_IsOK(res1)) {
3773 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_statement *","librdf_new_statement_from_statement", 1, argv[0] ));
3774 }
3775 arg1 = (librdf_statement *)(argp1);
3776 result = (librdf_statement *)librdf_new_statement_from_statement(arg1);
3777 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_statement_s, SWIG_POINTER_OWN | 0 );
3778 return vresult;
3779 fail:
3780 return Qnil;
3781 }
3782
3783
3784 SWIGINTERN VALUE
_wrap_librdf_new_statement_from_nodes(int argc,VALUE * argv,VALUE self)3785 _wrap_librdf_new_statement_from_nodes(int argc, VALUE *argv, VALUE self) {
3786 librdf_world *arg1 = (librdf_world *) 0 ;
3787 librdf_node *arg2 = (librdf_node *) 0 ;
3788 librdf_node *arg3 = (librdf_node *) 0 ;
3789 librdf_node *arg4 = (librdf_node *) 0 ;
3790 void *argp1 = 0 ;
3791 int res1 = 0 ;
3792 void *argp2 = 0 ;
3793 int res2 = 0 ;
3794 void *argp3 = 0 ;
3795 int res3 = 0 ;
3796 void *argp4 = 0 ;
3797 int res4 = 0 ;
3798 librdf_statement *result = 0 ;
3799 VALUE vresult = Qnil;
3800
3801 if ((argc < 4) || (argc > 4)) {
3802 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
3803 }
3804 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
3805 if (!SWIG_IsOK(res1)) {
3806 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_statement_from_nodes", 1, argv[0] ));
3807 }
3808 arg1 = (librdf_world *)(argp1);
3809 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3810 if (!SWIG_IsOK(res2)) {
3811 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_new_statement_from_nodes", 2, argv[1] ));
3812 }
3813 arg2 = (librdf_node *)(argp2);
3814 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3815 if (!SWIG_IsOK(res3)) {
3816 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_new_statement_from_nodes", 3, argv[2] ));
3817 }
3818 arg3 = (librdf_node *)(argp3);
3819 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3820 if (!SWIG_IsOK(res4)) {
3821 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_node *","librdf_new_statement_from_nodes", 4, argv[3] ));
3822 }
3823 arg4 = (librdf_node *)(argp4);
3824 result = (librdf_statement *)librdf_new_statement_from_nodes(arg1,arg2,arg3,arg4);
3825 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_statement_s, SWIG_POINTER_OWN | 0 );
3826 return vresult;
3827 fail:
3828 return Qnil;
3829 }
3830
3831
3832 SWIGINTERN VALUE
_wrap_librdf_free_statement(int argc,VALUE * argv,VALUE self)3833 _wrap_librdf_free_statement(int argc, VALUE *argv, VALUE self) {
3834 librdf_statement *arg1 = (librdf_statement *) 0 ;
3835 void *argp1 = 0 ;
3836 int res1 = 0 ;
3837
3838 if ((argc < 1) || (argc > 1)) {
3839 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3840 }
3841 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
3842 if (!SWIG_IsOK(res1)) {
3843 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_statement *","librdf_free_statement", 1, argv[0] ));
3844 }
3845 arg1 = (librdf_statement *)(argp1);
3846 librdf_free_statement(arg1);
3847 return Qnil;
3848 fail:
3849 return Qnil;
3850 }
3851
3852
3853 SWIGINTERN VALUE
_wrap_librdf_statement_get_subject(int argc,VALUE * argv,VALUE self)3854 _wrap_librdf_statement_get_subject(int argc, VALUE *argv, VALUE self) {
3855 librdf_statement *arg1 = (librdf_statement *) 0 ;
3856 void *argp1 = 0 ;
3857 int res1 = 0 ;
3858 librdf_node *result = 0 ;
3859 VALUE vresult = Qnil;
3860
3861 if ((argc < 1) || (argc > 1)) {
3862 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3863 }
3864 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
3865 if (!SWIG_IsOK(res1)) {
3866 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_statement *","librdf_statement_get_subject", 1, argv[0] ));
3867 }
3868 arg1 = (librdf_statement *)(argp1);
3869 result = (librdf_node *)librdf_statement_get_subject(arg1);
3870 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, 0 | 0 );
3871 return vresult;
3872 fail:
3873 return Qnil;
3874 }
3875
3876
3877 SWIGINTERN VALUE
_wrap_librdf_statement_set_subject(int argc,VALUE * argv,VALUE self)3878 _wrap_librdf_statement_set_subject(int argc, VALUE *argv, VALUE self) {
3879 librdf_statement *arg1 = (librdf_statement *) 0 ;
3880 librdf_node *arg2 = (librdf_node *) 0 ;
3881 void *argp1 = 0 ;
3882 int res1 = 0 ;
3883 void *argp2 = 0 ;
3884 int res2 = 0 ;
3885
3886 if ((argc < 2) || (argc > 2)) {
3887 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3888 }
3889 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
3890 if (!SWIG_IsOK(res1)) {
3891 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_statement *","librdf_statement_set_subject", 1, argv[0] ));
3892 }
3893 arg1 = (librdf_statement *)(argp1);
3894 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3895 if (!SWIG_IsOK(res2)) {
3896 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_statement_set_subject", 2, argv[1] ));
3897 }
3898 arg2 = (librdf_node *)(argp2);
3899 librdf_statement_set_subject(arg1,arg2);
3900 return Qnil;
3901 fail:
3902 return Qnil;
3903 }
3904
3905
3906 SWIGINTERN VALUE
_wrap_librdf_statement_get_predicate(int argc,VALUE * argv,VALUE self)3907 _wrap_librdf_statement_get_predicate(int argc, VALUE *argv, VALUE self) {
3908 librdf_statement *arg1 = (librdf_statement *) 0 ;
3909 void *argp1 = 0 ;
3910 int res1 = 0 ;
3911 librdf_node *result = 0 ;
3912 VALUE vresult = Qnil;
3913
3914 if ((argc < 1) || (argc > 1)) {
3915 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3916 }
3917 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
3918 if (!SWIG_IsOK(res1)) {
3919 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_statement *","librdf_statement_get_predicate", 1, argv[0] ));
3920 }
3921 arg1 = (librdf_statement *)(argp1);
3922 result = (librdf_node *)librdf_statement_get_predicate(arg1);
3923 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, 0 | 0 );
3924 return vresult;
3925 fail:
3926 return Qnil;
3927 }
3928
3929
3930 SWIGINTERN VALUE
_wrap_librdf_statement_set_predicate(int argc,VALUE * argv,VALUE self)3931 _wrap_librdf_statement_set_predicate(int argc, VALUE *argv, VALUE self) {
3932 librdf_statement *arg1 = (librdf_statement *) 0 ;
3933 librdf_node *arg2 = (librdf_node *) 0 ;
3934 void *argp1 = 0 ;
3935 int res1 = 0 ;
3936 void *argp2 = 0 ;
3937 int res2 = 0 ;
3938
3939 if ((argc < 2) || (argc > 2)) {
3940 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3941 }
3942 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
3943 if (!SWIG_IsOK(res1)) {
3944 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_statement *","librdf_statement_set_predicate", 1, argv[0] ));
3945 }
3946 arg1 = (librdf_statement *)(argp1);
3947 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
3948 if (!SWIG_IsOK(res2)) {
3949 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_statement_set_predicate", 2, argv[1] ));
3950 }
3951 arg2 = (librdf_node *)(argp2);
3952 librdf_statement_set_predicate(arg1,arg2);
3953 return Qnil;
3954 fail:
3955 return Qnil;
3956 }
3957
3958
3959 SWIGINTERN VALUE
_wrap_librdf_statement_get_object(int argc,VALUE * argv,VALUE self)3960 _wrap_librdf_statement_get_object(int argc, VALUE *argv, VALUE self) {
3961 librdf_statement *arg1 = (librdf_statement *) 0 ;
3962 void *argp1 = 0 ;
3963 int res1 = 0 ;
3964 librdf_node *result = 0 ;
3965 VALUE vresult = Qnil;
3966
3967 if ((argc < 1) || (argc > 1)) {
3968 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3969 }
3970 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
3971 if (!SWIG_IsOK(res1)) {
3972 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_statement *","librdf_statement_get_object", 1, argv[0] ));
3973 }
3974 arg1 = (librdf_statement *)(argp1);
3975 result = (librdf_node *)librdf_statement_get_object(arg1);
3976 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, 0 | 0 );
3977 return vresult;
3978 fail:
3979 return Qnil;
3980 }
3981
3982
3983 SWIGINTERN VALUE
_wrap_librdf_statement_set_object(int argc,VALUE * argv,VALUE self)3984 _wrap_librdf_statement_set_object(int argc, VALUE *argv, VALUE self) {
3985 librdf_statement *arg1 = (librdf_statement *) 0 ;
3986 librdf_node *arg2 = (librdf_node *) 0 ;
3987 void *argp1 = 0 ;
3988 int res1 = 0 ;
3989 void *argp2 = 0 ;
3990 int res2 = 0 ;
3991
3992 if ((argc < 2) || (argc > 2)) {
3993 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3994 }
3995 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
3996 if (!SWIG_IsOK(res1)) {
3997 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_statement *","librdf_statement_set_object", 1, argv[0] ));
3998 }
3999 arg1 = (librdf_statement *)(argp1);
4000 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4001 if (!SWIG_IsOK(res2)) {
4002 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_statement_set_object", 2, argv[1] ));
4003 }
4004 arg2 = (librdf_node *)(argp2);
4005 librdf_statement_set_object(arg1,arg2);
4006 return Qnil;
4007 fail:
4008 return Qnil;
4009 }
4010
4011
4012 SWIGINTERN VALUE
_wrap_librdf_statement_equals(int argc,VALUE * argv,VALUE self)4013 _wrap_librdf_statement_equals(int argc, VALUE *argv, VALUE self) {
4014 librdf_statement *arg1 = (librdf_statement *) 0 ;
4015 librdf_statement *arg2 = (librdf_statement *) 0 ;
4016 void *argp1 = 0 ;
4017 int res1 = 0 ;
4018 void *argp2 = 0 ;
4019 int res2 = 0 ;
4020 int result;
4021 VALUE vresult = Qnil;
4022
4023 if ((argc < 2) || (argc > 2)) {
4024 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4025 }
4026 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
4027 if (!SWIG_IsOK(res1)) {
4028 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_statement *","librdf_statement_equals", 1, argv[0] ));
4029 }
4030 arg1 = (librdf_statement *)(argp1);
4031 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
4032 if (!SWIG_IsOK(res2)) {
4033 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_statement *","librdf_statement_equals", 2, argv[1] ));
4034 }
4035 arg2 = (librdf_statement *)(argp2);
4036 result = (int)librdf_statement_equals(arg1,arg2);
4037 vresult = SWIG_From_int((int)(result));
4038 return vresult;
4039 fail:
4040 return Qnil;
4041 }
4042
4043
4044 SWIGINTERN VALUE
_wrap_librdf_statement_match(int argc,VALUE * argv,VALUE self)4045 _wrap_librdf_statement_match(int argc, VALUE *argv, VALUE self) {
4046 librdf_statement *arg1 = (librdf_statement *) 0 ;
4047 librdf_statement *arg2 = (librdf_statement *) 0 ;
4048 void *argp1 = 0 ;
4049 int res1 = 0 ;
4050 void *argp2 = 0 ;
4051 int res2 = 0 ;
4052 int result;
4053 VALUE vresult = Qnil;
4054
4055 if ((argc < 2) || (argc > 2)) {
4056 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4057 }
4058 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
4059 if (!SWIG_IsOK(res1)) {
4060 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_statement *","librdf_statement_match", 1, argv[0] ));
4061 }
4062 arg1 = (librdf_statement *)(argp1);
4063 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
4064 if (!SWIG_IsOK(res2)) {
4065 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_statement *","librdf_statement_match", 2, argv[1] ));
4066 }
4067 arg2 = (librdf_statement *)(argp2);
4068 result = (int)librdf_statement_match(arg1,arg2);
4069 vresult = SWIG_From_int((int)(result));
4070 return vresult;
4071 fail:
4072 return Qnil;
4073 }
4074
4075
4076 SWIGINTERN VALUE
_wrap_librdf_statement_to_string(int argc,VALUE * argv,VALUE self)4077 _wrap_librdf_statement_to_string(int argc, VALUE *argv, VALUE self) {
4078 librdf_statement *arg1 = (librdf_statement *) 0 ;
4079 void *argp1 = 0 ;
4080 int res1 = 0 ;
4081 char *result = 0 ;
4082 VALUE vresult = Qnil;
4083
4084 if ((argc < 1) || (argc > 1)) {
4085 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4086 }
4087 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
4088 if (!SWIG_IsOK(res1)) {
4089 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_statement *","librdf_statement_to_string", 1, argv[0] ));
4090 }
4091 arg1 = (librdf_statement *)(argp1);
4092 result = (char *)librdf_statement_to_string(arg1);
4093 {
4094 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
4095 }
4096 free((char*)result);
4097 return vresult;
4098 fail:
4099 return Qnil;
4100 }
4101
4102
4103 SWIGINTERN VALUE
_wrap_librdf_statement_is_complete(int argc,VALUE * argv,VALUE self)4104 _wrap_librdf_statement_is_complete(int argc, VALUE *argv, VALUE self) {
4105 librdf_statement *arg1 = (librdf_statement *) 0 ;
4106 void *argp1 = 0 ;
4107 int res1 = 0 ;
4108 int result;
4109 VALUE vresult = Qnil;
4110
4111 if ((argc < 1) || (argc > 1)) {
4112 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4113 }
4114 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
4115 if (!SWIG_IsOK(res1)) {
4116 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_statement *","librdf_statement_is_complete", 1, argv[0] ));
4117 }
4118 arg1 = (librdf_statement *)(argp1);
4119 result = (int)librdf_statement_is_complete(arg1);
4120 vresult = SWIG_From_int((int)(result));
4121 return vresult;
4122 fail:
4123 return Qnil;
4124 }
4125
4126
4127 SWIGINTERN VALUE
_wrap_librdf_new_model(int argc,VALUE * argv,VALUE self)4128 _wrap_librdf_new_model(int argc, VALUE *argv, VALUE self) {
4129 librdf_world *arg1 = (librdf_world *) 0 ;
4130 librdf_storage *arg2 = (librdf_storage *) 0 ;
4131 char *arg3 = (char *) 0 ;
4132 void *argp1 = 0 ;
4133 int res1 = 0 ;
4134 void *argp2 = 0 ;
4135 int res2 = 0 ;
4136 int res3 ;
4137 char *buf3 = 0 ;
4138 int alloc3 = 0 ;
4139 librdf_model *result = 0 ;
4140 VALUE vresult = Qnil;
4141
4142 if ((argc < 3) || (argc > 3)) {
4143 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
4144 }
4145 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
4146 if (!SWIG_IsOK(res1)) {
4147 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_model", 1, argv[0] ));
4148 }
4149 arg1 = (librdf_world *)(argp1);
4150 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_storage_s, 0 | 0 );
4151 if (!SWIG_IsOK(res2)) {
4152 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_storage *","librdf_new_model", 2, argv[1] ));
4153 }
4154 arg2 = (librdf_storage *)(argp2);
4155 res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
4156 if (!SWIG_IsOK(res3)) {
4157 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char *","librdf_new_model", 3, argv[2] ));
4158 }
4159 arg3 = (char *)(buf3);
4160 result = (librdf_model *)librdf_new_model(arg1,arg2,arg3);
4161 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_model_s, SWIG_POINTER_OWN | 0 );
4162 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4163 return vresult;
4164 fail:
4165 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4166 return Qnil;
4167 }
4168
4169
4170 SWIGINTERN VALUE
_wrap_librdf_new_model_with_options(int argc,VALUE * argv,VALUE self)4171 _wrap_librdf_new_model_with_options(int argc, VALUE *argv, VALUE self) {
4172 librdf_world *arg1 = (librdf_world *) 0 ;
4173 librdf_storage *arg2 = (librdf_storage *) 0 ;
4174 librdf_hash *arg3 = (librdf_hash *) 0 ;
4175 void *argp1 = 0 ;
4176 int res1 = 0 ;
4177 void *argp2 = 0 ;
4178 int res2 = 0 ;
4179 void *argp3 = 0 ;
4180 int res3 = 0 ;
4181 librdf_model *result = 0 ;
4182 VALUE vresult = Qnil;
4183
4184 if ((argc < 3) || (argc > 3)) {
4185 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
4186 }
4187 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
4188 if (!SWIG_IsOK(res1)) {
4189 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_model_with_options", 1, argv[0] ));
4190 }
4191 arg1 = (librdf_world *)(argp1);
4192 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_storage_s, 0 | 0 );
4193 if (!SWIG_IsOK(res2)) {
4194 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_storage *","librdf_new_model_with_options", 2, argv[1] ));
4195 }
4196 arg2 = (librdf_storage *)(argp2);
4197 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_hash_s, 0 | 0 );
4198 if (!SWIG_IsOK(res3)) {
4199 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_hash *","librdf_new_model_with_options", 3, argv[2] ));
4200 }
4201 arg3 = (librdf_hash *)(argp3);
4202 result = (librdf_model *)librdf_new_model_with_options(arg1,arg2,arg3);
4203 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_model_s, SWIG_POINTER_OWN | 0 );
4204 return vresult;
4205 fail:
4206 return Qnil;
4207 }
4208
4209
4210 SWIGINTERN VALUE
_wrap_librdf_new_model_from_model(int argc,VALUE * argv,VALUE self)4211 _wrap_librdf_new_model_from_model(int argc, VALUE *argv, VALUE self) {
4212 librdf_model *arg1 = (librdf_model *) 0 ;
4213 void *argp1 = 0 ;
4214 int res1 = 0 ;
4215 librdf_model *result = 0 ;
4216 VALUE vresult = Qnil;
4217
4218 if ((argc < 1) || (argc > 1)) {
4219 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4220 }
4221 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4222 if (!SWIG_IsOK(res1)) {
4223 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_new_model_from_model", 1, argv[0] ));
4224 }
4225 arg1 = (librdf_model *)(argp1);
4226 result = (librdf_model *)librdf_new_model_from_model(arg1);
4227 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_model_s, SWIG_POINTER_OWN | 0 );
4228 return vresult;
4229 fail:
4230 return Qnil;
4231 }
4232
4233
4234 SWIGINTERN VALUE
_wrap_librdf_free_model(int argc,VALUE * argv,VALUE self)4235 _wrap_librdf_free_model(int argc, VALUE *argv, VALUE self) {
4236 librdf_model *arg1 = (librdf_model *) 0 ;
4237 void *argp1 = 0 ;
4238 int res1 = 0 ;
4239
4240 if ((argc < 1) || (argc > 1)) {
4241 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4242 }
4243 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4244 if (!SWIG_IsOK(res1)) {
4245 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_free_model", 1, argv[0] ));
4246 }
4247 arg1 = (librdf_model *)(argp1);
4248 librdf_free_model(arg1);
4249 return Qnil;
4250 fail:
4251 return Qnil;
4252 }
4253
4254
4255 SWIGINTERN VALUE
_wrap_librdf_model_size(int argc,VALUE * argv,VALUE self)4256 _wrap_librdf_model_size(int argc, VALUE *argv, VALUE self) {
4257 librdf_model *arg1 = (librdf_model *) 0 ;
4258 void *argp1 = 0 ;
4259 int res1 = 0 ;
4260 int result;
4261 VALUE vresult = Qnil;
4262
4263 if ((argc < 1) || (argc > 1)) {
4264 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4265 }
4266 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4267 if (!SWIG_IsOK(res1)) {
4268 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_size", 1, argv[0] ));
4269 }
4270 arg1 = (librdf_model *)(argp1);
4271 result = (int)librdf_model_size(arg1);
4272 vresult = SWIG_From_int((int)(result));
4273 return vresult;
4274 fail:
4275 return Qnil;
4276 }
4277
4278
4279 SWIGINTERN VALUE
_wrap_librdf_model_add(int argc,VALUE * argv,VALUE self)4280 _wrap_librdf_model_add(int argc, VALUE *argv, VALUE self) {
4281 librdf_model *arg1 = (librdf_model *) 0 ;
4282 librdf_node *arg2 = (librdf_node *) 0 ;
4283 librdf_node *arg3 = (librdf_node *) 0 ;
4284 librdf_node *arg4 = (librdf_node *) 0 ;
4285 void *argp1 = 0 ;
4286 int res1 = 0 ;
4287 void *argp2 = 0 ;
4288 int res2 = 0 ;
4289 void *argp3 = 0 ;
4290 int res3 = 0 ;
4291 void *argp4 = 0 ;
4292 int res4 = 0 ;
4293 int result;
4294 VALUE vresult = Qnil;
4295
4296 if ((argc < 4) || (argc > 4)) {
4297 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
4298 }
4299 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4300 if (!SWIG_IsOK(res1)) {
4301 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_add", 1, argv[0] ));
4302 }
4303 arg1 = (librdf_model *)(argp1);
4304 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4305 if (!SWIG_IsOK(res2)) {
4306 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_add", 2, argv[1] ));
4307 }
4308 arg2 = (librdf_node *)(argp2);
4309 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4310 if (!SWIG_IsOK(res3)) {
4311 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_add", 3, argv[2] ));
4312 }
4313 arg3 = (librdf_node *)(argp3);
4314 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4315 if (!SWIG_IsOK(res4)) {
4316 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_add", 4, argv[3] ));
4317 }
4318 arg4 = (librdf_node *)(argp4);
4319 result = (int)librdf_model_add(arg1,arg2,arg3,arg4);
4320 vresult = SWIG_From_int((int)(result));
4321 return vresult;
4322 fail:
4323 return Qnil;
4324 }
4325
4326
4327 SWIGINTERN VALUE
_wrap_librdf_model_add_string_literal_statement(int argc,VALUE * argv,VALUE self)4328 _wrap_librdf_model_add_string_literal_statement(int argc, VALUE *argv, VALUE self) {
4329 librdf_model *arg1 = (librdf_model *) 0 ;
4330 librdf_node *arg2 = (librdf_node *) 0 ;
4331 librdf_node *arg3 = (librdf_node *) 0 ;
4332 char *arg4 = (char *) 0 ;
4333 char *arg5 = (char *) NULL ;
4334 int arg6 = (int) 0 ;
4335 void *argp1 = 0 ;
4336 int res1 = 0 ;
4337 void *argp2 = 0 ;
4338 int res2 = 0 ;
4339 void *argp3 = 0 ;
4340 int res3 = 0 ;
4341 int res4 ;
4342 char *buf4 = 0 ;
4343 int alloc4 = 0 ;
4344 int val6 ;
4345 int ecode6 = 0 ;
4346 int result;
4347 VALUE vresult = Qnil;
4348
4349 if ((argc < 4) || (argc > 6)) {
4350 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
4351 }
4352 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4353 if (!SWIG_IsOK(res1)) {
4354 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_add_string_literal_statement", 1, argv[0] ));
4355 }
4356 arg1 = (librdf_model *)(argp1);
4357 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4358 if (!SWIG_IsOK(res2)) {
4359 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_add_string_literal_statement", 2, argv[1] ));
4360 }
4361 arg2 = (librdf_node *)(argp2);
4362 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4363 if (!SWIG_IsOK(res3)) {
4364 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_add_string_literal_statement", 3, argv[2] ));
4365 }
4366 arg3 = (librdf_node *)(argp3);
4367 res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
4368 if (!SWIG_IsOK(res4)) {
4369 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","librdf_model_add_string_literal_statement", 4, argv[3] ));
4370 }
4371 arg4 = (char *)(buf4);
4372 if (argc > 4) {
4373 {
4374 arg5 = (argv[4] == Qnil) ? NULL : STR2CSTR(argv[4]);
4375 }
4376 }
4377 if (argc > 5) {
4378 ecode6 = SWIG_AsVal_int(argv[5], &val6);
4379 if (!SWIG_IsOK(ecode6)) {
4380 SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "int","librdf_model_add_string_literal_statement", 6, argv[5] ));
4381 }
4382 arg6 = (int)(val6);
4383 }
4384 result = (int)librdf_model_add_string_literal_statement(arg1,arg2,arg3,(char const *)arg4,(char const *)arg5,arg6);
4385 vresult = SWIG_From_int((int)(result));
4386 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
4387 return vresult;
4388 fail:
4389 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
4390 return Qnil;
4391 }
4392
4393
4394 SWIGINTERN VALUE
_wrap_librdf_model_add_typed_literal_statement(int argc,VALUE * argv,VALUE self)4395 _wrap_librdf_model_add_typed_literal_statement(int argc, VALUE *argv, VALUE self) {
4396 librdf_model *arg1 = (librdf_model *) 0 ;
4397 librdf_node *arg2 = (librdf_node *) 0 ;
4398 librdf_node *arg3 = (librdf_node *) 0 ;
4399 char *arg4 = (char *) 0 ;
4400 char *arg5 = (char *) 0 ;
4401 librdf_uri *arg6 = (librdf_uri *) NULL ;
4402 void *argp1 = 0 ;
4403 int res1 = 0 ;
4404 void *argp2 = 0 ;
4405 int res2 = 0 ;
4406 void *argp3 = 0 ;
4407 int res3 = 0 ;
4408 int res4 ;
4409 char *buf4 = 0 ;
4410 int alloc4 = 0 ;
4411 int res5 ;
4412 char *buf5 = 0 ;
4413 int alloc5 = 0 ;
4414 void *argp6 = 0 ;
4415 int res6 = 0 ;
4416 int result;
4417 VALUE vresult = Qnil;
4418
4419 if ((argc < 5) || (argc > 6)) {
4420 rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
4421 }
4422 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4423 if (!SWIG_IsOK(res1)) {
4424 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_add_typed_literal_statement", 1, argv[0] ));
4425 }
4426 arg1 = (librdf_model *)(argp1);
4427 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4428 if (!SWIG_IsOK(res2)) {
4429 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_add_typed_literal_statement", 2, argv[1] ));
4430 }
4431 arg2 = (librdf_node *)(argp2);
4432 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4433 if (!SWIG_IsOK(res3)) {
4434 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_add_typed_literal_statement", 3, argv[2] ));
4435 }
4436 arg3 = (librdf_node *)(argp3);
4437 res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
4438 if (!SWIG_IsOK(res4)) {
4439 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char *","librdf_model_add_typed_literal_statement", 4, argv[3] ));
4440 }
4441 arg4 = (char *)(buf4);
4442 res5 = SWIG_AsCharPtrAndSize(argv[4], &buf5, NULL, &alloc5);
4443 if (!SWIG_IsOK(res5)) {
4444 SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "char *","librdf_model_add_typed_literal_statement", 5, argv[4] ));
4445 }
4446 arg5 = (char *)(buf5);
4447 if (argc > 5) {
4448 res6 = SWIG_ConvertPtr(argv[5], &argp6,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
4449 if (!SWIG_IsOK(res6)) {
4450 SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "librdf_uri *","librdf_model_add_typed_literal_statement", 6, argv[5] ));
4451 }
4452 arg6 = (librdf_uri *)(argp6);
4453 }
4454 result = (int)librdf_model_add_typed_literal_statement(arg1,arg2,arg3,arg4,arg5,arg6);
4455 vresult = SWIG_From_int((int)(result));
4456 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
4457 if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
4458 return vresult;
4459 fail:
4460 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
4461 if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
4462 return Qnil;
4463 }
4464
4465
4466 SWIGINTERN VALUE
_wrap_librdf_model_add_statement(int argc,VALUE * argv,VALUE self)4467 _wrap_librdf_model_add_statement(int argc, VALUE *argv, VALUE self) {
4468 librdf_model *arg1 = (librdf_model *) 0 ;
4469 librdf_statement *arg2 = (librdf_statement *) 0 ;
4470 void *argp1 = 0 ;
4471 int res1 = 0 ;
4472 void *argp2 = 0 ;
4473 int res2 = 0 ;
4474 int result;
4475 VALUE vresult = Qnil;
4476
4477 if ((argc < 2) || (argc > 2)) {
4478 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4479 }
4480 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4481 if (!SWIG_IsOK(res1)) {
4482 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_add_statement", 1, argv[0] ));
4483 }
4484 arg1 = (librdf_model *)(argp1);
4485 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
4486 if (!SWIG_IsOK(res2)) {
4487 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_statement *","librdf_model_add_statement", 2, argv[1] ));
4488 }
4489 arg2 = (librdf_statement *)(argp2);
4490 result = (int)librdf_model_add_statement(arg1,arg2);
4491 vresult = SWIG_From_int((int)(result));
4492 return vresult;
4493 fail:
4494 return Qnil;
4495 }
4496
4497
4498 SWIGINTERN VALUE
_wrap_librdf_model_add_statements(int argc,VALUE * argv,VALUE self)4499 _wrap_librdf_model_add_statements(int argc, VALUE *argv, VALUE self) {
4500 librdf_model *arg1 = (librdf_model *) 0 ;
4501 librdf_stream *arg2 = (librdf_stream *) 0 ;
4502 void *argp1 = 0 ;
4503 int res1 = 0 ;
4504 void *argp2 = 0 ;
4505 int res2 = 0 ;
4506 int result;
4507 VALUE vresult = Qnil;
4508
4509 if ((argc < 2) || (argc > 2)) {
4510 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4511 }
4512 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4513 if (!SWIG_IsOK(res1)) {
4514 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_add_statements", 1, argv[0] ));
4515 }
4516 arg1 = (librdf_model *)(argp1);
4517 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_stream_s, 0 | 0 );
4518 if (!SWIG_IsOK(res2)) {
4519 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_stream *","librdf_model_add_statements", 2, argv[1] ));
4520 }
4521 arg2 = (librdf_stream *)(argp2);
4522 result = (int)librdf_model_add_statements(arg1,arg2);
4523 vresult = SWIG_From_int((int)(result));
4524 return vresult;
4525 fail:
4526 return Qnil;
4527 }
4528
4529
4530 SWIGINTERN VALUE
_wrap_librdf_model_remove_statement(int argc,VALUE * argv,VALUE self)4531 _wrap_librdf_model_remove_statement(int argc, VALUE *argv, VALUE self) {
4532 librdf_model *arg1 = (librdf_model *) 0 ;
4533 librdf_statement *arg2 = (librdf_statement *) 0 ;
4534 void *argp1 = 0 ;
4535 int res1 = 0 ;
4536 void *argp2 = 0 ;
4537 int res2 = 0 ;
4538 int result;
4539 VALUE vresult = Qnil;
4540
4541 if ((argc < 2) || (argc > 2)) {
4542 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4543 }
4544 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4545 if (!SWIG_IsOK(res1)) {
4546 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_remove_statement", 1, argv[0] ));
4547 }
4548 arg1 = (librdf_model *)(argp1);
4549 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
4550 if (!SWIG_IsOK(res2)) {
4551 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_statement *","librdf_model_remove_statement", 2, argv[1] ));
4552 }
4553 arg2 = (librdf_statement *)(argp2);
4554 result = (int)librdf_model_remove_statement(arg1,arg2);
4555 vresult = SWIG_From_int((int)(result));
4556 return vresult;
4557 fail:
4558 return Qnil;
4559 }
4560
4561
4562 SWIGINTERN VALUE
_wrap_librdf_model_contains_statement(int argc,VALUE * argv,VALUE self)4563 _wrap_librdf_model_contains_statement(int argc, VALUE *argv, VALUE self) {
4564 librdf_model *arg1 = (librdf_model *) 0 ;
4565 librdf_statement *arg2 = (librdf_statement *) 0 ;
4566 void *argp1 = 0 ;
4567 int res1 = 0 ;
4568 void *argp2 = 0 ;
4569 int res2 = 0 ;
4570 int result;
4571 VALUE vresult = Qnil;
4572
4573 if ((argc < 2) || (argc > 2)) {
4574 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4575 }
4576 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4577 if (!SWIG_IsOK(res1)) {
4578 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_contains_statement", 1, argv[0] ));
4579 }
4580 arg1 = (librdf_model *)(argp1);
4581 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
4582 if (!SWIG_IsOK(res2)) {
4583 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_statement *","librdf_model_contains_statement", 2, argv[1] ));
4584 }
4585 arg2 = (librdf_statement *)(argp2);
4586 result = (int)librdf_model_contains_statement(arg1,arg2);
4587 vresult = SWIG_From_int((int)(result));
4588 return vresult;
4589 fail:
4590 return Qnil;
4591 }
4592
4593
4594 SWIGINTERN VALUE
_wrap_librdf_model_as_stream(int argc,VALUE * argv,VALUE self)4595 _wrap_librdf_model_as_stream(int argc, VALUE *argv, VALUE self) {
4596 librdf_model *arg1 = (librdf_model *) 0 ;
4597 void *argp1 = 0 ;
4598 int res1 = 0 ;
4599 librdf_stream *result = 0 ;
4600 VALUE vresult = Qnil;
4601
4602 if ((argc < 1) || (argc > 1)) {
4603 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4604 }
4605 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4606 if (!SWIG_IsOK(res1)) {
4607 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_as_stream", 1, argv[0] ));
4608 }
4609 arg1 = (librdf_model *)(argp1);
4610 result = (librdf_stream *)librdf_model_as_stream(arg1);
4611 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_stream_s, SWIG_POINTER_OWN | 0 );
4612 return vresult;
4613 fail:
4614 return Qnil;
4615 }
4616
4617
4618 SWIGINTERN VALUE
_wrap_librdf_model_find_statements(int argc,VALUE * argv,VALUE self)4619 _wrap_librdf_model_find_statements(int argc, VALUE *argv, VALUE self) {
4620 librdf_model *arg1 = (librdf_model *) 0 ;
4621 librdf_statement *arg2 = (librdf_statement *) 0 ;
4622 void *argp1 = 0 ;
4623 int res1 = 0 ;
4624 void *argp2 = 0 ;
4625 int res2 = 0 ;
4626 librdf_stream *result = 0 ;
4627 VALUE vresult = Qnil;
4628
4629 if ((argc < 2) || (argc > 2)) {
4630 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4631 }
4632 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4633 if (!SWIG_IsOK(res1)) {
4634 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_find_statements", 1, argv[0] ));
4635 }
4636 arg1 = (librdf_model *)(argp1);
4637 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
4638 if (!SWIG_IsOK(res2)) {
4639 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_statement *","librdf_model_find_statements", 2, argv[1] ));
4640 }
4641 arg2 = (librdf_statement *)(argp2);
4642 result = (librdf_stream *)librdf_model_find_statements(arg1,arg2);
4643 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_stream_s, SWIG_POINTER_OWN | 0 );
4644 return vresult;
4645 fail:
4646 return Qnil;
4647 }
4648
4649
4650 SWIGINTERN VALUE
_wrap_librdf_model_find_statements_in_context(int argc,VALUE * argv,VALUE self)4651 _wrap_librdf_model_find_statements_in_context(int argc, VALUE *argv, VALUE self) {
4652 librdf_model *arg1 = (librdf_model *) 0 ;
4653 librdf_statement *arg2 = (librdf_statement *) 0 ;
4654 librdf_node *arg3 = (librdf_node *) NULL ;
4655 void *argp1 = 0 ;
4656 int res1 = 0 ;
4657 void *argp2 = 0 ;
4658 int res2 = 0 ;
4659 void *argp3 = 0 ;
4660 int res3 = 0 ;
4661 librdf_stream *result = 0 ;
4662 VALUE vresult = Qnil;
4663
4664 if ((argc < 2) || (argc > 3)) {
4665 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4666 }
4667 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4668 if (!SWIG_IsOK(res1)) {
4669 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_find_statements_in_context", 1, argv[0] ));
4670 }
4671 arg1 = (librdf_model *)(argp1);
4672 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
4673 if (!SWIG_IsOK(res2)) {
4674 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_statement *","librdf_model_find_statements_in_context", 2, argv[1] ));
4675 }
4676 arg2 = (librdf_statement *)(argp2);
4677 if (argc > 2) {
4678 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4679 if (!SWIG_IsOK(res3)) {
4680 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_find_statements_in_context", 3, argv[2] ));
4681 }
4682 arg3 = (librdf_node *)(argp3);
4683 }
4684 result = (librdf_stream *)librdf_model_find_statements_in_context(arg1,arg2,arg3);
4685 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_stream_s, SWIG_POINTER_OWN | 0 );
4686 return vresult;
4687 fail:
4688 return Qnil;
4689 }
4690
4691
4692 SWIGINTERN VALUE
_wrap_librdf_model_get_sources(int argc,VALUE * argv,VALUE self)4693 _wrap_librdf_model_get_sources(int argc, VALUE *argv, VALUE self) {
4694 librdf_model *arg1 = (librdf_model *) 0 ;
4695 librdf_node *arg2 = (librdf_node *) 0 ;
4696 librdf_node *arg3 = (librdf_node *) 0 ;
4697 void *argp1 = 0 ;
4698 int res1 = 0 ;
4699 void *argp2 = 0 ;
4700 int res2 = 0 ;
4701 void *argp3 = 0 ;
4702 int res3 = 0 ;
4703 librdf_iterator *result = 0 ;
4704 VALUE vresult = Qnil;
4705
4706 if ((argc < 3) || (argc > 3)) {
4707 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
4708 }
4709 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4710 if (!SWIG_IsOK(res1)) {
4711 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_get_sources", 1, argv[0] ));
4712 }
4713 arg1 = (librdf_model *)(argp1);
4714 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4715 if (!SWIG_IsOK(res2)) {
4716 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_sources", 2, argv[1] ));
4717 }
4718 arg2 = (librdf_node *)(argp2);
4719 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4720 if (!SWIG_IsOK(res3)) {
4721 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_sources", 3, argv[2] ));
4722 }
4723 arg3 = (librdf_node *)(argp3);
4724 result = (librdf_iterator *)librdf_model_get_sources(arg1,arg2,arg3);
4725 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_iterator_s, SWIG_POINTER_OWN | 0 );
4726 return vresult;
4727 fail:
4728 return Qnil;
4729 }
4730
4731
4732 SWIGINTERN VALUE
_wrap_librdf_model_get_arcs(int argc,VALUE * argv,VALUE self)4733 _wrap_librdf_model_get_arcs(int argc, VALUE *argv, VALUE self) {
4734 librdf_model *arg1 = (librdf_model *) 0 ;
4735 librdf_node *arg2 = (librdf_node *) 0 ;
4736 librdf_node *arg3 = (librdf_node *) 0 ;
4737 void *argp1 = 0 ;
4738 int res1 = 0 ;
4739 void *argp2 = 0 ;
4740 int res2 = 0 ;
4741 void *argp3 = 0 ;
4742 int res3 = 0 ;
4743 librdf_iterator *result = 0 ;
4744 VALUE vresult = Qnil;
4745
4746 if ((argc < 3) || (argc > 3)) {
4747 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
4748 }
4749 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4750 if (!SWIG_IsOK(res1)) {
4751 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_get_arcs", 1, argv[0] ));
4752 }
4753 arg1 = (librdf_model *)(argp1);
4754 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4755 if (!SWIG_IsOK(res2)) {
4756 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_arcs", 2, argv[1] ));
4757 }
4758 arg2 = (librdf_node *)(argp2);
4759 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4760 if (!SWIG_IsOK(res3)) {
4761 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_arcs", 3, argv[2] ));
4762 }
4763 arg3 = (librdf_node *)(argp3);
4764 result = (librdf_iterator *)librdf_model_get_arcs(arg1,arg2,arg3);
4765 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_iterator_s, SWIG_POINTER_OWN | 0 );
4766 return vresult;
4767 fail:
4768 return Qnil;
4769 }
4770
4771
4772 SWIGINTERN VALUE
_wrap_librdf_model_get_targets(int argc,VALUE * argv,VALUE self)4773 _wrap_librdf_model_get_targets(int argc, VALUE *argv, VALUE self) {
4774 librdf_model *arg1 = (librdf_model *) 0 ;
4775 librdf_node *arg2 = (librdf_node *) 0 ;
4776 librdf_node *arg3 = (librdf_node *) 0 ;
4777 void *argp1 = 0 ;
4778 int res1 = 0 ;
4779 void *argp2 = 0 ;
4780 int res2 = 0 ;
4781 void *argp3 = 0 ;
4782 int res3 = 0 ;
4783 librdf_iterator *result = 0 ;
4784 VALUE vresult = Qnil;
4785
4786 if ((argc < 3) || (argc > 3)) {
4787 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
4788 }
4789 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4790 if (!SWIG_IsOK(res1)) {
4791 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_get_targets", 1, argv[0] ));
4792 }
4793 arg1 = (librdf_model *)(argp1);
4794 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4795 if (!SWIG_IsOK(res2)) {
4796 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_targets", 2, argv[1] ));
4797 }
4798 arg2 = (librdf_node *)(argp2);
4799 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4800 if (!SWIG_IsOK(res3)) {
4801 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_targets", 3, argv[2] ));
4802 }
4803 arg3 = (librdf_node *)(argp3);
4804 result = (librdf_iterator *)librdf_model_get_targets(arg1,arg2,arg3);
4805 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_iterator_s, SWIG_POINTER_OWN | 0 );
4806 return vresult;
4807 fail:
4808 return Qnil;
4809 }
4810
4811
4812 SWIGINTERN VALUE
_wrap_librdf_model_get_source(int argc,VALUE * argv,VALUE self)4813 _wrap_librdf_model_get_source(int argc, VALUE *argv, VALUE self) {
4814 librdf_model *arg1 = (librdf_model *) 0 ;
4815 librdf_node *arg2 = (librdf_node *) 0 ;
4816 librdf_node *arg3 = (librdf_node *) 0 ;
4817 void *argp1 = 0 ;
4818 int res1 = 0 ;
4819 void *argp2 = 0 ;
4820 int res2 = 0 ;
4821 void *argp3 = 0 ;
4822 int res3 = 0 ;
4823 librdf_node *result = 0 ;
4824 VALUE vresult = Qnil;
4825
4826 if ((argc < 3) || (argc > 3)) {
4827 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
4828 }
4829 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4830 if (!SWIG_IsOK(res1)) {
4831 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_get_source", 1, argv[0] ));
4832 }
4833 arg1 = (librdf_model *)(argp1);
4834 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4835 if (!SWIG_IsOK(res2)) {
4836 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_source", 2, argv[1] ));
4837 }
4838 arg2 = (librdf_node *)(argp2);
4839 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4840 if (!SWIG_IsOK(res3)) {
4841 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_source", 3, argv[2] ));
4842 }
4843 arg3 = (librdf_node *)(argp3);
4844 result = (librdf_node *)librdf_model_get_source(arg1,arg2,arg3);
4845 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
4846 return vresult;
4847 fail:
4848 return Qnil;
4849 }
4850
4851
4852 SWIGINTERN VALUE
_wrap_librdf_model_get_arc(int argc,VALUE * argv,VALUE self)4853 _wrap_librdf_model_get_arc(int argc, VALUE *argv, VALUE self) {
4854 librdf_model *arg1 = (librdf_model *) 0 ;
4855 librdf_node *arg2 = (librdf_node *) 0 ;
4856 librdf_node *arg3 = (librdf_node *) 0 ;
4857 void *argp1 = 0 ;
4858 int res1 = 0 ;
4859 void *argp2 = 0 ;
4860 int res2 = 0 ;
4861 void *argp3 = 0 ;
4862 int res3 = 0 ;
4863 librdf_node *result = 0 ;
4864 VALUE vresult = Qnil;
4865
4866 if ((argc < 3) || (argc > 3)) {
4867 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
4868 }
4869 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4870 if (!SWIG_IsOK(res1)) {
4871 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_get_arc", 1, argv[0] ));
4872 }
4873 arg1 = (librdf_model *)(argp1);
4874 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4875 if (!SWIG_IsOK(res2)) {
4876 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_arc", 2, argv[1] ));
4877 }
4878 arg2 = (librdf_node *)(argp2);
4879 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4880 if (!SWIG_IsOK(res3)) {
4881 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_arc", 3, argv[2] ));
4882 }
4883 arg3 = (librdf_node *)(argp3);
4884 result = (librdf_node *)librdf_model_get_arc(arg1,arg2,arg3);
4885 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
4886 return vresult;
4887 fail:
4888 return Qnil;
4889 }
4890
4891
4892 SWIGINTERN VALUE
_wrap_librdf_model_get_arcs_out(int argc,VALUE * argv,VALUE self)4893 _wrap_librdf_model_get_arcs_out(int argc, VALUE *argv, VALUE self) {
4894 librdf_model *arg1 = (librdf_model *) 0 ;
4895 librdf_node *arg2 = (librdf_node *) 0 ;
4896 void *argp1 = 0 ;
4897 int res1 = 0 ;
4898 void *argp2 = 0 ;
4899 int res2 = 0 ;
4900 librdf_iterator *result = 0 ;
4901 VALUE vresult = Qnil;
4902
4903 if ((argc < 2) || (argc > 2)) {
4904 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4905 }
4906 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4907 if (!SWIG_IsOK(res1)) {
4908 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_get_arcs_out", 1, argv[0] ));
4909 }
4910 arg1 = (librdf_model *)(argp1);
4911 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4912 if (!SWIG_IsOK(res2)) {
4913 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_arcs_out", 2, argv[1] ));
4914 }
4915 arg2 = (librdf_node *)(argp2);
4916 result = (librdf_iterator *)librdf_model_get_arcs_out(arg1,arg2);
4917 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_iterator_s, SWIG_POINTER_OWN | 0 );
4918 return vresult;
4919 fail:
4920 return Qnil;
4921 }
4922
4923
4924 SWIGINTERN VALUE
_wrap_librdf_model_get_arcs_in(int argc,VALUE * argv,VALUE self)4925 _wrap_librdf_model_get_arcs_in(int argc, VALUE *argv, VALUE self) {
4926 librdf_model *arg1 = (librdf_model *) 0 ;
4927 librdf_node *arg2 = (librdf_node *) 0 ;
4928 void *argp1 = 0 ;
4929 int res1 = 0 ;
4930 void *argp2 = 0 ;
4931 int res2 = 0 ;
4932 librdf_iterator *result = 0 ;
4933 VALUE vresult = Qnil;
4934
4935 if ((argc < 2) || (argc > 2)) {
4936 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
4937 }
4938 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4939 if (!SWIG_IsOK(res1)) {
4940 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_get_arcs_in", 1, argv[0] ));
4941 }
4942 arg1 = (librdf_model *)(argp1);
4943 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4944 if (!SWIG_IsOK(res2)) {
4945 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_arcs_in", 2, argv[1] ));
4946 }
4947 arg2 = (librdf_node *)(argp2);
4948 result = (librdf_iterator *)librdf_model_get_arcs_in(arg1,arg2);
4949 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_iterator_s, SWIG_POINTER_OWN | 0 );
4950 return vresult;
4951 fail:
4952 return Qnil;
4953 }
4954
4955
4956 SWIGINTERN VALUE
_wrap_librdf_model_has_arc_in(int argc,VALUE * argv,VALUE self)4957 _wrap_librdf_model_has_arc_in(int argc, VALUE *argv, VALUE self) {
4958 librdf_model *arg1 = (librdf_model *) 0 ;
4959 librdf_node *arg2 = (librdf_node *) 0 ;
4960 librdf_node *arg3 = (librdf_node *) 0 ;
4961 void *argp1 = 0 ;
4962 int res1 = 0 ;
4963 void *argp2 = 0 ;
4964 int res2 = 0 ;
4965 void *argp3 = 0 ;
4966 int res3 = 0 ;
4967 int result;
4968 VALUE vresult = Qnil;
4969
4970 if ((argc < 3) || (argc > 3)) {
4971 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
4972 }
4973 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
4974 if (!SWIG_IsOK(res1)) {
4975 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_has_arc_in", 1, argv[0] ));
4976 }
4977 arg1 = (librdf_model *)(argp1);
4978 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4979 if (!SWIG_IsOK(res2)) {
4980 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_has_arc_in", 2, argv[1] ));
4981 }
4982 arg2 = (librdf_node *)(argp2);
4983 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
4984 if (!SWIG_IsOK(res3)) {
4985 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_has_arc_in", 3, argv[2] ));
4986 }
4987 arg3 = (librdf_node *)(argp3);
4988 result = (int)librdf_model_has_arc_in(arg1,arg2,arg3);
4989 vresult = SWIG_From_int((int)(result));
4990 return vresult;
4991 fail:
4992 return Qnil;
4993 }
4994
4995
4996 SWIGINTERN VALUE
_wrap_librdf_model_has_arc_out(int argc,VALUE * argv,VALUE self)4997 _wrap_librdf_model_has_arc_out(int argc, VALUE *argv, VALUE self) {
4998 librdf_model *arg1 = (librdf_model *) 0 ;
4999 librdf_node *arg2 = (librdf_node *) 0 ;
5000 librdf_node *arg3 = (librdf_node *) 0 ;
5001 void *argp1 = 0 ;
5002 int res1 = 0 ;
5003 void *argp2 = 0 ;
5004 int res2 = 0 ;
5005 void *argp3 = 0 ;
5006 int res3 = 0 ;
5007 int result;
5008 VALUE vresult = Qnil;
5009
5010 if ((argc < 3) || (argc > 3)) {
5011 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
5012 }
5013 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5014 if (!SWIG_IsOK(res1)) {
5015 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_has_arc_out", 1, argv[0] ));
5016 }
5017 arg1 = (librdf_model *)(argp1);
5018 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
5019 if (!SWIG_IsOK(res2)) {
5020 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_has_arc_out", 2, argv[1] ));
5021 }
5022 arg2 = (librdf_node *)(argp2);
5023 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
5024 if (!SWIG_IsOK(res3)) {
5025 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_has_arc_out", 3, argv[2] ));
5026 }
5027 arg3 = (librdf_node *)(argp3);
5028 result = (int)librdf_model_has_arc_out(arg1,arg2,arg3);
5029 vresult = SWIG_From_int((int)(result));
5030 return vresult;
5031 fail:
5032 return Qnil;
5033 }
5034
5035
5036 SWIGINTERN VALUE
_wrap_librdf_model_get_target(int argc,VALUE * argv,VALUE self)5037 _wrap_librdf_model_get_target(int argc, VALUE *argv, VALUE self) {
5038 librdf_model *arg1 = (librdf_model *) 0 ;
5039 librdf_node *arg2 = (librdf_node *) 0 ;
5040 librdf_node *arg3 = (librdf_node *) 0 ;
5041 void *argp1 = 0 ;
5042 int res1 = 0 ;
5043 void *argp2 = 0 ;
5044 int res2 = 0 ;
5045 void *argp3 = 0 ;
5046 int res3 = 0 ;
5047 librdf_node *result = 0 ;
5048 VALUE vresult = Qnil;
5049
5050 if ((argc < 3) || (argc > 3)) {
5051 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
5052 }
5053 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5054 if (!SWIG_IsOK(res1)) {
5055 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_get_target", 1, argv[0] ));
5056 }
5057 arg1 = (librdf_model *)(argp1);
5058 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
5059 if (!SWIG_IsOK(res2)) {
5060 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_target", 2, argv[1] ));
5061 }
5062 arg2 = (librdf_node *)(argp2);
5063 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
5064 if (!SWIG_IsOK(res3)) {
5065 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_get_target", 3, argv[2] ));
5066 }
5067 arg3 = (librdf_node *)(argp3);
5068 result = (librdf_node *)librdf_model_get_target(arg1,arg2,arg3);
5069 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
5070 return vresult;
5071 fail:
5072 return Qnil;
5073 }
5074
5075
5076 SWIGINTERN VALUE
_wrap_librdf_model_context_add_statement(int argc,VALUE * argv,VALUE self)5077 _wrap_librdf_model_context_add_statement(int argc, VALUE *argv, VALUE self) {
5078 librdf_model *arg1 = (librdf_model *) 0 ;
5079 librdf_node *arg2 = (librdf_node *) 0 ;
5080 librdf_statement *arg3 = (librdf_statement *) 0 ;
5081 void *argp1 = 0 ;
5082 int res1 = 0 ;
5083 void *argp2 = 0 ;
5084 int res2 = 0 ;
5085 void *argp3 = 0 ;
5086 int res3 = 0 ;
5087 int result;
5088 VALUE vresult = Qnil;
5089
5090 if ((argc < 3) || (argc > 3)) {
5091 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
5092 }
5093 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5094 if (!SWIG_IsOK(res1)) {
5095 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_context_add_statement", 1, argv[0] ));
5096 }
5097 arg1 = (librdf_model *)(argp1);
5098 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
5099 if (!SWIG_IsOK(res2)) {
5100 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_context_add_statement", 2, argv[1] ));
5101 }
5102 arg2 = (librdf_node *)(argp2);
5103 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
5104 if (!SWIG_IsOK(res3)) {
5105 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_statement *","librdf_model_context_add_statement", 3, argv[2] ));
5106 }
5107 arg3 = (librdf_statement *)(argp3);
5108 result = (int)librdf_model_context_add_statement(arg1,arg2,arg3);
5109 vresult = SWIG_From_int((int)(result));
5110 return vresult;
5111 fail:
5112 return Qnil;
5113 }
5114
5115
5116 SWIGINTERN VALUE
_wrap_librdf_model_context_add_statements(int argc,VALUE * argv,VALUE self)5117 _wrap_librdf_model_context_add_statements(int argc, VALUE *argv, VALUE self) {
5118 librdf_model *arg1 = (librdf_model *) 0 ;
5119 librdf_node *arg2 = (librdf_node *) 0 ;
5120 librdf_stream *arg3 = (librdf_stream *) 0 ;
5121 void *argp1 = 0 ;
5122 int res1 = 0 ;
5123 void *argp2 = 0 ;
5124 int res2 = 0 ;
5125 void *argp3 = 0 ;
5126 int res3 = 0 ;
5127 int result;
5128 VALUE vresult = Qnil;
5129
5130 if ((argc < 3) || (argc > 3)) {
5131 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
5132 }
5133 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5134 if (!SWIG_IsOK(res1)) {
5135 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_context_add_statements", 1, argv[0] ));
5136 }
5137 arg1 = (librdf_model *)(argp1);
5138 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
5139 if (!SWIG_IsOK(res2)) {
5140 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_context_add_statements", 2, argv[1] ));
5141 }
5142 arg2 = (librdf_node *)(argp2);
5143 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_stream_s, 0 | 0 );
5144 if (!SWIG_IsOK(res3)) {
5145 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_stream *","librdf_model_context_add_statements", 3, argv[2] ));
5146 }
5147 arg3 = (librdf_stream *)(argp3);
5148 result = (int)librdf_model_context_add_statements(arg1,arg2,arg3);
5149 vresult = SWIG_From_int((int)(result));
5150 return vresult;
5151 fail:
5152 return Qnil;
5153 }
5154
5155
5156 SWIGINTERN VALUE
_wrap_librdf_model_context_remove_statement(int argc,VALUE * argv,VALUE self)5157 _wrap_librdf_model_context_remove_statement(int argc, VALUE *argv, VALUE self) {
5158 librdf_model *arg1 = (librdf_model *) 0 ;
5159 librdf_node *arg2 = (librdf_node *) 0 ;
5160 librdf_statement *arg3 = (librdf_statement *) 0 ;
5161 void *argp1 = 0 ;
5162 int res1 = 0 ;
5163 void *argp2 = 0 ;
5164 int res2 = 0 ;
5165 void *argp3 = 0 ;
5166 int res3 = 0 ;
5167 int result;
5168 VALUE vresult = Qnil;
5169
5170 if ((argc < 3) || (argc > 3)) {
5171 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
5172 }
5173 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5174 if (!SWIG_IsOK(res1)) {
5175 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_context_remove_statement", 1, argv[0] ));
5176 }
5177 arg1 = (librdf_model *)(argp1);
5178 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
5179 if (!SWIG_IsOK(res2)) {
5180 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_context_remove_statement", 2, argv[1] ));
5181 }
5182 arg2 = (librdf_node *)(argp2);
5183 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_statement_s, 0 | 0 );
5184 if (!SWIG_IsOK(res3)) {
5185 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_statement *","librdf_model_context_remove_statement", 3, argv[2] ));
5186 }
5187 arg3 = (librdf_statement *)(argp3);
5188 result = (int)librdf_model_context_remove_statement(arg1,arg2,arg3);
5189 vresult = SWIG_From_int((int)(result));
5190 return vresult;
5191 fail:
5192 return Qnil;
5193 }
5194
5195
5196 SWIGINTERN VALUE
_wrap_librdf_model_context_remove_statements(int argc,VALUE * argv,VALUE self)5197 _wrap_librdf_model_context_remove_statements(int argc, VALUE *argv, VALUE self) {
5198 librdf_model *arg1 = (librdf_model *) 0 ;
5199 librdf_node *arg2 = (librdf_node *) 0 ;
5200 void *argp1 = 0 ;
5201 int res1 = 0 ;
5202 void *argp2 = 0 ;
5203 int res2 = 0 ;
5204 int result;
5205 VALUE vresult = Qnil;
5206
5207 if ((argc < 2) || (argc > 2)) {
5208 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5209 }
5210 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5211 if (!SWIG_IsOK(res1)) {
5212 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_context_remove_statements", 1, argv[0] ));
5213 }
5214 arg1 = (librdf_model *)(argp1);
5215 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
5216 if (!SWIG_IsOK(res2)) {
5217 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_context_remove_statements", 2, argv[1] ));
5218 }
5219 arg2 = (librdf_node *)(argp2);
5220 result = (int)librdf_model_context_remove_statements(arg1,arg2);
5221 vresult = SWIG_From_int((int)(result));
5222 return vresult;
5223 fail:
5224 return Qnil;
5225 }
5226
5227
5228 SWIGINTERN VALUE
_wrap_librdf_model_context_as_stream(int argc,VALUE * argv,VALUE self)5229 _wrap_librdf_model_context_as_stream(int argc, VALUE *argv, VALUE self) {
5230 librdf_model *arg1 = (librdf_model *) 0 ;
5231 librdf_node *arg2 = (librdf_node *) 0 ;
5232 void *argp1 = 0 ;
5233 int res1 = 0 ;
5234 void *argp2 = 0 ;
5235 int res2 = 0 ;
5236 librdf_stream *result = 0 ;
5237 VALUE vresult = Qnil;
5238
5239 if ((argc < 2) || (argc > 2)) {
5240 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5241 }
5242 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5243 if (!SWIG_IsOK(res1)) {
5244 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_context_as_stream", 1, argv[0] ));
5245 }
5246 arg1 = (librdf_model *)(argp1);
5247 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
5248 if (!SWIG_IsOK(res2)) {
5249 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_context_as_stream", 2, argv[1] ));
5250 }
5251 arg2 = (librdf_node *)(argp2);
5252 result = (librdf_stream *)librdf_model_context_as_stream(arg1,arg2);
5253 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_stream_s, SWIG_POINTER_OWN | 0 );
5254 return vresult;
5255 fail:
5256 return Qnil;
5257 }
5258
5259
5260 SWIGINTERN VALUE
_wrap_librdf_model_sync(int argc,VALUE * argv,VALUE self)5261 _wrap_librdf_model_sync(int argc, VALUE *argv, VALUE self) {
5262 librdf_model *arg1 = (librdf_model *) 0 ;
5263 void *argp1 = 0 ;
5264 int res1 = 0 ;
5265
5266 if ((argc < 1) || (argc > 1)) {
5267 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5268 }
5269 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5270 if (!SWIG_IsOK(res1)) {
5271 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_sync", 1, argv[0] ));
5272 }
5273 arg1 = (librdf_model *)(argp1);
5274 librdf_model_sync(arg1);
5275 return Qnil;
5276 fail:
5277 return Qnil;
5278 }
5279
5280
5281 SWIGINTERN VALUE
_wrap_librdf_model_get_contexts(int argc,VALUE * argv,VALUE self)5282 _wrap_librdf_model_get_contexts(int argc, VALUE *argv, VALUE self) {
5283 librdf_model *arg1 = (librdf_model *) 0 ;
5284 void *argp1 = 0 ;
5285 int res1 = 0 ;
5286 librdf_iterator *result = 0 ;
5287 VALUE vresult = Qnil;
5288
5289 if ((argc < 1) || (argc > 1)) {
5290 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5291 }
5292 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5293 if (!SWIG_IsOK(res1)) {
5294 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_get_contexts", 1, argv[0] ));
5295 }
5296 arg1 = (librdf_model *)(argp1);
5297 result = (librdf_iterator *)librdf_model_get_contexts(arg1);
5298 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_iterator_s, SWIG_POINTER_OWN | 0 );
5299 return vresult;
5300 fail:
5301 return Qnil;
5302 }
5303
5304
5305 SWIGINTERN VALUE
_wrap_librdf_model_contains_context(int argc,VALUE * argv,VALUE self)5306 _wrap_librdf_model_contains_context(int argc, VALUE *argv, VALUE self) {
5307 librdf_model *arg1 = (librdf_model *) 0 ;
5308 librdf_node *arg2 = (librdf_node *) 0 ;
5309 void *argp1 = 0 ;
5310 int res1 = 0 ;
5311 void *argp2 = 0 ;
5312 int res2 = 0 ;
5313 int result;
5314 VALUE vresult = Qnil;
5315
5316 if ((argc < 2) || (argc > 2)) {
5317 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5318 }
5319 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5320 if (!SWIG_IsOK(res1)) {
5321 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_contains_context", 1, argv[0] ));
5322 }
5323 arg1 = (librdf_model *)(argp1);
5324 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_node_s, 0 | 0 );
5325 if (!SWIG_IsOK(res2)) {
5326 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_contains_context", 2, argv[1] ));
5327 }
5328 arg2 = (librdf_node *)(argp2);
5329 result = (int)librdf_model_contains_context(arg1,arg2);
5330 vresult = SWIG_From_int((int)(result));
5331 return vresult;
5332 fail:
5333 return Qnil;
5334 }
5335
5336
5337 SWIGINTERN VALUE
_wrap_librdf_model_get_feature(int argc,VALUE * argv,VALUE self)5338 _wrap_librdf_model_get_feature(int argc, VALUE *argv, VALUE self) {
5339 librdf_model *arg1 = (librdf_model *) 0 ;
5340 librdf_uri *arg2 = (librdf_uri *) 0 ;
5341 void *argp1 = 0 ;
5342 int res1 = 0 ;
5343 void *argp2 = 0 ;
5344 int res2 = 0 ;
5345 librdf_node *result = 0 ;
5346 VALUE vresult = Qnil;
5347
5348 if ((argc < 2) || (argc > 2)) {
5349 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5350 }
5351 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5352 if (!SWIG_IsOK(res1)) {
5353 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_get_feature", 1, argv[0] ));
5354 }
5355 arg1 = (librdf_model *)(argp1);
5356 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
5357 if (!SWIG_IsOK(res2)) {
5358 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_model_get_feature", 2, argv[1] ));
5359 }
5360 arg2 = (librdf_uri *)(argp2);
5361 result = (librdf_node *)librdf_model_get_feature(arg1,arg2);
5362 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
5363 return vresult;
5364 fail:
5365 return Qnil;
5366 }
5367
5368
5369 SWIGINTERN VALUE
_wrap_librdf_model_set_feature(int argc,VALUE * argv,VALUE self)5370 _wrap_librdf_model_set_feature(int argc, VALUE *argv, VALUE self) {
5371 librdf_model *arg1 = (librdf_model *) 0 ;
5372 librdf_uri *arg2 = (librdf_uri *) 0 ;
5373 librdf_node *arg3 = (librdf_node *) 0 ;
5374 void *argp1 = 0 ;
5375 int res1 = 0 ;
5376 void *argp2 = 0 ;
5377 int res2 = 0 ;
5378 void *argp3 = 0 ;
5379 int res3 = 0 ;
5380 int result;
5381 VALUE vresult = Qnil;
5382
5383 if ((argc < 3) || (argc > 3)) {
5384 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
5385 }
5386 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5387 if (!SWIG_IsOK(res1)) {
5388 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_set_feature", 1, argv[0] ));
5389 }
5390 arg1 = (librdf_model *)(argp1);
5391 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
5392 if (!SWIG_IsOK(res2)) {
5393 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_model_set_feature", 2, argv[1] ));
5394 }
5395 arg2 = (librdf_uri *)(argp2);
5396 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
5397 if (!SWIG_IsOK(res3)) {
5398 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_model_set_feature", 3, argv[2] ));
5399 }
5400 arg3 = (librdf_node *)(argp3);
5401 result = (int)librdf_model_set_feature(arg1,arg2,arg3);
5402 vresult = SWIG_From_int((int)(result));
5403 return vresult;
5404 fail:
5405 return Qnil;
5406 }
5407
5408
5409 SWIGINTERN VALUE
_wrap_librdf_model_load(int argc,VALUE * argv,VALUE self)5410 _wrap_librdf_model_load(int argc, VALUE *argv, VALUE self) {
5411 librdf_model *arg1 = (librdf_model *) 0 ;
5412 librdf_uri *arg2 = (librdf_uri *) 0 ;
5413 char *arg3 = (char *) NULL ;
5414 char *arg4 = (char *) NULL ;
5415 librdf_uri *arg5 = (librdf_uri *) NULL ;
5416 void *argp1 = 0 ;
5417 int res1 = 0 ;
5418 void *argp2 = 0 ;
5419 int res2 = 0 ;
5420 void *argp5 = 0 ;
5421 int res5 = 0 ;
5422 int result;
5423 VALUE vresult = Qnil;
5424
5425 if ((argc < 2) || (argc > 5)) {
5426 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5427 }
5428 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5429 if (!SWIG_IsOK(res1)) {
5430 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_load", 1, argv[0] ));
5431 }
5432 arg1 = (librdf_model *)(argp1);
5433 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
5434 if (!SWIG_IsOK(res2)) {
5435 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_model_load", 2, argv[1] ));
5436 }
5437 arg2 = (librdf_uri *)(argp2);
5438 if (argc > 2) {
5439 {
5440 arg3 = (argv[2] == Qnil) ? NULL : STR2CSTR(argv[2]);
5441 }
5442 }
5443 if (argc > 3) {
5444 {
5445 arg4 = (argv[3] == Qnil) ? NULL : STR2CSTR(argv[3]);
5446 }
5447 }
5448 if (argc > 4) {
5449 res5 = SWIG_ConvertPtr(argv[4], &argp5,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
5450 if (!SWIG_IsOK(res5)) {
5451 SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "librdf_uri *","librdf_model_load", 5, argv[4] ));
5452 }
5453 arg5 = (librdf_uri *)(argp5);
5454 }
5455 result = (int)librdf_model_load(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5);
5456 vresult = SWIG_From_int((int)(result));
5457 return vresult;
5458 fail:
5459 return Qnil;
5460 }
5461
5462
5463 SWIGINTERN VALUE
_wrap_librdf_model_query_execute(int argc,VALUE * argv,VALUE self)5464 _wrap_librdf_model_query_execute(int argc, VALUE *argv, VALUE self) {
5465 librdf_model *arg1 = (librdf_model *) 0 ;
5466 librdf_query *arg2 = (librdf_query *) 0 ;
5467 void *argp1 = 0 ;
5468 int res1 = 0 ;
5469 void *argp2 = 0 ;
5470 int res2 = 0 ;
5471 librdf_query_results *result = 0 ;
5472 VALUE vresult = Qnil;
5473
5474 if ((argc < 2) || (argc > 2)) {
5475 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5476 }
5477 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5478 if (!SWIG_IsOK(res1)) {
5479 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_query_execute", 1, argv[0] ));
5480 }
5481 arg1 = (librdf_model *)(argp1);
5482 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_query, 0 | 0 );
5483 if (!SWIG_IsOK(res2)) {
5484 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_query *","librdf_model_query_execute", 2, argv[1] ));
5485 }
5486 arg2 = (librdf_query *)(argp2);
5487 result = (librdf_query_results *)librdf_model_query_execute(arg1,arg2);
5488 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_query_results, SWIG_POINTER_OWN | 0 );
5489 return vresult;
5490 fail:
5491 return Qnil;
5492 }
5493
5494
5495 SWIGINTERN VALUE
_wrap_librdf_model_to_string(int argc,VALUE * argv,VALUE self)5496 _wrap_librdf_model_to_string(int argc, VALUE *argv, VALUE self) {
5497 librdf_model *arg1 = (librdf_model *) 0 ;
5498 librdf_uri *arg2 = (librdf_uri *) 0 ;
5499 char *arg3 = (char *) NULL ;
5500 char *arg4 = (char *) NULL ;
5501 librdf_uri *arg5 = (librdf_uri *) NULL ;
5502 void *argp1 = 0 ;
5503 int res1 = 0 ;
5504 void *argp2 = 0 ;
5505 int res2 = 0 ;
5506 void *argp5 = 0 ;
5507 int res5 = 0 ;
5508 char *result = 0 ;
5509 VALUE vresult = Qnil;
5510
5511 if ((argc < 2) || (argc > 5)) {
5512 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5513 }
5514 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5515 if (!SWIG_IsOK(res1)) {
5516 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_to_string", 1, argv[0] ));
5517 }
5518 arg1 = (librdf_model *)(argp1);
5519 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
5520 if (!SWIG_IsOK(res2)) {
5521 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_model_to_string", 2, argv[1] ));
5522 }
5523 arg2 = (librdf_uri *)(argp2);
5524 if (argc > 2) {
5525 {
5526 arg3 = (argv[2] == Qnil) ? NULL : STR2CSTR(argv[2]);
5527 }
5528 }
5529 if (argc > 3) {
5530 {
5531 arg4 = (argv[3] == Qnil) ? NULL : STR2CSTR(argv[3]);
5532 }
5533 }
5534 if (argc > 4) {
5535 res5 = SWIG_ConvertPtr(argv[4], &argp5,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
5536 if (!SWIG_IsOK(res5)) {
5537 SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "librdf_uri *","librdf_model_to_string", 5, argv[4] ));
5538 }
5539 arg5 = (librdf_uri *)(argp5);
5540 }
5541 result = (char *)librdf_model_to_string(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5);
5542 {
5543 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
5544 }
5545 free((char*)result);
5546 return vresult;
5547 fail:
5548 return Qnil;
5549 }
5550
5551
5552 SWIGINTERN VALUE
_wrap_librdf_model_transaction_start(int argc,VALUE * argv,VALUE self)5553 _wrap_librdf_model_transaction_start(int argc, VALUE *argv, VALUE self) {
5554 librdf_model *arg1 = (librdf_model *) 0 ;
5555 void *argp1 = 0 ;
5556 int res1 = 0 ;
5557 int result;
5558 VALUE vresult = Qnil;
5559
5560 if ((argc < 1) || (argc > 1)) {
5561 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5562 }
5563 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5564 if (!SWIG_IsOK(res1)) {
5565 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_transaction_start", 1, argv[0] ));
5566 }
5567 arg1 = (librdf_model *)(argp1);
5568 result = (int)librdf_model_transaction_start(arg1);
5569 vresult = SWIG_From_int((int)(result));
5570 return vresult;
5571 fail:
5572 return Qnil;
5573 }
5574
5575
5576 SWIGINTERN VALUE
_wrap_librdf_model_transaction_commit(int argc,VALUE * argv,VALUE self)5577 _wrap_librdf_model_transaction_commit(int argc, VALUE *argv, VALUE self) {
5578 librdf_model *arg1 = (librdf_model *) 0 ;
5579 void *argp1 = 0 ;
5580 int res1 = 0 ;
5581 int result;
5582 VALUE vresult = Qnil;
5583
5584 if ((argc < 1) || (argc > 1)) {
5585 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5586 }
5587 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5588 if (!SWIG_IsOK(res1)) {
5589 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_transaction_commit", 1, argv[0] ));
5590 }
5591 arg1 = (librdf_model *)(argp1);
5592 result = (int)librdf_model_transaction_commit(arg1);
5593 vresult = SWIG_From_int((int)(result));
5594 return vresult;
5595 fail:
5596 return Qnil;
5597 }
5598
5599
5600 SWIGINTERN VALUE
_wrap_librdf_model_transaction_rollback(int argc,VALUE * argv,VALUE self)5601 _wrap_librdf_model_transaction_rollback(int argc, VALUE *argv, VALUE self) {
5602 librdf_model *arg1 = (librdf_model *) 0 ;
5603 void *argp1 = 0 ;
5604 int res1 = 0 ;
5605 int result;
5606 VALUE vresult = Qnil;
5607
5608 if ((argc < 1) || (argc > 1)) {
5609 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5610 }
5611 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5612 if (!SWIG_IsOK(res1)) {
5613 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_model *","librdf_model_transaction_rollback", 1, argv[0] ));
5614 }
5615 arg1 = (librdf_model *)(argp1);
5616 result = (int)librdf_model_transaction_rollback(arg1);
5617 vresult = SWIG_From_int((int)(result));
5618 return vresult;
5619 fail:
5620 return Qnil;
5621 }
5622
5623
5624 SWIGINTERN VALUE
_wrap_librdf_new_storage(int argc,VALUE * argv,VALUE self)5625 _wrap_librdf_new_storage(int argc, VALUE *argv, VALUE self) {
5626 librdf_world *arg1 = (librdf_world *) 0 ;
5627 char *arg2 = (char *) 0 ;
5628 char *arg3 = (char *) 0 ;
5629 char *arg4 = (char *) 0 ;
5630 void *argp1 = 0 ;
5631 int res1 = 0 ;
5632 int res2 ;
5633 char *buf2 = 0 ;
5634 int alloc2 = 0 ;
5635 int res3 ;
5636 char *buf3 = 0 ;
5637 int alloc3 = 0 ;
5638 int res4 ;
5639 char *buf4 = 0 ;
5640 int alloc4 = 0 ;
5641 librdf_storage *result = 0 ;
5642 VALUE vresult = Qnil;
5643
5644 if ((argc < 4) || (argc > 4)) {
5645 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
5646 }
5647 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
5648 if (!SWIG_IsOK(res1)) {
5649 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_storage", 1, argv[0] ));
5650 }
5651 arg1 = (librdf_world *)(argp1);
5652 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
5653 if (!SWIG_IsOK(res2)) {
5654 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","librdf_new_storage", 2, argv[1] ));
5655 }
5656 arg2 = (char *)(buf2);
5657 res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
5658 if (!SWIG_IsOK(res3)) {
5659 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char *","librdf_new_storage", 3, argv[2] ));
5660 }
5661 arg3 = (char *)(buf3);
5662 res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
5663 if (!SWIG_IsOK(res4)) {
5664 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char *","librdf_new_storage", 4, argv[3] ));
5665 }
5666 arg4 = (char *)(buf4);
5667 result = (librdf_storage *)librdf_new_storage(arg1,arg2,arg3,arg4);
5668 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_storage_s, SWIG_POINTER_OWN | 0 );
5669 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5670 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5671 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5672 return vresult;
5673 fail:
5674 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5675 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5676 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
5677 return Qnil;
5678 }
5679
5680
5681 SWIGINTERN VALUE
_wrap_librdf_new_storage_from_storage(int argc,VALUE * argv,VALUE self)5682 _wrap_librdf_new_storage_from_storage(int argc, VALUE *argv, VALUE self) {
5683 librdf_storage *arg1 = (librdf_storage *) 0 ;
5684 void *argp1 = 0 ;
5685 int res1 = 0 ;
5686 librdf_storage *result = 0 ;
5687 VALUE vresult = Qnil;
5688
5689 if ((argc < 1) || (argc > 1)) {
5690 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5691 }
5692 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_storage_s, 0 | 0 );
5693 if (!SWIG_IsOK(res1)) {
5694 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_storage *","librdf_new_storage_from_storage", 1, argv[0] ));
5695 }
5696 arg1 = (librdf_storage *)(argp1);
5697 result = (librdf_storage *)librdf_new_storage_from_storage(arg1);
5698 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_storage_s, SWIG_POINTER_OWN | 0 );
5699 return vresult;
5700 fail:
5701 return Qnil;
5702 }
5703
5704
5705 SWIGINTERN VALUE
_wrap_librdf_free_storage(int argc,VALUE * argv,VALUE self)5706 _wrap_librdf_free_storage(int argc, VALUE *argv, VALUE self) {
5707 librdf_storage *arg1 = (librdf_storage *) 0 ;
5708 void *argp1 = 0 ;
5709 int res1 = 0 ;
5710
5711 if ((argc < 1) || (argc > 1)) {
5712 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5713 }
5714 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_storage_s, 0 | 0 );
5715 if (!SWIG_IsOK(res1)) {
5716 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_storage *","librdf_free_storage", 1, argv[0] ));
5717 }
5718 arg1 = (librdf_storage *)(argp1);
5719 librdf_free_storage(arg1);
5720 return Qnil;
5721 fail:
5722 return Qnil;
5723 }
5724
5725
5726 SWIGINTERN VALUE
_wrap_librdf_parser_check_name(int argc,VALUE * argv,VALUE self)5727 _wrap_librdf_parser_check_name(int argc, VALUE *argv, VALUE self) {
5728 librdf_world *arg1 = (librdf_world *) 0 ;
5729 char *arg2 = (char *) 0 ;
5730 void *argp1 = 0 ;
5731 int res1 = 0 ;
5732 int res2 ;
5733 char *buf2 = 0 ;
5734 int alloc2 = 0 ;
5735 int result;
5736 VALUE vresult = Qnil;
5737
5738 if ((argc < 2) || (argc > 2)) {
5739 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5740 }
5741 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
5742 if (!SWIG_IsOK(res1)) {
5743 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_parser_check_name", 1, argv[0] ));
5744 }
5745 arg1 = (librdf_world *)(argp1);
5746 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
5747 if (!SWIG_IsOK(res2)) {
5748 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_parser_check_name", 2, argv[1] ));
5749 }
5750 arg2 = (char *)(buf2);
5751 result = (int)librdf_parser_check_name(arg1,(char const *)arg2);
5752 vresult = SWIG_From_int((int)(result));
5753 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5754 return vresult;
5755 fail:
5756 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5757 return Qnil;
5758 }
5759
5760
5761 SWIGINTERN VALUE
_wrap_librdf_new_parser(int argc,VALUE * argv,VALUE self)5762 _wrap_librdf_new_parser(int argc, VALUE *argv, VALUE self) {
5763 librdf_world *arg1 = (librdf_world *) 0 ;
5764 char *arg2 = (char *) 0 ;
5765 char *arg3 = (char *) 0 ;
5766 librdf_uri *arg4 = (librdf_uri *) 0 ;
5767 void *argp1 = 0 ;
5768 int res1 = 0 ;
5769 int res2 ;
5770 char *buf2 = 0 ;
5771 int alloc2 = 0 ;
5772 int res3 ;
5773 char *buf3 = 0 ;
5774 int alloc3 = 0 ;
5775 void *argp4 = 0 ;
5776 int res4 = 0 ;
5777 librdf_parser *result = 0 ;
5778 VALUE vresult = Qnil;
5779
5780 if ((argc < 4) || (argc > 4)) {
5781 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
5782 }
5783 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
5784 if (!SWIG_IsOK(res1)) {
5785 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_parser", 1, argv[0] ));
5786 }
5787 arg1 = (librdf_world *)(argp1);
5788 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
5789 if (!SWIG_IsOK(res2)) {
5790 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_new_parser", 2, argv[1] ));
5791 }
5792 arg2 = (char *)(buf2);
5793 res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
5794 if (!SWIG_IsOK(res3)) {
5795 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","librdf_new_parser", 3, argv[2] ));
5796 }
5797 arg3 = (char *)(buf3);
5798 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
5799 if (!SWIG_IsOK(res4)) {
5800 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_uri *","librdf_new_parser", 4, argv[3] ));
5801 }
5802 arg4 = (librdf_uri *)(argp4);
5803 result = (librdf_parser *)librdf_new_parser(arg1,(char const *)arg2,(char const *)arg3,arg4);
5804 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_parser_s, SWIG_POINTER_OWN | 0 );
5805 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5806 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5807 return vresult;
5808 fail:
5809 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5810 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
5811 return Qnil;
5812 }
5813
5814
5815 SWIGINTERN VALUE
_wrap_librdf_free_parser(int argc,VALUE * argv,VALUE self)5816 _wrap_librdf_free_parser(int argc, VALUE *argv, VALUE self) {
5817 librdf_parser *arg1 = (librdf_parser *) 0 ;
5818 void *argp1 = 0 ;
5819 int res1 = 0 ;
5820
5821 if ((argc < 1) || (argc > 1)) {
5822 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5823 }
5824 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
5825 if (!SWIG_IsOK(res1)) {
5826 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_free_parser", 1, argv[0] ));
5827 }
5828 arg1 = (librdf_parser *)(argp1);
5829 librdf_free_parser(arg1);
5830 return Qnil;
5831 fail:
5832 return Qnil;
5833 }
5834
5835
5836 SWIGINTERN VALUE
_wrap_librdf_parser_parse_as_stream(int argc,VALUE * argv,VALUE self)5837 _wrap_librdf_parser_parse_as_stream(int argc, VALUE *argv, VALUE self) {
5838 librdf_parser *arg1 = (librdf_parser *) 0 ;
5839 librdf_uri *arg2 = (librdf_uri *) 0 ;
5840 librdf_uri *arg3 = (librdf_uri *) NULL ;
5841 void *argp1 = 0 ;
5842 int res1 = 0 ;
5843 void *argp2 = 0 ;
5844 int res2 = 0 ;
5845 void *argp3 = 0 ;
5846 int res3 = 0 ;
5847 librdf_stream *result = 0 ;
5848 VALUE vresult = Qnil;
5849
5850 if ((argc < 2) || (argc > 3)) {
5851 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
5852 }
5853 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
5854 if (!SWIG_IsOK(res1)) {
5855 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_parser_parse_as_stream", 1, argv[0] ));
5856 }
5857 arg1 = (librdf_parser *)(argp1);
5858 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
5859 if (!SWIG_IsOK(res2)) {
5860 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_parser_parse_as_stream", 2, argv[1] ));
5861 }
5862 arg2 = (librdf_uri *)(argp2);
5863 if (argc > 2) {
5864 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
5865 if (!SWIG_IsOK(res3)) {
5866 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_uri *","librdf_parser_parse_as_stream", 3, argv[2] ));
5867 }
5868 arg3 = (librdf_uri *)(argp3);
5869 }
5870 result = (librdf_stream *)librdf_parser_parse_as_stream(arg1,arg2,arg3);
5871 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_stream_s, SWIG_POINTER_OWN | 0 );
5872 return vresult;
5873 fail:
5874 return Qnil;
5875 }
5876
5877
5878 SWIGINTERN VALUE
_wrap_librdf_parser_parse_into_model(int argc,VALUE * argv,VALUE self)5879 _wrap_librdf_parser_parse_into_model(int argc, VALUE *argv, VALUE self) {
5880 librdf_parser *arg1 = (librdf_parser *) 0 ;
5881 librdf_uri *arg2 = (librdf_uri *) 0 ;
5882 librdf_uri *arg3 = (librdf_uri *) 0 ;
5883 librdf_model *arg4 = (librdf_model *) 0 ;
5884 void *argp1 = 0 ;
5885 int res1 = 0 ;
5886 void *argp2 = 0 ;
5887 int res2 = 0 ;
5888 void *argp3 = 0 ;
5889 int res3 = 0 ;
5890 void *argp4 = 0 ;
5891 int res4 = 0 ;
5892 int result;
5893 VALUE vresult = Qnil;
5894
5895 if ((argc < 4) || (argc > 4)) {
5896 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
5897 }
5898 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
5899 if (!SWIG_IsOK(res1)) {
5900 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_parser_parse_into_model", 1, argv[0] ));
5901 }
5902 arg1 = (librdf_parser *)(argp1);
5903 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
5904 if (!SWIG_IsOK(res2)) {
5905 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_parser_parse_into_model", 2, argv[1] ));
5906 }
5907 arg2 = (librdf_uri *)(argp2);
5908 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
5909 if (!SWIG_IsOK(res3)) {
5910 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_uri *","librdf_parser_parse_into_model", 3, argv[2] ));
5911 }
5912 arg3 = (librdf_uri *)(argp3);
5913 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_model_s, 0 | 0 );
5914 if (!SWIG_IsOK(res4)) {
5915 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_model *","librdf_parser_parse_into_model", 4, argv[3] ));
5916 }
5917 arg4 = (librdf_model *)(argp4);
5918 result = (int)librdf_parser_parse_into_model(arg1,arg2,arg3,arg4);
5919 vresult = SWIG_From_int((int)(result));
5920 return vresult;
5921 fail:
5922 return Qnil;
5923 }
5924
5925
5926 SWIGINTERN VALUE
_wrap_librdf_parser_parse_string_as_stream(int argc,VALUE * argv,VALUE self)5927 _wrap_librdf_parser_parse_string_as_stream(int argc, VALUE *argv, VALUE self) {
5928 librdf_parser *arg1 = (librdf_parser *) 0 ;
5929 char *arg2 = (char *) 0 ;
5930 librdf_uri *arg3 = (librdf_uri *) 0 ;
5931 void *argp1 = 0 ;
5932 int res1 = 0 ;
5933 int res2 ;
5934 char *buf2 = 0 ;
5935 int alloc2 = 0 ;
5936 void *argp3 = 0 ;
5937 int res3 = 0 ;
5938 librdf_stream *result = 0 ;
5939 VALUE vresult = Qnil;
5940
5941 if ((argc < 3) || (argc > 3)) {
5942 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
5943 }
5944 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
5945 if (!SWIG_IsOK(res1)) {
5946 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_parser_parse_string_as_stream", 1, argv[0] ));
5947 }
5948 arg1 = (librdf_parser *)(argp1);
5949 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
5950 if (!SWIG_IsOK(res2)) {
5951 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_parser_parse_string_as_stream", 2, argv[1] ));
5952 }
5953 arg2 = (char *)(buf2);
5954 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
5955 if (!SWIG_IsOK(res3)) {
5956 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_uri *","librdf_parser_parse_string_as_stream", 3, argv[2] ));
5957 }
5958 arg3 = (librdf_uri *)(argp3);
5959 result = (librdf_stream *)librdf_parser_parse_string_as_stream(arg1,(char const *)arg2,arg3);
5960 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_stream_s, SWIG_POINTER_OWN | 0 );
5961 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5962 return vresult;
5963 fail:
5964 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5965 return Qnil;
5966 }
5967
5968
5969 SWIGINTERN VALUE
_wrap_librdf_parser_parse_string_into_model(int argc,VALUE * argv,VALUE self)5970 _wrap_librdf_parser_parse_string_into_model(int argc, VALUE *argv, VALUE self) {
5971 librdf_parser *arg1 = (librdf_parser *) 0 ;
5972 char *arg2 = (char *) 0 ;
5973 librdf_uri *arg3 = (librdf_uri *) 0 ;
5974 librdf_model *arg4 = (librdf_model *) 0 ;
5975 void *argp1 = 0 ;
5976 int res1 = 0 ;
5977 int res2 ;
5978 char *buf2 = 0 ;
5979 int alloc2 = 0 ;
5980 void *argp3 = 0 ;
5981 int res3 = 0 ;
5982 void *argp4 = 0 ;
5983 int res4 = 0 ;
5984 int result;
5985 VALUE vresult = Qnil;
5986
5987 if ((argc < 4) || (argc > 4)) {
5988 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
5989 }
5990 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
5991 if (!SWIG_IsOK(res1)) {
5992 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_parser_parse_string_into_model", 1, argv[0] ));
5993 }
5994 arg1 = (librdf_parser *)(argp1);
5995 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
5996 if (!SWIG_IsOK(res2)) {
5997 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_parser_parse_string_into_model", 2, argv[1] ));
5998 }
5999 arg2 = (char *)(buf2);
6000 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
6001 if (!SWIG_IsOK(res3)) {
6002 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_uri *","librdf_parser_parse_string_into_model", 3, argv[2] ));
6003 }
6004 arg3 = (librdf_uri *)(argp3);
6005 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_model_s, 0 | 0 );
6006 if (!SWIG_IsOK(res4)) {
6007 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_model *","librdf_parser_parse_string_into_model", 4, argv[3] ));
6008 }
6009 arg4 = (librdf_model *)(argp4);
6010 result = (int)librdf_parser_parse_string_into_model(arg1,(char const *)arg2,arg3,arg4);
6011 vresult = SWIG_From_int((int)(result));
6012 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6013 return vresult;
6014 fail:
6015 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6016 return Qnil;
6017 }
6018
6019
6020 SWIGINTERN VALUE
_wrap_librdf_parser_parse_counted_string_as_stream(int argc,VALUE * argv,VALUE self)6021 _wrap_librdf_parser_parse_counted_string_as_stream(int argc, VALUE *argv, VALUE self) {
6022 librdf_parser *arg1 = (librdf_parser *) 0 ;
6023 char *arg2 = (char *) 0 ;
6024 size_t arg3 ;
6025 librdf_uri *arg4 = (librdf_uri *) 0 ;
6026 void *argp1 = 0 ;
6027 int res1 = 0 ;
6028 int res2 ;
6029 char *buf2 = 0 ;
6030 int alloc2 = 0 ;
6031 size_t val3 ;
6032 int ecode3 = 0 ;
6033 void *argp4 = 0 ;
6034 int res4 = 0 ;
6035 librdf_stream *result = 0 ;
6036 VALUE vresult = Qnil;
6037
6038 if ((argc < 4) || (argc > 4)) {
6039 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
6040 }
6041 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
6042 if (!SWIG_IsOK(res1)) {
6043 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_parser_parse_counted_string_as_stream", 1, argv[0] ));
6044 }
6045 arg1 = (librdf_parser *)(argp1);
6046 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
6047 if (!SWIG_IsOK(res2)) {
6048 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_parser_parse_counted_string_as_stream", 2, argv[1] ));
6049 }
6050 arg2 = (char *)(buf2);
6051 ecode3 = SWIG_AsVal_size_t(argv[2], &val3);
6052 if (!SWIG_IsOK(ecode3)) {
6053 SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","librdf_parser_parse_counted_string_as_stream", 3, argv[2] ));
6054 }
6055 arg3 = (size_t)(val3);
6056 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
6057 if (!SWIG_IsOK(res4)) {
6058 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_uri *","librdf_parser_parse_counted_string_as_stream", 4, argv[3] ));
6059 }
6060 arg4 = (librdf_uri *)(argp4);
6061 result = (librdf_stream *)librdf_parser_parse_counted_string_as_stream(arg1,(char const *)arg2,arg3,arg4);
6062 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_stream_s, 0 | 0 );
6063 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6064 return vresult;
6065 fail:
6066 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6067 return Qnil;
6068 }
6069
6070
6071 SWIGINTERN VALUE
_wrap_librdf_parser_parse_counted_string_into_model(int argc,VALUE * argv,VALUE self)6072 _wrap_librdf_parser_parse_counted_string_into_model(int argc, VALUE *argv, VALUE self) {
6073 librdf_parser *arg1 = (librdf_parser *) 0 ;
6074 char *arg2 = (char *) 0 ;
6075 size_t arg3 ;
6076 librdf_uri *arg4 = (librdf_uri *) 0 ;
6077 librdf_model *arg5 = (librdf_model *) 0 ;
6078 void *argp1 = 0 ;
6079 int res1 = 0 ;
6080 int res2 ;
6081 char *buf2 = 0 ;
6082 int alloc2 = 0 ;
6083 size_t val3 ;
6084 int ecode3 = 0 ;
6085 void *argp4 = 0 ;
6086 int res4 = 0 ;
6087 void *argp5 = 0 ;
6088 int res5 = 0 ;
6089 int result;
6090 VALUE vresult = Qnil;
6091
6092 if ((argc < 5) || (argc > 5)) {
6093 rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
6094 }
6095 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
6096 if (!SWIG_IsOK(res1)) {
6097 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_parser_parse_counted_string_into_model", 1, argv[0] ));
6098 }
6099 arg1 = (librdf_parser *)(argp1);
6100 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
6101 if (!SWIG_IsOK(res2)) {
6102 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_parser_parse_counted_string_into_model", 2, argv[1] ));
6103 }
6104 arg2 = (char *)(buf2);
6105 ecode3 = SWIG_AsVal_size_t(argv[2], &val3);
6106 if (!SWIG_IsOK(ecode3)) {
6107 SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","librdf_parser_parse_counted_string_into_model", 3, argv[2] ));
6108 }
6109 arg3 = (size_t)(val3);
6110 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
6111 if (!SWIG_IsOK(res4)) {
6112 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_uri *","librdf_parser_parse_counted_string_into_model", 4, argv[3] ));
6113 }
6114 arg4 = (librdf_uri *)(argp4);
6115 res5 = SWIG_ConvertPtr(argv[4], &argp5,SWIGTYPE_p_librdf_model_s, 0 | 0 );
6116 if (!SWIG_IsOK(res5)) {
6117 SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "librdf_model *","librdf_parser_parse_counted_string_into_model", 5, argv[4] ));
6118 }
6119 arg5 = (librdf_model *)(argp5);
6120 result = (int)librdf_parser_parse_counted_string_into_model(arg1,(char const *)arg2,arg3,arg4,arg5);
6121 vresult = SWIG_From_int((int)(result));
6122 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6123 return vresult;
6124 fail:
6125 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6126 return Qnil;
6127 }
6128
6129
6130 SWIGINTERN VALUE
_wrap_librdf_parser_get_feature(int argc,VALUE * argv,VALUE self)6131 _wrap_librdf_parser_get_feature(int argc, VALUE *argv, VALUE self) {
6132 librdf_parser *arg1 = (librdf_parser *) 0 ;
6133 librdf_uri *arg2 = (librdf_uri *) 0 ;
6134 void *argp1 = 0 ;
6135 int res1 = 0 ;
6136 void *argp2 = 0 ;
6137 int res2 = 0 ;
6138 librdf_node *result = 0 ;
6139 VALUE vresult = Qnil;
6140
6141 if ((argc < 2) || (argc > 2)) {
6142 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6143 }
6144 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
6145 if (!SWIG_IsOK(res1)) {
6146 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_parser_get_feature", 1, argv[0] ));
6147 }
6148 arg1 = (librdf_parser *)(argp1);
6149 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
6150 if (!SWIG_IsOK(res2)) {
6151 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_parser_get_feature", 2, argv[1] ));
6152 }
6153 arg2 = (librdf_uri *)(argp2);
6154 result = (librdf_node *)librdf_parser_get_feature(arg1,arg2);
6155 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
6156 return vresult;
6157 fail:
6158 return Qnil;
6159 }
6160
6161
6162 SWIGINTERN VALUE
_wrap_librdf_parser_set_feature(int argc,VALUE * argv,VALUE self)6163 _wrap_librdf_parser_set_feature(int argc, VALUE *argv, VALUE self) {
6164 librdf_parser *arg1 = (librdf_parser *) 0 ;
6165 librdf_uri *arg2 = (librdf_uri *) 0 ;
6166 librdf_node *arg3 = (librdf_node *) 0 ;
6167 void *argp1 = 0 ;
6168 int res1 = 0 ;
6169 void *argp2 = 0 ;
6170 int res2 = 0 ;
6171 void *argp3 = 0 ;
6172 int res3 = 0 ;
6173 int result;
6174 VALUE vresult = Qnil;
6175
6176 if ((argc < 3) || (argc > 3)) {
6177 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
6178 }
6179 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
6180 if (!SWIG_IsOK(res1)) {
6181 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_parser_set_feature", 1, argv[0] ));
6182 }
6183 arg1 = (librdf_parser *)(argp1);
6184 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
6185 if (!SWIG_IsOK(res2)) {
6186 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_parser_set_feature", 2, argv[1] ));
6187 }
6188 arg2 = (librdf_uri *)(argp2);
6189 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
6190 if (!SWIG_IsOK(res3)) {
6191 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_parser_set_feature", 3, argv[2] ));
6192 }
6193 arg3 = (librdf_node *)(argp3);
6194 result = (int)librdf_parser_set_feature(arg1,arg2,arg3);
6195 vresult = SWIG_From_int((int)(result));
6196 return vresult;
6197 fail:
6198 return Qnil;
6199 }
6200
6201
6202 SWIGINTERN VALUE
_wrap_librdf_parser_guess_name(int argc,VALUE * argv,VALUE self)6203 _wrap_librdf_parser_guess_name(int argc, VALUE *argv, VALUE self) {
6204 char *arg1 = (char *) 0 ;
6205 char *arg2 = (char *) 0 ;
6206 char *arg3 = (char *) 0 ;
6207 int res1 ;
6208 char *buf1 = 0 ;
6209 int alloc1 = 0 ;
6210 int res2 ;
6211 char *buf2 = 0 ;
6212 int alloc2 = 0 ;
6213 int res3 ;
6214 char *buf3 = 0 ;
6215 int alloc3 = 0 ;
6216 char *result = 0 ;
6217 VALUE vresult = Qnil;
6218
6219 if ((argc < 3) || (argc > 3)) {
6220 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
6221 }
6222 res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
6223 if (!SWIG_IsOK(res1)) {
6224 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","librdf_parser_guess_name", 1, argv[0] ));
6225 }
6226 arg1 = (char *)(buf1);
6227 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
6228 if (!SWIG_IsOK(res2)) {
6229 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_parser_guess_name", 2, argv[1] ));
6230 }
6231 arg2 = (char *)(buf2);
6232 res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
6233 if (!SWIG_IsOK(res3)) {
6234 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","librdf_parser_guess_name", 3, argv[2] ));
6235 }
6236 arg3 = (char *)(buf3);
6237 result = (char *)librdf_parser_guess_name((char const *)arg1,(char const *)arg2,(char const *)arg3);
6238 vresult = SWIG_FromCharPtr((const char *)result);
6239 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
6240 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6241 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
6242 return vresult;
6243 fail:
6244 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
6245 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6246 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
6247 return Qnil;
6248 }
6249
6250
6251 SWIGINTERN VALUE
_wrap_librdf_parser_guess_name2(int argc,VALUE * argv,VALUE self)6252 _wrap_librdf_parser_guess_name2(int argc, VALUE *argv, VALUE self) {
6253 librdf_world *arg1 = (librdf_world *) 0 ;
6254 char *arg2 = (char *) 0 ;
6255 char *arg3 = (char *) 0 ;
6256 char *arg4 = (char *) 0 ;
6257 void *argp1 = 0 ;
6258 int res1 = 0 ;
6259 int res2 ;
6260 char *buf2 = 0 ;
6261 int alloc2 = 0 ;
6262 int res3 ;
6263 char *buf3 = 0 ;
6264 int alloc3 = 0 ;
6265 int res4 ;
6266 char *buf4 = 0 ;
6267 int alloc4 = 0 ;
6268 char *result = 0 ;
6269 VALUE vresult = Qnil;
6270
6271 if ((argc < 4) || (argc > 4)) {
6272 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
6273 }
6274 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
6275 if (!SWIG_IsOK(res1)) {
6276 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_parser_guess_name2", 1, argv[0] ));
6277 }
6278 arg1 = (librdf_world *)(argp1);
6279 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
6280 if (!SWIG_IsOK(res2)) {
6281 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_parser_guess_name2", 2, argv[1] ));
6282 }
6283 arg2 = (char *)(buf2);
6284 res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
6285 if (!SWIG_IsOK(res3)) {
6286 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","librdf_parser_guess_name2", 3, argv[2] ));
6287 }
6288 arg3 = (char *)(buf3);
6289 res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
6290 if (!SWIG_IsOK(res4)) {
6291 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","librdf_parser_guess_name2", 4, argv[3] ));
6292 }
6293 arg4 = (char *)(buf4);
6294 result = (char *)librdf_parser_guess_name2(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
6295 vresult = SWIG_FromCharPtr((const char *)result);
6296 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6297 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
6298 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
6299 return vresult;
6300 fail:
6301 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6302 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
6303 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
6304 return Qnil;
6305 }
6306
6307
6308 SWIGINTERN VALUE
_wrap_librdf_parser_get_namespaces_seen_prefix(int argc,VALUE * argv,VALUE self)6309 _wrap_librdf_parser_get_namespaces_seen_prefix(int argc, VALUE *argv, VALUE self) {
6310 librdf_parser *arg1 = (librdf_parser *) 0 ;
6311 int arg2 ;
6312 void *argp1 = 0 ;
6313 int res1 = 0 ;
6314 int val2 ;
6315 int ecode2 = 0 ;
6316 char *result = 0 ;
6317 VALUE vresult = Qnil;
6318
6319 if ((argc < 2) || (argc > 2)) {
6320 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6321 }
6322 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
6323 if (!SWIG_IsOK(res1)) {
6324 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_parser_get_namespaces_seen_prefix", 1, argv[0] ));
6325 }
6326 arg1 = (librdf_parser *)(argp1);
6327 ecode2 = SWIG_AsVal_int(argv[1], &val2);
6328 if (!SWIG_IsOK(ecode2)) {
6329 SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","librdf_parser_get_namespaces_seen_prefix", 2, argv[1] ));
6330 }
6331 arg2 = (int)(val2);
6332 result = (char *)librdf_parser_get_namespaces_seen_prefix(arg1,arg2);
6333 vresult = SWIG_FromCharPtr((const char *)result);
6334 return vresult;
6335 fail:
6336 return Qnil;
6337 }
6338
6339
6340 SWIGINTERN VALUE
_wrap_librdf_parser_get_namespaces_seen_uri(int argc,VALUE * argv,VALUE self)6341 _wrap_librdf_parser_get_namespaces_seen_uri(int argc, VALUE *argv, VALUE self) {
6342 librdf_parser *arg1 = (librdf_parser *) 0 ;
6343 int arg2 ;
6344 void *argp1 = 0 ;
6345 int res1 = 0 ;
6346 int val2 ;
6347 int ecode2 = 0 ;
6348 librdf_uri *result = 0 ;
6349 VALUE vresult = Qnil;
6350
6351 if ((argc < 2) || (argc > 2)) {
6352 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6353 }
6354 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
6355 if (!SWIG_IsOK(res1)) {
6356 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_parser_get_namespaces_seen_uri", 1, argv[0] ));
6357 }
6358 arg1 = (librdf_parser *)(argp1);
6359 ecode2 = SWIG_AsVal_int(argv[1], &val2);
6360 if (!SWIG_IsOK(ecode2)) {
6361 SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","librdf_parser_get_namespaces_seen_uri", 2, argv[1] ));
6362 }
6363 arg2 = (int)(val2);
6364 result = (librdf_uri *)librdf_parser_get_namespaces_seen_uri(arg1,arg2);
6365 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_uri_s, 0 | 0 );
6366 return vresult;
6367 fail:
6368 return Qnil;
6369 }
6370
6371
6372 SWIGINTERN VALUE
_wrap_librdf_parser_get_namespaces_seen_count(int argc,VALUE * argv,VALUE self)6373 _wrap_librdf_parser_get_namespaces_seen_count(int argc, VALUE *argv, VALUE self) {
6374 librdf_parser *arg1 = (librdf_parser *) 0 ;
6375 void *argp1 = 0 ;
6376 int res1 = 0 ;
6377 int result;
6378 VALUE vresult = Qnil;
6379
6380 if ((argc < 1) || (argc > 1)) {
6381 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6382 }
6383 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_parser_s, 0 | 0 );
6384 if (!SWIG_IsOK(res1)) {
6385 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_parser *","librdf_parser_get_namespaces_seen_count", 1, argv[0] ));
6386 }
6387 arg1 = (librdf_parser *)(argp1);
6388 result = (int)librdf_parser_get_namespaces_seen_count(arg1);
6389 vresult = SWIG_From_int((int)(result));
6390 return vresult;
6391 fail:
6392 return Qnil;
6393 }
6394
6395
6396 SWIGINTERN VALUE
_wrap_librdf_new_query(int argc,VALUE * argv,VALUE self)6397 _wrap_librdf_new_query(int argc, VALUE *argv, VALUE self) {
6398 librdf_world *arg1 = (librdf_world *) 0 ;
6399 char *arg2 = (char *) 0 ;
6400 librdf_uri *arg3 = (librdf_uri *) 0 ;
6401 char *arg4 = (char *) 0 ;
6402 librdf_uri *arg5 = (librdf_uri *) 0 ;
6403 void *argp1 = 0 ;
6404 int res1 = 0 ;
6405 int res2 ;
6406 char *buf2 = 0 ;
6407 int alloc2 = 0 ;
6408 void *argp3 = 0 ;
6409 int res3 = 0 ;
6410 int res4 ;
6411 char *buf4 = 0 ;
6412 int alloc4 = 0 ;
6413 void *argp5 = 0 ;
6414 int res5 = 0 ;
6415 librdf_query *result = 0 ;
6416 VALUE vresult = Qnil;
6417
6418 if ((argc < 5) || (argc > 5)) {
6419 rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
6420 }
6421 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
6422 if (!SWIG_IsOK(res1)) {
6423 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_query", 1, argv[0] ));
6424 }
6425 arg1 = (librdf_world *)(argp1);
6426 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
6427 if (!SWIG_IsOK(res2)) {
6428 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_new_query", 2, argv[1] ));
6429 }
6430 arg2 = (char *)(buf2);
6431 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
6432 if (!SWIG_IsOK(res3)) {
6433 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_uri *","librdf_new_query", 3, argv[2] ));
6434 }
6435 arg3 = (librdf_uri *)(argp3);
6436 res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
6437 if (!SWIG_IsOK(res4)) {
6438 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","librdf_new_query", 4, argv[3] ));
6439 }
6440 arg4 = (char *)(buf4);
6441 res5 = SWIG_ConvertPtr(argv[4], &argp5,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
6442 if (!SWIG_IsOK(res5)) {
6443 SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "librdf_uri *","librdf_new_query", 5, argv[4] ));
6444 }
6445 arg5 = (librdf_uri *)(argp5);
6446 result = (librdf_query *)librdf_new_query(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5);
6447 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_query, SWIG_POINTER_OWN | 0 );
6448 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6449 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
6450 return vresult;
6451 fail:
6452 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6453 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
6454 return Qnil;
6455 }
6456
6457
6458 SWIGINTERN VALUE
_wrap_librdf_new_query_from_query(int argc,VALUE * argv,VALUE self)6459 _wrap_librdf_new_query_from_query(int argc, VALUE *argv, VALUE self) {
6460 librdf_query *arg1 = (librdf_query *) 0 ;
6461 void *argp1 = 0 ;
6462 int res1 = 0 ;
6463 librdf_query *result = 0 ;
6464 VALUE vresult = Qnil;
6465
6466 if ((argc < 1) || (argc > 1)) {
6467 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6468 }
6469 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query, 0 | 0 );
6470 if (!SWIG_IsOK(res1)) {
6471 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query *","librdf_new_query_from_query", 1, argv[0] ));
6472 }
6473 arg1 = (librdf_query *)(argp1);
6474 result = (librdf_query *)librdf_new_query_from_query(arg1);
6475 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_query, SWIG_POINTER_OWN | 0 );
6476 return vresult;
6477 fail:
6478 return Qnil;
6479 }
6480
6481
6482 SWIGINTERN VALUE
_wrap_librdf_free_query(int argc,VALUE * argv,VALUE self)6483 _wrap_librdf_free_query(int argc, VALUE *argv, VALUE self) {
6484 librdf_query *arg1 = (librdf_query *) 0 ;
6485 void *argp1 = 0 ;
6486 int res1 = 0 ;
6487
6488 if ((argc < 1) || (argc > 1)) {
6489 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6490 }
6491 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query, 0 | 0 );
6492 if (!SWIG_IsOK(res1)) {
6493 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query *","librdf_free_query", 1, argv[0] ));
6494 }
6495 arg1 = (librdf_query *)(argp1);
6496 librdf_free_query(arg1);
6497 return Qnil;
6498 fail:
6499 return Qnil;
6500 }
6501
6502
6503 SWIGINTERN VALUE
_wrap_librdf_query_execute(int argc,VALUE * argv,VALUE self)6504 _wrap_librdf_query_execute(int argc, VALUE *argv, VALUE self) {
6505 librdf_query *arg1 = (librdf_query *) 0 ;
6506 librdf_model *arg2 = (librdf_model *) 0 ;
6507 void *argp1 = 0 ;
6508 int res1 = 0 ;
6509 void *argp2 = 0 ;
6510 int res2 = 0 ;
6511 librdf_query_results *result = 0 ;
6512 VALUE vresult = Qnil;
6513
6514 if ((argc < 2) || (argc > 2)) {
6515 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6516 }
6517 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query, 0 | 0 );
6518 if (!SWIG_IsOK(res1)) {
6519 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query *","librdf_query_execute", 1, argv[0] ));
6520 }
6521 arg1 = (librdf_query *)(argp1);
6522 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_model_s, 0 | 0 );
6523 if (!SWIG_IsOK(res2)) {
6524 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_model *","librdf_query_execute", 2, argv[1] ));
6525 }
6526 arg2 = (librdf_model *)(argp2);
6527 result = (librdf_query_results *)librdf_query_execute(arg1,arg2);
6528 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_query_results, SWIG_POINTER_OWN | 0 );
6529 return vresult;
6530 fail:
6531 return Qnil;
6532 }
6533
6534
6535 SWIGINTERN VALUE
_wrap_librdf_query_get_limit(int argc,VALUE * argv,VALUE self)6536 _wrap_librdf_query_get_limit(int argc, VALUE *argv, VALUE self) {
6537 librdf_query *arg1 = (librdf_query *) 0 ;
6538 void *argp1 = 0 ;
6539 int res1 = 0 ;
6540 int result;
6541 VALUE vresult = Qnil;
6542
6543 if ((argc < 1) || (argc > 1)) {
6544 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6545 }
6546 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query, 0 | 0 );
6547 if (!SWIG_IsOK(res1)) {
6548 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query *","librdf_query_get_limit", 1, argv[0] ));
6549 }
6550 arg1 = (librdf_query *)(argp1);
6551 result = (int)librdf_query_get_limit(arg1);
6552 vresult = SWIG_From_int((int)(result));
6553 return vresult;
6554 fail:
6555 return Qnil;
6556 }
6557
6558
6559 SWIGINTERN VALUE
_wrap_librdf_query_set_limit(int argc,VALUE * argv,VALUE self)6560 _wrap_librdf_query_set_limit(int argc, VALUE *argv, VALUE self) {
6561 librdf_query *arg1 = (librdf_query *) 0 ;
6562 int arg2 ;
6563 void *argp1 = 0 ;
6564 int res1 = 0 ;
6565 int val2 ;
6566 int ecode2 = 0 ;
6567 int result;
6568 VALUE vresult = Qnil;
6569
6570 if ((argc < 2) || (argc > 2)) {
6571 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6572 }
6573 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query, 0 | 0 );
6574 if (!SWIG_IsOK(res1)) {
6575 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query *","librdf_query_set_limit", 1, argv[0] ));
6576 }
6577 arg1 = (librdf_query *)(argp1);
6578 ecode2 = SWIG_AsVal_int(argv[1], &val2);
6579 if (!SWIG_IsOK(ecode2)) {
6580 SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","librdf_query_set_limit", 2, argv[1] ));
6581 }
6582 arg2 = (int)(val2);
6583 result = (int)librdf_query_set_limit(arg1,arg2);
6584 vresult = SWIG_From_int((int)(result));
6585 return vresult;
6586 fail:
6587 return Qnil;
6588 }
6589
6590
6591 SWIGINTERN VALUE
_wrap_librdf_query_get_offset(int argc,VALUE * argv,VALUE self)6592 _wrap_librdf_query_get_offset(int argc, VALUE *argv, VALUE self) {
6593 librdf_query *arg1 = (librdf_query *) 0 ;
6594 void *argp1 = 0 ;
6595 int res1 = 0 ;
6596 int result;
6597 VALUE vresult = Qnil;
6598
6599 if ((argc < 1) || (argc > 1)) {
6600 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6601 }
6602 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query, 0 | 0 );
6603 if (!SWIG_IsOK(res1)) {
6604 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query *","librdf_query_get_offset", 1, argv[0] ));
6605 }
6606 arg1 = (librdf_query *)(argp1);
6607 result = (int)librdf_query_get_offset(arg1);
6608 vresult = SWIG_From_int((int)(result));
6609 return vresult;
6610 fail:
6611 return Qnil;
6612 }
6613
6614
6615 SWIGINTERN VALUE
_wrap_librdf_query_set_offset(int argc,VALUE * argv,VALUE self)6616 _wrap_librdf_query_set_offset(int argc, VALUE *argv, VALUE self) {
6617 librdf_query *arg1 = (librdf_query *) 0 ;
6618 int arg2 ;
6619 void *argp1 = 0 ;
6620 int res1 = 0 ;
6621 int val2 ;
6622 int ecode2 = 0 ;
6623 int result;
6624 VALUE vresult = Qnil;
6625
6626 if ((argc < 2) || (argc > 2)) {
6627 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6628 }
6629 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query, 0 | 0 );
6630 if (!SWIG_IsOK(res1)) {
6631 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query *","librdf_query_set_offset", 1, argv[0] ));
6632 }
6633 arg1 = (librdf_query *)(argp1);
6634 ecode2 = SWIG_AsVal_int(argv[1], &val2);
6635 if (!SWIG_IsOK(ecode2)) {
6636 SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","librdf_query_set_offset", 2, argv[1] ));
6637 }
6638 arg2 = (int)(val2);
6639 result = (int)librdf_query_set_offset(arg1,arg2);
6640 vresult = SWIG_From_int((int)(result));
6641 return vresult;
6642 fail:
6643 return Qnil;
6644 }
6645
6646
6647 SWIGINTERN VALUE
_wrap_librdf_query_results_as_stream(int argc,VALUE * argv,VALUE self)6648 _wrap_librdf_query_results_as_stream(int argc, VALUE *argv, VALUE self) {
6649 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
6650 void *argp1 = 0 ;
6651 int res1 = 0 ;
6652 librdf_stream *result = 0 ;
6653 VALUE vresult = Qnil;
6654
6655 if ((argc < 1) || (argc > 1)) {
6656 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6657 }
6658 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
6659 if (!SWIG_IsOK(res1)) {
6660 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_as_stream", 1, argv[0] ));
6661 }
6662 arg1 = (librdf_query_results *)(argp1);
6663 result = (librdf_stream *)librdf_query_results_as_stream(arg1);
6664 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_stream_s, SWIG_POINTER_OWN | 0 );
6665 return vresult;
6666 fail:
6667 return Qnil;
6668 }
6669
6670
6671 SWIGINTERN VALUE
_wrap_librdf_query_results_get_count(int argc,VALUE * argv,VALUE self)6672 _wrap_librdf_query_results_get_count(int argc, VALUE *argv, VALUE self) {
6673 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
6674 void *argp1 = 0 ;
6675 int res1 = 0 ;
6676 int result;
6677 VALUE vresult = Qnil;
6678
6679 if ((argc < 1) || (argc > 1)) {
6680 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6681 }
6682 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
6683 if (!SWIG_IsOK(res1)) {
6684 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_get_count", 1, argv[0] ));
6685 }
6686 arg1 = (librdf_query_results *)(argp1);
6687 result = (int)librdf_query_results_get_count(arg1);
6688 vresult = SWIG_From_int((int)(result));
6689 return vresult;
6690 fail:
6691 return Qnil;
6692 }
6693
6694
6695 SWIGINTERN VALUE
_wrap_librdf_query_results_next(int argc,VALUE * argv,VALUE self)6696 _wrap_librdf_query_results_next(int argc, VALUE *argv, VALUE self) {
6697 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
6698 void *argp1 = 0 ;
6699 int res1 = 0 ;
6700 int result;
6701 VALUE vresult = Qnil;
6702
6703 if ((argc < 1) || (argc > 1)) {
6704 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6705 }
6706 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
6707 if (!SWIG_IsOK(res1)) {
6708 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_next", 1, argv[0] ));
6709 }
6710 arg1 = (librdf_query_results *)(argp1);
6711 result = (int)librdf_query_results_next(arg1);
6712 vresult = SWIG_From_int((int)(result));
6713 return vresult;
6714 fail:
6715 return Qnil;
6716 }
6717
6718
6719 SWIGINTERN VALUE
_wrap_librdf_query_results_finished(int argc,VALUE * argv,VALUE self)6720 _wrap_librdf_query_results_finished(int argc, VALUE *argv, VALUE self) {
6721 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
6722 void *argp1 = 0 ;
6723 int res1 = 0 ;
6724 int result;
6725 VALUE vresult = Qnil;
6726
6727 if ((argc < 1) || (argc > 1)) {
6728 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6729 }
6730 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
6731 if (!SWIG_IsOK(res1)) {
6732 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_finished", 1, argv[0] ));
6733 }
6734 arg1 = (librdf_query_results *)(argp1);
6735 result = (int)librdf_query_results_finished(arg1);
6736 vresult = SWIG_From_int((int)(result));
6737 return vresult;
6738 fail:
6739 return Qnil;
6740 }
6741
6742
6743 SWIGINTERN VALUE
_wrap_librdf_query_results_get_binding_value(int argc,VALUE * argv,VALUE self)6744 _wrap_librdf_query_results_get_binding_value(int argc, VALUE *argv, VALUE self) {
6745 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
6746 int arg2 ;
6747 void *argp1 = 0 ;
6748 int res1 = 0 ;
6749 int val2 ;
6750 int ecode2 = 0 ;
6751 librdf_node *result = 0 ;
6752 VALUE vresult = Qnil;
6753
6754 if ((argc < 2) || (argc > 2)) {
6755 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6756 }
6757 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
6758 if (!SWIG_IsOK(res1)) {
6759 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_get_binding_value", 1, argv[0] ));
6760 }
6761 arg1 = (librdf_query_results *)(argp1);
6762 ecode2 = SWIG_AsVal_int(argv[1], &val2);
6763 if (!SWIG_IsOK(ecode2)) {
6764 SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","librdf_query_results_get_binding_value", 2, argv[1] ));
6765 }
6766 arg2 = (int)(val2);
6767 result = (librdf_node *)librdf_query_results_get_binding_value(arg1,arg2);
6768 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
6769 return vresult;
6770 fail:
6771 return Qnil;
6772 }
6773
6774
6775 SWIGINTERN VALUE
_wrap_librdf_query_results_get_binding_name(int argc,VALUE * argv,VALUE self)6776 _wrap_librdf_query_results_get_binding_name(int argc, VALUE *argv, VALUE self) {
6777 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
6778 int arg2 ;
6779 void *argp1 = 0 ;
6780 int res1 = 0 ;
6781 int val2 ;
6782 int ecode2 = 0 ;
6783 char *result = 0 ;
6784 VALUE vresult = Qnil;
6785
6786 if ((argc < 2) || (argc > 2)) {
6787 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6788 }
6789 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
6790 if (!SWIG_IsOK(res1)) {
6791 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_get_binding_name", 1, argv[0] ));
6792 }
6793 arg1 = (librdf_query_results *)(argp1);
6794 ecode2 = SWIG_AsVal_int(argv[1], &val2);
6795 if (!SWIG_IsOK(ecode2)) {
6796 SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","librdf_query_results_get_binding_name", 2, argv[1] ));
6797 }
6798 arg2 = (int)(val2);
6799 result = (char *)librdf_query_results_get_binding_name(arg1,arg2);
6800 vresult = SWIG_FromCharPtr((const char *)result);
6801 return vresult;
6802 fail:
6803 return Qnil;
6804 }
6805
6806
6807 SWIGINTERN VALUE
_wrap_librdf_query_results_get_binding_value_by_name(int argc,VALUE * argv,VALUE self)6808 _wrap_librdf_query_results_get_binding_value_by_name(int argc, VALUE *argv, VALUE self) {
6809 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
6810 char *arg2 = (char *) 0 ;
6811 void *argp1 = 0 ;
6812 int res1 = 0 ;
6813 int res2 ;
6814 char *buf2 = 0 ;
6815 int alloc2 = 0 ;
6816 librdf_node *result = 0 ;
6817 VALUE vresult = Qnil;
6818
6819 if ((argc < 2) || (argc > 2)) {
6820 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
6821 }
6822 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
6823 if (!SWIG_IsOK(res1)) {
6824 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_get_binding_value_by_name", 1, argv[0] ));
6825 }
6826 arg1 = (librdf_query_results *)(argp1);
6827 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
6828 if (!SWIG_IsOK(res2)) {
6829 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_query_results_get_binding_value_by_name", 2, argv[1] ));
6830 }
6831 arg2 = (char *)(buf2);
6832 result = (librdf_node *)librdf_query_results_get_binding_value_by_name(arg1,(char const *)arg2);
6833 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, SWIG_POINTER_OWN | 0 );
6834 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6835 return vresult;
6836 fail:
6837 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6838 return Qnil;
6839 }
6840
6841
6842 SWIGINTERN VALUE
_wrap_librdf_query_results_get_bindings_count(int argc,VALUE * argv,VALUE self)6843 _wrap_librdf_query_results_get_bindings_count(int argc, VALUE *argv, VALUE self) {
6844 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
6845 void *argp1 = 0 ;
6846 int res1 = 0 ;
6847 int result;
6848 VALUE vresult = Qnil;
6849
6850 if ((argc < 1) || (argc > 1)) {
6851 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
6852 }
6853 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
6854 if (!SWIG_IsOK(res1)) {
6855 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_get_bindings_count", 1, argv[0] ));
6856 }
6857 arg1 = (librdf_query_results *)(argp1);
6858 result = (int)librdf_query_results_get_bindings_count(arg1);
6859 vresult = SWIG_From_int((int)(result));
6860 return vresult;
6861 fail:
6862 return Qnil;
6863 }
6864
6865
6866 SWIGINTERN VALUE
_wrap_librdf_query_results_to_file(int argc,VALUE * argv,VALUE self)6867 _wrap_librdf_query_results_to_file(int argc, VALUE *argv, VALUE self) {
6868 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
6869 char *arg2 = (char *) 0 ;
6870 librdf_uri *arg3 = (librdf_uri *) 0 ;
6871 librdf_uri *arg4 = (librdf_uri *) 0 ;
6872 void *argp1 = 0 ;
6873 int res1 = 0 ;
6874 int res2 ;
6875 char *buf2 = 0 ;
6876 int alloc2 = 0 ;
6877 void *argp3 = 0 ;
6878 int res3 = 0 ;
6879 void *argp4 = 0 ;
6880 int res4 = 0 ;
6881 int result;
6882 VALUE vresult = Qnil;
6883
6884 if ((argc < 4) || (argc > 4)) {
6885 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
6886 }
6887 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
6888 if (!SWIG_IsOK(res1)) {
6889 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_to_file", 1, argv[0] ));
6890 }
6891 arg1 = (librdf_query_results *)(argp1);
6892 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
6893 if (!SWIG_IsOK(res2)) {
6894 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_query_results_to_file", 2, argv[1] ));
6895 }
6896 arg2 = (char *)(buf2);
6897 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
6898 if (!SWIG_IsOK(res3)) {
6899 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_uri *","librdf_query_results_to_file", 3, argv[2] ));
6900 }
6901 arg3 = (librdf_uri *)(argp3);
6902 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
6903 if (!SWIG_IsOK(res4)) {
6904 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_uri *","librdf_query_results_to_file", 4, argv[3] ));
6905 }
6906 arg4 = (librdf_uri *)(argp4);
6907 result = (int)librdf_query_results_to_file(arg1,(char const *)arg2,arg3,arg4);
6908 vresult = SWIG_From_int((int)(result));
6909 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6910 return vresult;
6911 fail:
6912 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6913 return Qnil;
6914 }
6915
6916
6917 SWIGINTERN VALUE
_wrap_librdf_query_results_to_file2(int argc,VALUE * argv,VALUE self)6918 _wrap_librdf_query_results_to_file2(int argc, VALUE *argv, VALUE self) {
6919 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
6920 char *arg2 = (char *) 0 ;
6921 char *arg3 = (char *) 0 ;
6922 librdf_uri *arg4 = (librdf_uri *) 0 ;
6923 librdf_uri *arg5 = (librdf_uri *) 0 ;
6924 void *argp1 = 0 ;
6925 int res1 = 0 ;
6926 int res2 ;
6927 char *buf2 = 0 ;
6928 int alloc2 = 0 ;
6929 int res3 ;
6930 char *buf3 = 0 ;
6931 int alloc3 = 0 ;
6932 void *argp4 = 0 ;
6933 int res4 = 0 ;
6934 void *argp5 = 0 ;
6935 int res5 = 0 ;
6936 int result;
6937 VALUE vresult = Qnil;
6938
6939 if ((argc < 5) || (argc > 5)) {
6940 rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
6941 }
6942 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
6943 if (!SWIG_IsOK(res1)) {
6944 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_to_file2", 1, argv[0] ));
6945 }
6946 arg1 = (librdf_query_results *)(argp1);
6947 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
6948 if (!SWIG_IsOK(res2)) {
6949 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_query_results_to_file2", 2, argv[1] ));
6950 }
6951 arg2 = (char *)(buf2);
6952 res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
6953 if (!SWIG_IsOK(res3)) {
6954 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","librdf_query_results_to_file2", 3, argv[2] ));
6955 }
6956 arg3 = (char *)(buf3);
6957 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
6958 if (!SWIG_IsOK(res4)) {
6959 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_uri *","librdf_query_results_to_file2", 4, argv[3] ));
6960 }
6961 arg4 = (librdf_uri *)(argp4);
6962 res5 = SWIG_ConvertPtr(argv[4], &argp5,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
6963 if (!SWIG_IsOK(res5)) {
6964 SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "librdf_uri *","librdf_query_results_to_file2", 5, argv[4] ));
6965 }
6966 arg5 = (librdf_uri *)(argp5);
6967 result = (int)librdf_query_results_to_file2(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
6968 vresult = SWIG_From_int((int)(result));
6969 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6970 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
6971 return vresult;
6972 fail:
6973 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
6974 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
6975 return Qnil;
6976 }
6977
6978
6979 SWIGINTERN VALUE
_wrap_librdf_query_results_to_string(int argc,VALUE * argv,VALUE self)6980 _wrap_librdf_query_results_to_string(int argc, VALUE *argv, VALUE self) {
6981 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
6982 librdf_uri *arg2 = (librdf_uri *) 0 ;
6983 librdf_uri *arg3 = (librdf_uri *) 0 ;
6984 void *argp1 = 0 ;
6985 int res1 = 0 ;
6986 void *argp2 = 0 ;
6987 int res2 = 0 ;
6988 void *argp3 = 0 ;
6989 int res3 = 0 ;
6990 char *result = 0 ;
6991 VALUE vresult = Qnil;
6992
6993 if ((argc < 3) || (argc > 3)) {
6994 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
6995 }
6996 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
6997 if (!SWIG_IsOK(res1)) {
6998 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_to_string", 1, argv[0] ));
6999 }
7000 arg1 = (librdf_query_results *)(argp1);
7001 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
7002 if (!SWIG_IsOK(res2)) {
7003 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_query_results_to_string", 2, argv[1] ));
7004 }
7005 arg2 = (librdf_uri *)(argp2);
7006 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
7007 if (!SWIG_IsOK(res3)) {
7008 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_uri *","librdf_query_results_to_string", 3, argv[2] ));
7009 }
7010 arg3 = (librdf_uri *)(argp3);
7011 result = (char *)librdf_query_results_to_string(arg1,arg2,arg3);
7012 {
7013 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
7014 }
7015 free((char*)result);
7016 return vresult;
7017 fail:
7018 return Qnil;
7019 }
7020
7021
7022 SWIGINTERN VALUE
_wrap_librdf_query_results_to_string2(int argc,VALUE * argv,VALUE self)7023 _wrap_librdf_query_results_to_string2(int argc, VALUE *argv, VALUE self) {
7024 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
7025 char *arg2 = (char *) 0 ;
7026 char *arg3 = (char *) 0 ;
7027 librdf_uri *arg4 = (librdf_uri *) 0 ;
7028 librdf_uri *arg5 = (librdf_uri *) 0 ;
7029 void *argp1 = 0 ;
7030 int res1 = 0 ;
7031 int res2 ;
7032 char *buf2 = 0 ;
7033 int alloc2 = 0 ;
7034 int res3 ;
7035 char *buf3 = 0 ;
7036 int alloc3 = 0 ;
7037 void *argp4 = 0 ;
7038 int res4 = 0 ;
7039 void *argp5 = 0 ;
7040 int res5 = 0 ;
7041 char *result = 0 ;
7042 VALUE vresult = Qnil;
7043
7044 if ((argc < 5) || (argc > 5)) {
7045 rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
7046 }
7047 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
7048 if (!SWIG_IsOK(res1)) {
7049 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_to_string2", 1, argv[0] ));
7050 }
7051 arg1 = (librdf_query_results *)(argp1);
7052 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
7053 if (!SWIG_IsOK(res2)) {
7054 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_query_results_to_string2", 2, argv[1] ));
7055 }
7056 arg2 = (char *)(buf2);
7057 res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
7058 if (!SWIG_IsOK(res3)) {
7059 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","librdf_query_results_to_string2", 3, argv[2] ));
7060 }
7061 arg3 = (char *)(buf3);
7062 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
7063 if (!SWIG_IsOK(res4)) {
7064 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_uri *","librdf_query_results_to_string2", 4, argv[3] ));
7065 }
7066 arg4 = (librdf_uri *)(argp4);
7067 res5 = SWIG_ConvertPtr(argv[4], &argp5,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
7068 if (!SWIG_IsOK(res5)) {
7069 SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "librdf_uri *","librdf_query_results_to_string2", 5, argv[4] ));
7070 }
7071 arg5 = (librdf_uri *)(argp5);
7072 result = (char *)librdf_query_results_to_string2(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
7073 {
7074 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
7075 }
7076 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7077 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
7078 free((char*)result);
7079 return vresult;
7080 fail:
7081 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7082 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
7083 return Qnil;
7084 }
7085
7086
7087 SWIGINTERN VALUE
_wrap_librdf_free_query_results(int argc,VALUE * argv,VALUE self)7088 _wrap_librdf_free_query_results(int argc, VALUE *argv, VALUE self) {
7089 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
7090 void *argp1 = 0 ;
7091 int res1 = 0 ;
7092
7093 if ((argc < 1) || (argc > 1)) {
7094 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7095 }
7096 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
7097 if (!SWIG_IsOK(res1)) {
7098 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_free_query_results", 1, argv[0] ));
7099 }
7100 arg1 = (librdf_query_results *)(argp1);
7101 librdf_free_query_results(arg1);
7102 return Qnil;
7103 fail:
7104 return Qnil;
7105 }
7106
7107
7108 SWIGINTERN VALUE
_wrap_librdf_query_results_is_bindings(int argc,VALUE * argv,VALUE self)7109 _wrap_librdf_query_results_is_bindings(int argc, VALUE *argv, VALUE self) {
7110 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
7111 void *argp1 = 0 ;
7112 int res1 = 0 ;
7113 int result;
7114 VALUE vresult = Qnil;
7115
7116 if ((argc < 1) || (argc > 1)) {
7117 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7118 }
7119 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
7120 if (!SWIG_IsOK(res1)) {
7121 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_is_bindings", 1, argv[0] ));
7122 }
7123 arg1 = (librdf_query_results *)(argp1);
7124 result = (int)librdf_query_results_is_bindings(arg1);
7125 vresult = SWIG_From_int((int)(result));
7126 return vresult;
7127 fail:
7128 return Qnil;
7129 }
7130
7131
7132 SWIGINTERN VALUE
_wrap_librdf_query_results_is_boolean(int argc,VALUE * argv,VALUE self)7133 _wrap_librdf_query_results_is_boolean(int argc, VALUE *argv, VALUE self) {
7134 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
7135 void *argp1 = 0 ;
7136 int res1 = 0 ;
7137 int result;
7138 VALUE vresult = Qnil;
7139
7140 if ((argc < 1) || (argc > 1)) {
7141 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7142 }
7143 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
7144 if (!SWIG_IsOK(res1)) {
7145 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_is_boolean", 1, argv[0] ));
7146 }
7147 arg1 = (librdf_query_results *)(argp1);
7148 result = (int)librdf_query_results_is_boolean(arg1);
7149 vresult = SWIG_From_int((int)(result));
7150 return vresult;
7151 fail:
7152 return Qnil;
7153 }
7154
7155
7156 SWIGINTERN VALUE
_wrap_librdf_query_results_is_graph(int argc,VALUE * argv,VALUE self)7157 _wrap_librdf_query_results_is_graph(int argc, VALUE *argv, VALUE self) {
7158 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
7159 void *argp1 = 0 ;
7160 int res1 = 0 ;
7161 int result;
7162 VALUE vresult = Qnil;
7163
7164 if ((argc < 1) || (argc > 1)) {
7165 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7166 }
7167 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
7168 if (!SWIG_IsOK(res1)) {
7169 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_is_graph", 1, argv[0] ));
7170 }
7171 arg1 = (librdf_query_results *)(argp1);
7172 result = (int)librdf_query_results_is_graph(arg1);
7173 vresult = SWIG_From_int((int)(result));
7174 return vresult;
7175 fail:
7176 return Qnil;
7177 }
7178
7179
7180 SWIGINTERN VALUE
_wrap_librdf_query_results_is_syntax(int argc,VALUE * argv,VALUE self)7181 _wrap_librdf_query_results_is_syntax(int argc, VALUE *argv, VALUE self) {
7182 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
7183 void *argp1 = 0 ;
7184 int res1 = 0 ;
7185 int result;
7186 VALUE vresult = Qnil;
7187
7188 if ((argc < 1) || (argc > 1)) {
7189 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7190 }
7191 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
7192 if (!SWIG_IsOK(res1)) {
7193 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_is_syntax", 1, argv[0] ));
7194 }
7195 arg1 = (librdf_query_results *)(argp1);
7196 result = (int)librdf_query_results_is_syntax(arg1);
7197 vresult = SWIG_From_int((int)(result));
7198 return vresult;
7199 fail:
7200 return Qnil;
7201 }
7202
7203
7204 SWIGINTERN VALUE
_wrap_librdf_query_results_get_boolean(int argc,VALUE * argv,VALUE self)7205 _wrap_librdf_query_results_get_boolean(int argc, VALUE *argv, VALUE self) {
7206 librdf_query_results *arg1 = (librdf_query_results *) 0 ;
7207 void *argp1 = 0 ;
7208 int res1 = 0 ;
7209 int result;
7210 VALUE vresult = Qnil;
7211
7212 if ((argc < 1) || (argc > 1)) {
7213 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7214 }
7215 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_query_results, 0 | 0 );
7216 if (!SWIG_IsOK(res1)) {
7217 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_query_results *","librdf_query_results_get_boolean", 1, argv[0] ));
7218 }
7219 arg1 = (librdf_query_results *)(argp1);
7220 result = (int)librdf_query_results_get_boolean(arg1);
7221 vresult = SWIG_From_int((int)(result));
7222 return vresult;
7223 fail:
7224 return Qnil;
7225 }
7226
7227
7228 SWIGINTERN VALUE
_wrap_librdf_serializer_check_name(int argc,VALUE * argv,VALUE self)7229 _wrap_librdf_serializer_check_name(int argc, VALUE *argv, VALUE self) {
7230 librdf_world *arg1 = (librdf_world *) 0 ;
7231 char *arg2 = (char *) 0 ;
7232 void *argp1 = 0 ;
7233 int res1 = 0 ;
7234 int res2 ;
7235 char *buf2 = 0 ;
7236 int alloc2 = 0 ;
7237 int result;
7238 VALUE vresult = Qnil;
7239
7240 if ((argc < 2) || (argc > 2)) {
7241 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7242 }
7243 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
7244 if (!SWIG_IsOK(res1)) {
7245 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_serializer_check_name", 1, argv[0] ));
7246 }
7247 arg1 = (librdf_world *)(argp1);
7248 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
7249 if (!SWIG_IsOK(res2)) {
7250 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_serializer_check_name", 2, argv[1] ));
7251 }
7252 arg2 = (char *)(buf2);
7253 result = (int)librdf_serializer_check_name(arg1,(char const *)arg2);
7254 vresult = SWIG_From_int((int)(result));
7255 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7256 return vresult;
7257 fail:
7258 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7259 return Qnil;
7260 }
7261
7262
7263 SWIGINTERN VALUE
_wrap_librdf_new_serializer(int argc,VALUE * argv,VALUE self)7264 _wrap_librdf_new_serializer(int argc, VALUE *argv, VALUE self) {
7265 librdf_world *arg1 = (librdf_world *) 0 ;
7266 char *arg2 = (char *) 0 ;
7267 char *arg3 = (char *) 0 ;
7268 librdf_uri *arg4 = (librdf_uri *) 0 ;
7269 void *argp1 = 0 ;
7270 int res1 = 0 ;
7271 int res2 ;
7272 char *buf2 = 0 ;
7273 int alloc2 = 0 ;
7274 int res3 ;
7275 char *buf3 = 0 ;
7276 int alloc3 = 0 ;
7277 void *argp4 = 0 ;
7278 int res4 = 0 ;
7279 librdf_serializer *result = 0 ;
7280 VALUE vresult = Qnil;
7281
7282 if ((argc < 4) || (argc > 4)) {
7283 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
7284 }
7285 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
7286 if (!SWIG_IsOK(res1)) {
7287 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_serializer", 1, argv[0] ));
7288 }
7289 arg1 = (librdf_world *)(argp1);
7290 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
7291 if (!SWIG_IsOK(res2)) {
7292 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_new_serializer", 2, argv[1] ));
7293 }
7294 arg2 = (char *)(buf2);
7295 res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
7296 if (!SWIG_IsOK(res3)) {
7297 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","librdf_new_serializer", 3, argv[2] ));
7298 }
7299 arg3 = (char *)(buf3);
7300 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
7301 if (!SWIG_IsOK(res4)) {
7302 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_uri *","librdf_new_serializer", 4, argv[3] ));
7303 }
7304 arg4 = (librdf_uri *)(argp4);
7305 result = (librdf_serializer *)librdf_new_serializer(arg1,(char const *)arg2,(char const *)arg3,arg4);
7306 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_serializer_s, SWIG_POINTER_OWN | 0 );
7307 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7308 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
7309 return vresult;
7310 fail:
7311 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7312 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
7313 return Qnil;
7314 }
7315
7316
7317 SWIGINTERN VALUE
_wrap_librdf_free_serializer(int argc,VALUE * argv,VALUE self)7318 _wrap_librdf_free_serializer(int argc, VALUE *argv, VALUE self) {
7319 librdf_serializer *arg1 = (librdf_serializer *) 0 ;
7320 void *argp1 = 0 ;
7321 int res1 = 0 ;
7322
7323 if ((argc < 1) || (argc > 1)) {
7324 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7325 }
7326 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_serializer_s, 0 | 0 );
7327 if (!SWIG_IsOK(res1)) {
7328 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_serializer *","librdf_free_serializer", 1, argv[0] ));
7329 }
7330 arg1 = (librdf_serializer *)(argp1);
7331 librdf_free_serializer(arg1);
7332 return Qnil;
7333 fail:
7334 return Qnil;
7335 }
7336
7337
7338 SWIGINTERN VALUE
_wrap_librdf_serializer_serialize_stream_to_file(int argc,VALUE * argv,VALUE self)7339 _wrap_librdf_serializer_serialize_stream_to_file(int argc, VALUE *argv, VALUE self) {
7340 librdf_serializer *arg1 = (librdf_serializer *) 0 ;
7341 char *arg2 = (char *) 0 ;
7342 librdf_uri *arg3 = (librdf_uri *) 0 ;
7343 librdf_stream *arg4 = (librdf_stream *) 0 ;
7344 void *argp1 = 0 ;
7345 int res1 = 0 ;
7346 int res2 ;
7347 char *buf2 = 0 ;
7348 int alloc2 = 0 ;
7349 void *argp3 = 0 ;
7350 int res3 = 0 ;
7351 void *argp4 = 0 ;
7352 int res4 = 0 ;
7353 int result;
7354 VALUE vresult = Qnil;
7355
7356 if ((argc < 4) || (argc > 4)) {
7357 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
7358 }
7359 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_serializer_s, 0 | 0 );
7360 if (!SWIG_IsOK(res1)) {
7361 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_serializer *","librdf_serializer_serialize_stream_to_file", 1, argv[0] ));
7362 }
7363 arg1 = (librdf_serializer *)(argp1);
7364 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
7365 if (!SWIG_IsOK(res2)) {
7366 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_serializer_serialize_stream_to_file", 2, argv[1] ));
7367 }
7368 arg2 = (char *)(buf2);
7369 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
7370 if (!SWIG_IsOK(res3)) {
7371 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_uri *","librdf_serializer_serialize_stream_to_file", 3, argv[2] ));
7372 }
7373 arg3 = (librdf_uri *)(argp3);
7374 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_stream_s, 0 | 0 );
7375 if (!SWIG_IsOK(res4)) {
7376 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_stream *","librdf_serializer_serialize_stream_to_file", 4, argv[3] ));
7377 }
7378 arg4 = (librdf_stream *)(argp4);
7379 result = (int)librdf_serializer_serialize_stream_to_file(arg1,(char const *)arg2,arg3,arg4);
7380 vresult = SWIG_From_int((int)(result));
7381 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7382 return vresult;
7383 fail:
7384 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7385 return Qnil;
7386 }
7387
7388
7389 SWIGINTERN VALUE
_wrap_librdf_serializer_serialize_model_to_file(int argc,VALUE * argv,VALUE self)7390 _wrap_librdf_serializer_serialize_model_to_file(int argc, VALUE *argv, VALUE self) {
7391 librdf_serializer *arg1 = (librdf_serializer *) 0 ;
7392 char *arg2 = (char *) 0 ;
7393 librdf_uri *arg3 = (librdf_uri *) 0 ;
7394 librdf_model *arg4 = (librdf_model *) 0 ;
7395 void *argp1 = 0 ;
7396 int res1 = 0 ;
7397 int res2 ;
7398 char *buf2 = 0 ;
7399 int alloc2 = 0 ;
7400 void *argp3 = 0 ;
7401 int res3 = 0 ;
7402 void *argp4 = 0 ;
7403 int res4 = 0 ;
7404 int result;
7405 VALUE vresult = Qnil;
7406
7407 if ((argc < 4) || (argc > 4)) {
7408 rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
7409 }
7410 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_serializer_s, 0 | 0 );
7411 if (!SWIG_IsOK(res1)) {
7412 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_serializer *","librdf_serializer_serialize_model_to_file", 1, argv[0] ));
7413 }
7414 arg1 = (librdf_serializer *)(argp1);
7415 res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
7416 if (!SWIG_IsOK(res2)) {
7417 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_serializer_serialize_model_to_file", 2, argv[1] ));
7418 }
7419 arg2 = (char *)(buf2);
7420 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
7421 if (!SWIG_IsOK(res3)) {
7422 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_uri *","librdf_serializer_serialize_model_to_file", 3, argv[2] ));
7423 }
7424 arg3 = (librdf_uri *)(argp3);
7425 res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_librdf_model_s, 0 | 0 );
7426 if (!SWIG_IsOK(res4)) {
7427 SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "librdf_model *","librdf_serializer_serialize_model_to_file", 4, argv[3] ));
7428 }
7429 arg4 = (librdf_model *)(argp4);
7430 result = (int)librdf_serializer_serialize_model_to_file(arg1,(char const *)arg2,arg3,arg4);
7431 vresult = SWIG_From_int((int)(result));
7432 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7433 return vresult;
7434 fail:
7435 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
7436 return Qnil;
7437 }
7438
7439
7440 SWIGINTERN VALUE
_wrap_librdf_serializer_serialize_stream_to_string(int argc,VALUE * argv,VALUE self)7441 _wrap_librdf_serializer_serialize_stream_to_string(int argc, VALUE *argv, VALUE self) {
7442 librdf_serializer *arg1 = (librdf_serializer *) 0 ;
7443 librdf_uri *arg2 = (librdf_uri *) 0 ;
7444 librdf_stream *arg3 = (librdf_stream *) 0 ;
7445 void *argp1 = 0 ;
7446 int res1 = 0 ;
7447 void *argp2 = 0 ;
7448 int res2 = 0 ;
7449 void *argp3 = 0 ;
7450 int res3 = 0 ;
7451 char *result = 0 ;
7452 VALUE vresult = Qnil;
7453
7454 if ((argc < 3) || (argc > 3)) {
7455 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
7456 }
7457 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_serializer_s, 0 | 0 );
7458 if (!SWIG_IsOK(res1)) {
7459 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_serializer *","librdf_serializer_serialize_stream_to_string", 1, argv[0] ));
7460 }
7461 arg1 = (librdf_serializer *)(argp1);
7462 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
7463 if (!SWIG_IsOK(res2)) {
7464 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_serializer_serialize_stream_to_string", 2, argv[1] ));
7465 }
7466 arg2 = (librdf_uri *)(argp2);
7467 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_stream_s, 0 | 0 );
7468 if (!SWIG_IsOK(res3)) {
7469 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_stream *","librdf_serializer_serialize_stream_to_string", 3, argv[2] ));
7470 }
7471 arg3 = (librdf_stream *)(argp3);
7472 result = (char *)librdf_serializer_serialize_stream_to_string(arg1,arg2,arg3);
7473 {
7474 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
7475 }
7476 free((char*)result);
7477 return vresult;
7478 fail:
7479 return Qnil;
7480 }
7481
7482
7483 SWIGINTERN VALUE
_wrap_librdf_serializer_serialize_model_to_string(int argc,VALUE * argv,VALUE self)7484 _wrap_librdf_serializer_serialize_model_to_string(int argc, VALUE *argv, VALUE self) {
7485 librdf_serializer *arg1 = (librdf_serializer *) 0 ;
7486 librdf_uri *arg2 = (librdf_uri *) 0 ;
7487 librdf_model *arg3 = (librdf_model *) 0 ;
7488 void *argp1 = 0 ;
7489 int res1 = 0 ;
7490 void *argp2 = 0 ;
7491 int res2 = 0 ;
7492 void *argp3 = 0 ;
7493 int res3 = 0 ;
7494 char *result = 0 ;
7495 VALUE vresult = Qnil;
7496
7497 if ((argc < 3) || (argc > 3)) {
7498 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
7499 }
7500 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_serializer_s, 0 | 0 );
7501 if (!SWIG_IsOK(res1)) {
7502 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_serializer *","librdf_serializer_serialize_model_to_string", 1, argv[0] ));
7503 }
7504 arg1 = (librdf_serializer *)(argp1);
7505 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
7506 if (!SWIG_IsOK(res2)) {
7507 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_serializer_serialize_model_to_string", 2, argv[1] ));
7508 }
7509 arg2 = (librdf_uri *)(argp2);
7510 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_model_s, 0 | 0 );
7511 if (!SWIG_IsOK(res3)) {
7512 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_model *","librdf_serializer_serialize_model_to_string", 3, argv[2] ));
7513 }
7514 arg3 = (librdf_model *)(argp3);
7515 result = (char *)librdf_serializer_serialize_model_to_string(arg1,arg2,arg3);
7516 {
7517 vresult = (result == NULL) ? Qnil : rb_str_new2(result);
7518 }
7519 free((char*)result);
7520 return vresult;
7521 fail:
7522 return Qnil;
7523 }
7524
7525
7526 SWIGINTERN VALUE
_wrap_librdf_serializer_get_feature(int argc,VALUE * argv,VALUE self)7527 _wrap_librdf_serializer_get_feature(int argc, VALUE *argv, VALUE self) {
7528 librdf_serializer *arg1 = (librdf_serializer *) 0 ;
7529 librdf_uri *arg2 = (librdf_uri *) 0 ;
7530 void *argp1 = 0 ;
7531 int res1 = 0 ;
7532 void *argp2 = 0 ;
7533 int res2 = 0 ;
7534 librdf_node *result = 0 ;
7535 VALUE vresult = Qnil;
7536
7537 if ((argc < 2) || (argc > 2)) {
7538 rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
7539 }
7540 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_serializer_s, 0 | 0 );
7541 if (!SWIG_IsOK(res1)) {
7542 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_serializer *","librdf_serializer_get_feature", 1, argv[0] ));
7543 }
7544 arg1 = (librdf_serializer *)(argp1);
7545 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
7546 if (!SWIG_IsOK(res2)) {
7547 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_serializer_get_feature", 2, argv[1] ));
7548 }
7549 arg2 = (librdf_uri *)(argp2);
7550 result = (librdf_node *)librdf_serializer_get_feature(arg1,arg2);
7551 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, 0 | 0 );
7552 return vresult;
7553 fail:
7554 return Qnil;
7555 }
7556
7557
7558 SWIGINTERN VALUE
_wrap_librdf_serializer_set_feature(int argc,VALUE * argv,VALUE self)7559 _wrap_librdf_serializer_set_feature(int argc, VALUE *argv, VALUE self) {
7560 librdf_serializer *arg1 = (librdf_serializer *) 0 ;
7561 librdf_uri *arg2 = (librdf_uri *) 0 ;
7562 librdf_node *arg3 = (librdf_node *) 0 ;
7563 void *argp1 = 0 ;
7564 int res1 = 0 ;
7565 void *argp2 = 0 ;
7566 int res2 = 0 ;
7567 void *argp3 = 0 ;
7568 int res3 = 0 ;
7569 int result;
7570 VALUE vresult = Qnil;
7571
7572 if ((argc < 3) || (argc > 3)) {
7573 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
7574 }
7575 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_serializer_s, 0 | 0 );
7576 if (!SWIG_IsOK(res1)) {
7577 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_serializer *","librdf_serializer_set_feature", 1, argv[0] ));
7578 }
7579 arg1 = (librdf_serializer *)(argp1);
7580 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
7581 if (!SWIG_IsOK(res2)) {
7582 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_serializer_set_feature", 2, argv[1] ));
7583 }
7584 arg2 = (librdf_uri *)(argp2);
7585 res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_librdf_node_s, 0 | 0 );
7586 if (!SWIG_IsOK(res3)) {
7587 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "librdf_node *","librdf_serializer_set_feature", 3, argv[2] ));
7588 }
7589 arg3 = (librdf_node *)(argp3);
7590 result = (int)librdf_serializer_set_feature(arg1,arg2,arg3);
7591 vresult = SWIG_From_int((int)(result));
7592 return vresult;
7593 fail:
7594 return Qnil;
7595 }
7596
7597
7598 SWIGINTERN VALUE
_wrap_librdf_serializer_set_namespace(int argc,VALUE * argv,VALUE self)7599 _wrap_librdf_serializer_set_namespace(int argc, VALUE *argv, VALUE self) {
7600 librdf_serializer *arg1 = (librdf_serializer *) 0 ;
7601 librdf_uri *arg2 = (librdf_uri *) 0 ;
7602 char *arg3 = (char *) 0 ;
7603 void *argp1 = 0 ;
7604 int res1 = 0 ;
7605 void *argp2 = 0 ;
7606 int res2 = 0 ;
7607 int res3 ;
7608 char *buf3 = 0 ;
7609 int alloc3 = 0 ;
7610 int result;
7611 VALUE vresult = Qnil;
7612
7613 if ((argc < 3) || (argc > 3)) {
7614 rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
7615 }
7616 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_serializer_s, 0 | 0 );
7617 if (!SWIG_IsOK(res1)) {
7618 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_serializer *","librdf_serializer_set_namespace", 1, argv[0] ));
7619 }
7620 arg1 = (librdf_serializer *)(argp1);
7621 res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_librdf_uri_s, 0 | 0 );
7622 if (!SWIG_IsOK(res2)) {
7623 SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "librdf_uri *","librdf_serializer_set_namespace", 2, argv[1] ));
7624 }
7625 arg2 = (librdf_uri *)(argp2);
7626 res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
7627 if (!SWIG_IsOK(res3)) {
7628 SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","librdf_serializer_set_namespace", 3, argv[2] ));
7629 }
7630 arg3 = (char *)(buf3);
7631 result = (int)librdf_serializer_set_namespace(arg1,arg2,(char const *)arg3);
7632 vresult = SWIG_From_int((int)(result));
7633 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
7634 return vresult;
7635 fail:
7636 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
7637 return Qnil;
7638 }
7639
7640
7641 SWIGINTERN VALUE
_wrap_librdf_free_stream(int argc,VALUE * argv,VALUE self)7642 _wrap_librdf_free_stream(int argc, VALUE *argv, VALUE self) {
7643 librdf_stream *arg1 = (librdf_stream *) 0 ;
7644 void *argp1 = 0 ;
7645 int res1 = 0 ;
7646
7647 if ((argc < 1) || (argc > 1)) {
7648 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7649 }
7650 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_stream_s, 0 | 0 );
7651 if (!SWIG_IsOK(res1)) {
7652 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_stream *","librdf_free_stream", 1, argv[0] ));
7653 }
7654 arg1 = (librdf_stream *)(argp1);
7655 librdf_free_stream(arg1);
7656 return Qnil;
7657 fail:
7658 return Qnil;
7659 }
7660
7661
7662 SWIGINTERN VALUE
_wrap_librdf_stream_end(int argc,VALUE * argv,VALUE self)7663 _wrap_librdf_stream_end(int argc, VALUE *argv, VALUE self) {
7664 librdf_stream *arg1 = (librdf_stream *) 0 ;
7665 void *argp1 = 0 ;
7666 int res1 = 0 ;
7667 int result;
7668 VALUE vresult = Qnil;
7669
7670 if ((argc < 1) || (argc > 1)) {
7671 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7672 }
7673 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_stream_s, 0 | 0 );
7674 if (!SWIG_IsOK(res1)) {
7675 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_stream *","librdf_stream_end", 1, argv[0] ));
7676 }
7677 arg1 = (librdf_stream *)(argp1);
7678 result = (int)librdf_stream_end(arg1);
7679 vresult = SWIG_From_int((int)(result));
7680 return vresult;
7681 fail:
7682 return Qnil;
7683 }
7684
7685
7686 SWIGINTERN VALUE
_wrap_librdf_stream_next(int argc,VALUE * argv,VALUE self)7687 _wrap_librdf_stream_next(int argc, VALUE *argv, VALUE self) {
7688 librdf_stream *arg1 = (librdf_stream *) 0 ;
7689 void *argp1 = 0 ;
7690 int res1 = 0 ;
7691 int result;
7692 VALUE vresult = Qnil;
7693
7694 if ((argc < 1) || (argc > 1)) {
7695 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7696 }
7697 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_stream_s, 0 | 0 );
7698 if (!SWIG_IsOK(res1)) {
7699 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_stream *","librdf_stream_next", 1, argv[0] ));
7700 }
7701 arg1 = (librdf_stream *)(argp1);
7702 result = (int)librdf_stream_next(arg1);
7703 vresult = SWIG_From_int((int)(result));
7704 return vresult;
7705 fail:
7706 return Qnil;
7707 }
7708
7709
7710 SWIGINTERN VALUE
_wrap_librdf_stream_get_object(int argc,VALUE * argv,VALUE self)7711 _wrap_librdf_stream_get_object(int argc, VALUE *argv, VALUE self) {
7712 librdf_stream *arg1 = (librdf_stream *) 0 ;
7713 void *argp1 = 0 ;
7714 int res1 = 0 ;
7715 librdf_statement *result = 0 ;
7716 VALUE vresult = Qnil;
7717
7718 if ((argc < 1) || (argc > 1)) {
7719 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7720 }
7721 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_stream_s, 0 | 0 );
7722 if (!SWIG_IsOK(res1)) {
7723 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_stream *","librdf_stream_get_object", 1, argv[0] ));
7724 }
7725 arg1 = (librdf_stream *)(argp1);
7726 result = (librdf_statement *)librdf_stream_get_object(arg1);
7727 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_statement_s, 0 | 0 );
7728 return vresult;
7729 fail:
7730 return Qnil;
7731 }
7732
7733
7734 SWIGINTERN VALUE
_wrap_librdf_stream_get_context(int argc,VALUE * argv,VALUE self)7735 _wrap_librdf_stream_get_context(int argc, VALUE *argv, VALUE self) {
7736 librdf_stream *arg1 = (librdf_stream *) 0 ;
7737 void *argp1 = 0 ;
7738 int res1 = 0 ;
7739 librdf_node *result = 0 ;
7740 VALUE vresult = Qnil;
7741
7742 if ((argc < 1) || (argc > 1)) {
7743 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7744 }
7745 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_stream_s, 0 | 0 );
7746 if (!SWIG_IsOK(res1)) {
7747 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_stream *","librdf_stream_get_context", 1, argv[0] ));
7748 }
7749 arg1 = (librdf_stream *)(argp1);
7750 result = (librdf_node *)librdf_stream_get_context(arg1);
7751 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_node_s, 0 | 0 );
7752 return vresult;
7753 fail:
7754 return Qnil;
7755 }
7756
7757
7758 SWIGINTERN VALUE
_wrap_librdf_log_message_code(int argc,VALUE * argv,VALUE self)7759 _wrap_librdf_log_message_code(int argc, VALUE *argv, VALUE self) {
7760 librdf_log_message *arg1 = (librdf_log_message *) 0 ;
7761 void *argp1 = 0 ;
7762 int res1 = 0 ;
7763 int result;
7764 VALUE vresult = Qnil;
7765
7766 if ((argc < 1) || (argc > 1)) {
7767 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7768 }
7769 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_log_message, 0 | 0 );
7770 if (!SWIG_IsOK(res1)) {
7771 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_log_message *","librdf_log_message_code", 1, argv[0] ));
7772 }
7773 arg1 = (librdf_log_message *)(argp1);
7774 result = (int)librdf_log_message_code(arg1);
7775 vresult = SWIG_From_int((int)(result));
7776 return vresult;
7777 fail:
7778 return Qnil;
7779 }
7780
7781
7782 SWIGINTERN VALUE
_wrap_librdf_log_message_level(int argc,VALUE * argv,VALUE self)7783 _wrap_librdf_log_message_level(int argc, VALUE *argv, VALUE self) {
7784 librdf_log_message *arg1 = (librdf_log_message *) 0 ;
7785 void *argp1 = 0 ;
7786 int res1 = 0 ;
7787 int result;
7788 VALUE vresult = Qnil;
7789
7790 if ((argc < 1) || (argc > 1)) {
7791 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7792 }
7793 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_log_message, 0 | 0 );
7794 if (!SWIG_IsOK(res1)) {
7795 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_log_message *","librdf_log_message_level", 1, argv[0] ));
7796 }
7797 arg1 = (librdf_log_message *)(argp1);
7798 result = (int)librdf_log_message_level(arg1);
7799 vresult = SWIG_From_int((int)(result));
7800 return vresult;
7801 fail:
7802 return Qnil;
7803 }
7804
7805
7806 SWIGINTERN VALUE
_wrap_librdf_log_message_facility(int argc,VALUE * argv,VALUE self)7807 _wrap_librdf_log_message_facility(int argc, VALUE *argv, VALUE self) {
7808 librdf_log_message *arg1 = (librdf_log_message *) 0 ;
7809 void *argp1 = 0 ;
7810 int res1 = 0 ;
7811 int result;
7812 VALUE vresult = Qnil;
7813
7814 if ((argc < 1) || (argc > 1)) {
7815 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7816 }
7817 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_log_message, 0 | 0 );
7818 if (!SWIG_IsOK(res1)) {
7819 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_log_message *","librdf_log_message_facility", 1, argv[0] ));
7820 }
7821 arg1 = (librdf_log_message *)(argp1);
7822 result = (int)librdf_log_message_facility(arg1);
7823 vresult = SWIG_From_int((int)(result));
7824 return vresult;
7825 fail:
7826 return Qnil;
7827 }
7828
7829
7830 SWIGINTERN VALUE
_wrap_librdf_log_message_message(int argc,VALUE * argv,VALUE self)7831 _wrap_librdf_log_message_message(int argc, VALUE *argv, VALUE self) {
7832 librdf_log_message *arg1 = (librdf_log_message *) 0 ;
7833 void *argp1 = 0 ;
7834 int res1 = 0 ;
7835 char *result = 0 ;
7836 VALUE vresult = Qnil;
7837
7838 if ((argc < 1) || (argc > 1)) {
7839 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7840 }
7841 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_log_message, 0 | 0 );
7842 if (!SWIG_IsOK(res1)) {
7843 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_log_message *","librdf_log_message_message", 1, argv[0] ));
7844 }
7845 arg1 = (librdf_log_message *)(argp1);
7846 result = (char *)librdf_log_message_message(arg1);
7847 vresult = SWIG_FromCharPtr((const char *)result);
7848 return vresult;
7849 fail:
7850 return Qnil;
7851 }
7852
7853
7854 SWIGINTERN VALUE
_wrap_librdf_log_message_locator(int argc,VALUE * argv,VALUE self)7855 _wrap_librdf_log_message_locator(int argc, VALUE *argv, VALUE self) {
7856 librdf_log_message *arg1 = (librdf_log_message *) 0 ;
7857 void *argp1 = 0 ;
7858 int res1 = 0 ;
7859 raptor_locator *result = 0 ;
7860 VALUE vresult = Qnil;
7861
7862 if ((argc < 1) || (argc > 1)) {
7863 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7864 }
7865 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_log_message, 0 | 0 );
7866 if (!SWIG_IsOK(res1)) {
7867 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_log_message *","librdf_log_message_locator", 1, argv[0] ));
7868 }
7869 arg1 = (librdf_log_message *)(argp1);
7870 result = (raptor_locator *)librdf_log_message_locator(arg1);
7871 vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_raptor_locator, 0 | 0 );
7872 return vresult;
7873 fail:
7874 return Qnil;
7875 }
7876
7877
7878 SWIGINTERN VALUE
_wrap_raptor_locator_line(int argc,VALUE * argv,VALUE self)7879 _wrap_raptor_locator_line(int argc, VALUE *argv, VALUE self) {
7880 raptor_locator *arg1 = (raptor_locator *) 0 ;
7881 void *argp1 = 0 ;
7882 int res1 = 0 ;
7883 int result;
7884 VALUE vresult = Qnil;
7885
7886 if ((argc < 1) || (argc > 1)) {
7887 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7888 }
7889 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_raptor_locator, 0 | 0 );
7890 if (!SWIG_IsOK(res1)) {
7891 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "raptor_locator *","raptor_locator_line", 1, argv[0] ));
7892 }
7893 arg1 = (raptor_locator *)(argp1);
7894 result = (int)raptor_locator_line(arg1);
7895 vresult = SWIG_From_int((int)(result));
7896 return vresult;
7897 fail:
7898 return Qnil;
7899 }
7900
7901
7902 SWIGINTERN VALUE
_wrap_raptor_locator_column(int argc,VALUE * argv,VALUE self)7903 _wrap_raptor_locator_column(int argc, VALUE *argv, VALUE self) {
7904 raptor_locator *arg1 = (raptor_locator *) 0 ;
7905 void *argp1 = 0 ;
7906 int res1 = 0 ;
7907 int result;
7908 VALUE vresult = Qnil;
7909
7910 if ((argc < 1) || (argc > 1)) {
7911 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7912 }
7913 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_raptor_locator, 0 | 0 );
7914 if (!SWIG_IsOK(res1)) {
7915 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "raptor_locator *","raptor_locator_column", 1, argv[0] ));
7916 }
7917 arg1 = (raptor_locator *)(argp1);
7918 result = (int)raptor_locator_column(arg1);
7919 vresult = SWIG_From_int((int)(result));
7920 return vresult;
7921 fail:
7922 return Qnil;
7923 }
7924
7925
7926 SWIGINTERN VALUE
_wrap_raptor_locator_byte(int argc,VALUE * argv,VALUE self)7927 _wrap_raptor_locator_byte(int argc, VALUE *argv, VALUE self) {
7928 raptor_locator *arg1 = (raptor_locator *) 0 ;
7929 void *argp1 = 0 ;
7930 int res1 = 0 ;
7931 int result;
7932 VALUE vresult = Qnil;
7933
7934 if ((argc < 1) || (argc > 1)) {
7935 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7936 }
7937 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_raptor_locator, 0 | 0 );
7938 if (!SWIG_IsOK(res1)) {
7939 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "raptor_locator *","raptor_locator_byte", 1, argv[0] ));
7940 }
7941 arg1 = (raptor_locator *)(argp1);
7942 result = (int)raptor_locator_byte(arg1);
7943 vresult = SWIG_From_int((int)(result));
7944 return vresult;
7945 fail:
7946 return Qnil;
7947 }
7948
7949
7950 SWIGINTERN VALUE
_wrap_raptor_locator_file(int argc,VALUE * argv,VALUE self)7951 _wrap_raptor_locator_file(int argc, VALUE *argv, VALUE self) {
7952 raptor_locator *arg1 = (raptor_locator *) 0 ;
7953 void *argp1 = 0 ;
7954 int res1 = 0 ;
7955 char *result = 0 ;
7956 VALUE vresult = Qnil;
7957
7958 if ((argc < 1) || (argc > 1)) {
7959 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7960 }
7961 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_raptor_locator, 0 | 0 );
7962 if (!SWIG_IsOK(res1)) {
7963 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "raptor_locator *","raptor_locator_file", 1, argv[0] ));
7964 }
7965 arg1 = (raptor_locator *)(argp1);
7966 result = (char *)raptor_locator_file(arg1);
7967 vresult = SWIG_FromCharPtr((const char *)result);
7968 return vresult;
7969 fail:
7970 return Qnil;
7971 }
7972
7973
7974 SWIGINTERN VALUE
_wrap_raptor_locator_uri(int argc,VALUE * argv,VALUE self)7975 _wrap_raptor_locator_uri(int argc, VALUE *argv, VALUE self) {
7976 raptor_locator *arg1 = (raptor_locator *) 0 ;
7977 void *argp1 = 0 ;
7978 int res1 = 0 ;
7979 char *result = 0 ;
7980 VALUE vresult = Qnil;
7981
7982 if ((argc < 1) || (argc > 1)) {
7983 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
7984 }
7985 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_raptor_locator, 0 | 0 );
7986 if (!SWIG_IsOK(res1)) {
7987 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "raptor_locator *","raptor_locator_uri", 1, argv[0] ));
7988 }
7989 arg1 = (raptor_locator *)(argp1);
7990 result = (char *)raptor_locator_uri(arg1);
7991 vresult = SWIG_FromCharPtr((const char *)result);
7992 return vresult;
7993 fail:
7994 return Qnil;
7995 }
7996
7997
7998 SWIGINTERN VALUE
_wrap_librdf_internal_test_error(int argc,VALUE * argv,VALUE self)7999 _wrap_librdf_internal_test_error(int argc, VALUE *argv, VALUE self) {
8000 librdf_world *arg1 = (librdf_world *) 0 ;
8001 void *argp1 = 0 ;
8002 int res1 = 0 ;
8003
8004 if ((argc < 1) || (argc > 1)) {
8005 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
8006 }
8007 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
8008 if (!SWIG_IsOK(res1)) {
8009 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_internal_test_error", 1, argv[0] ));
8010 }
8011 arg1 = (librdf_world *)(argp1);
8012 librdf_internal_test_error(arg1);
8013 return Qnil;
8014 fail:
8015 return Qnil;
8016 }
8017
8018
8019 SWIGINTERN VALUE
_wrap_librdf_internal_test_warning(int argc,VALUE * argv,VALUE self)8020 _wrap_librdf_internal_test_warning(int argc, VALUE *argv, VALUE self) {
8021 librdf_world *arg1 = (librdf_world *) 0 ;
8022 void *argp1 = 0 ;
8023 int res1 = 0 ;
8024
8025 if ((argc < 1) || (argc > 1)) {
8026 rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
8027 }
8028 res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
8029 if (!SWIG_IsOK(res1)) {
8030 SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_internal_test_warning", 1, argv[0] ));
8031 }
8032 arg1 = (librdf_world *)(argp1);
8033 librdf_internal_test_warning(arg1);
8034 return Qnil;
8035 fail:
8036 return Qnil;
8037 }
8038
8039
8040 SWIGINTERN VALUE
_wrap_librdf_short_copyright_string_get(VALUE self)8041 _wrap_librdf_short_copyright_string_get(VALUE self) {
8042 VALUE _val;
8043
8044 _val = SWIG_FromCharPtr(librdf_short_copyright_string);
8045 return _val;
8046 }
8047
8048
8049 SWIGINTERN VALUE
_wrap_librdf_copyright_string_get(VALUE self)8050 _wrap_librdf_copyright_string_get(VALUE self) {
8051 VALUE _val;
8052
8053 _val = SWIG_FromCharPtr(librdf_copyright_string);
8054 return _val;
8055 }
8056
8057
8058 SWIGINTERN VALUE
_wrap_librdf_version_string_get(VALUE self)8059 _wrap_librdf_version_string_get(VALUE self) {
8060 VALUE _val;
8061
8062 _val = SWIG_FromCharPtr(librdf_version_string);
8063 return _val;
8064 }
8065
8066
8067 SWIGINTERN VALUE
_wrap_librdf_version_major_get(VALUE self)8068 _wrap_librdf_version_major_get(VALUE self) {
8069 VALUE _val;
8070
8071 _val = SWIG_From_unsigned_SS_int((unsigned int)(librdf_version_major));
8072 return _val;
8073 }
8074
8075
8076 SWIGINTERN VALUE
_wrap_librdf_version_minor_get(VALUE self)8077 _wrap_librdf_version_minor_get(VALUE self) {
8078 VALUE _val;
8079
8080 _val = SWIG_From_unsigned_SS_int((unsigned int)(librdf_version_minor));
8081 return _val;
8082 }
8083
8084
8085 SWIGINTERN VALUE
_wrap_librdf_version_release_get(VALUE self)8086 _wrap_librdf_version_release_get(VALUE self) {
8087 VALUE _val;
8088
8089 _val = SWIG_From_unsigned_SS_int((unsigned int)(librdf_version_release));
8090 return _val;
8091 }
8092
8093
8094 SWIGINTERN VALUE
_wrap_librdf_version_decimal_get(VALUE self)8095 _wrap_librdf_version_decimal_get(VALUE self) {
8096 VALUE _val;
8097
8098 _val = SWIG_From_unsigned_SS_int((unsigned int)(librdf_version_decimal));
8099 return _val;
8100 }
8101
8102
8103 SWIGINTERN VALUE
_wrap_raptor_version_string_get(VALUE self)8104 _wrap_raptor_version_string_get(VALUE self) {
8105 VALUE _val;
8106
8107 _val = SWIG_FromCharPtr(raptor_version_string);
8108 return _val;
8109 }
8110
8111
8112 SWIGINTERN VALUE
_wrap_raptor_version_major_get(VALUE self)8113 _wrap_raptor_version_major_get(VALUE self) {
8114 VALUE _val;
8115
8116 _val = SWIG_From_unsigned_SS_int((unsigned int)(raptor_version_major));
8117 return _val;
8118 }
8119
8120
8121 SWIGINTERN VALUE
_wrap_raptor_version_minor_get(VALUE self)8122 _wrap_raptor_version_minor_get(VALUE self) {
8123 VALUE _val;
8124
8125 _val = SWIG_From_unsigned_SS_int((unsigned int)(raptor_version_minor));
8126 return _val;
8127 }
8128
8129
8130 SWIGINTERN VALUE
_wrap_raptor_version_release_get(VALUE self)8131 _wrap_raptor_version_release_get(VALUE self) {
8132 VALUE _val;
8133
8134 _val = SWIG_From_unsigned_SS_int((unsigned int)(raptor_version_release));
8135 return _val;
8136 }
8137
8138
8139 SWIGINTERN VALUE
_wrap_raptor_version_decimal_get(VALUE self)8140 _wrap_raptor_version_decimal_get(VALUE self) {
8141 VALUE _val;
8142
8143 _val = SWIG_From_unsigned_SS_int((unsigned int)(raptor_version_decimal));
8144 return _val;
8145 }
8146
8147
8148 SWIGINTERN VALUE
_wrap_rasqal_version_string_get(VALUE self)8149 _wrap_rasqal_version_string_get(VALUE self) {
8150 VALUE _val;
8151
8152 _val = SWIG_FromCharPtr(rasqal_version_string);
8153 return _val;
8154 }
8155
8156
8157 SWIGINTERN VALUE
_wrap_rasqal_version_major_get(VALUE self)8158 _wrap_rasqal_version_major_get(VALUE self) {
8159 VALUE _val;
8160
8161 _val = SWIG_From_unsigned_SS_int((unsigned int)(rasqal_version_major));
8162 return _val;
8163 }
8164
8165
8166 SWIGINTERN VALUE
_wrap_rasqal_version_minor_get(VALUE self)8167 _wrap_rasqal_version_minor_get(VALUE self) {
8168 VALUE _val;
8169
8170 _val = SWIG_From_unsigned_SS_int((unsigned int)(rasqal_version_minor));
8171 return _val;
8172 }
8173
8174
8175 SWIGINTERN VALUE
_wrap_rasqal_version_release_get(VALUE self)8176 _wrap_rasqal_version_release_get(VALUE self) {
8177 VALUE _val;
8178
8179 _val = SWIG_From_unsigned_SS_int((unsigned int)(rasqal_version_release));
8180 return _val;
8181 }
8182
8183
8184 SWIGINTERN VALUE
_wrap_rasqal_version_decimal_get(VALUE self)8185 _wrap_rasqal_version_decimal_get(VALUE self) {
8186 VALUE _val;
8187
8188 _val = SWIG_From_unsigned_SS_int((unsigned int)(rasqal_version_decimal));
8189 return _val;
8190 }
8191
8192
8193
8194 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
8195
8196 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
8197 static swig_type_info _swigt__p_librdf_digest_s = {"_p_librdf_digest_s", "struct librdf_digest_s *|librdf_digest *", 0, 0, (void*)0, 0};
8198 static swig_type_info _swigt__p_librdf_hash_s = {"_p_librdf_hash_s", "librdf_hash *|struct librdf_hash_s *", 0, 0, (void*)0, 0};
8199 static swig_type_info _swigt__p_librdf_iterator_s = {"_p_librdf_iterator_s", "struct librdf_iterator_s *|librdf_iterator *", 0, 0, (void*)0, 0};
8200 static swig_type_info _swigt__p_librdf_log_func = {"_p_librdf_log_func", "librdf_log_func *", 0, 0, (void*)0, 0};
8201 static swig_type_info _swigt__p_librdf_log_message = {"_p_librdf_log_message", "librdf_log_message *", 0, 0, (void*)0, 0};
8202 static swig_type_info _swigt__p_librdf_model_s = {"_p_librdf_model_s", "struct librdf_model_s *|librdf_model *", 0, 0, (void*)0, 0};
8203 static swig_type_info _swigt__p_librdf_node_s = {"_p_librdf_node_s", "struct librdf_node_s *|librdf_node *", 0, 0, (void*)0, 0};
8204 static swig_type_info _swigt__p_librdf_parser_s = {"_p_librdf_parser_s", "librdf_parser *|struct librdf_parser_s *", 0, 0, (void*)0, 0};
8205 static swig_type_info _swigt__p_librdf_query = {"_p_librdf_query", "librdf_query *", 0, 0, (void*)0, 0};
8206 static swig_type_info _swigt__p_librdf_query_results = {"_p_librdf_query_results", "librdf_query_results *", 0, 0, (void*)0, 0};
8207 static swig_type_info _swigt__p_librdf_serializer_s = {"_p_librdf_serializer_s", "struct librdf_serializer_s *|librdf_serializer *", 0, 0, (void*)0, 0};
8208 static swig_type_info _swigt__p_librdf_statement_s = {"_p_librdf_statement_s", "struct librdf_statement_s *|librdf_statement *", 0, 0, (void*)0, 0};
8209 static swig_type_info _swigt__p_librdf_storage_s = {"_p_librdf_storage_s", "struct librdf_storage_s *|librdf_storage *", 0, 0, (void*)0, 0};
8210 static swig_type_info _swigt__p_librdf_stream_s = {"_p_librdf_stream_s", "struct librdf_stream_s *|librdf_stream *", 0, 0, (void*)0, 0};
8211 static swig_type_info _swigt__p_librdf_uri_s = {"_p_librdf_uri_s", "librdf_uri *|struct librdf_uri_s *", 0, 0, (void*)0, 0};
8212 static swig_type_info _swigt__p_librdf_world_s = {"_p_librdf_world_s", "struct librdf_world_s *|librdf_world *", 0, 0, (void*)0, 0};
8213 static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
8214 static swig_type_info _swigt__p_raptor_locator = {"_p_raptor_locator", "raptor_locator *", 0, 0, (void*)0, 0};
8215
8216 static swig_type_info *swig_type_initial[] = {
8217 &_swigt__p_char,
8218 &_swigt__p_librdf_digest_s,
8219 &_swigt__p_librdf_hash_s,
8220 &_swigt__p_librdf_iterator_s,
8221 &_swigt__p_librdf_log_func,
8222 &_swigt__p_librdf_log_message,
8223 &_swigt__p_librdf_model_s,
8224 &_swigt__p_librdf_node_s,
8225 &_swigt__p_librdf_parser_s,
8226 &_swigt__p_librdf_query,
8227 &_swigt__p_librdf_query_results,
8228 &_swigt__p_librdf_serializer_s,
8229 &_swigt__p_librdf_statement_s,
8230 &_swigt__p_librdf_storage_s,
8231 &_swigt__p_librdf_stream_s,
8232 &_swigt__p_librdf_uri_s,
8233 &_swigt__p_librdf_world_s,
8234 &_swigt__p_p_char,
8235 &_swigt__p_raptor_locator,
8236 };
8237
8238 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
8239 static swig_cast_info _swigc__p_librdf_digest_s[] = { {&_swigt__p_librdf_digest_s, 0, 0, 0},{0, 0, 0, 0}};
8240 static swig_cast_info _swigc__p_librdf_hash_s[] = { {&_swigt__p_librdf_hash_s, 0, 0, 0},{0, 0, 0, 0}};
8241 static swig_cast_info _swigc__p_librdf_iterator_s[] = { {&_swigt__p_librdf_iterator_s, 0, 0, 0},{0, 0, 0, 0}};
8242 static swig_cast_info _swigc__p_librdf_log_func[] = { {&_swigt__p_librdf_log_func, 0, 0, 0},{0, 0, 0, 0}};
8243 static swig_cast_info _swigc__p_librdf_log_message[] = { {&_swigt__p_librdf_log_message, 0, 0, 0},{0, 0, 0, 0}};
8244 static swig_cast_info _swigc__p_librdf_model_s[] = { {&_swigt__p_librdf_model_s, 0, 0, 0},{0, 0, 0, 0}};
8245 static swig_cast_info _swigc__p_librdf_node_s[] = { {&_swigt__p_librdf_node_s, 0, 0, 0},{0, 0, 0, 0}};
8246 static swig_cast_info _swigc__p_librdf_parser_s[] = { {&_swigt__p_librdf_parser_s, 0, 0, 0},{0, 0, 0, 0}};
8247 static swig_cast_info _swigc__p_librdf_query[] = { {&_swigt__p_librdf_query, 0, 0, 0},{0, 0, 0, 0}};
8248 static swig_cast_info _swigc__p_librdf_query_results[] = { {&_swigt__p_librdf_query_results, 0, 0, 0},{0, 0, 0, 0}};
8249 static swig_cast_info _swigc__p_librdf_serializer_s[] = { {&_swigt__p_librdf_serializer_s, 0, 0, 0},{0, 0, 0, 0}};
8250 static swig_cast_info _swigc__p_librdf_statement_s[] = { {&_swigt__p_librdf_statement_s, 0, 0, 0},{0, 0, 0, 0}};
8251 static swig_cast_info _swigc__p_librdf_storage_s[] = { {&_swigt__p_librdf_storage_s, 0, 0, 0},{0, 0, 0, 0}};
8252 static swig_cast_info _swigc__p_librdf_stream_s[] = { {&_swigt__p_librdf_stream_s, 0, 0, 0},{0, 0, 0, 0}};
8253 static swig_cast_info _swigc__p_librdf_uri_s[] = { {&_swigt__p_librdf_uri_s, 0, 0, 0},{0, 0, 0, 0}};
8254 static swig_cast_info _swigc__p_librdf_world_s[] = { {&_swigt__p_librdf_world_s, 0, 0, 0},{0, 0, 0, 0}};
8255 static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
8256 static swig_cast_info _swigc__p_raptor_locator[] = { {&_swigt__p_raptor_locator, 0, 0, 0},{0, 0, 0, 0}};
8257
8258 static swig_cast_info *swig_cast_initial[] = {
8259 _swigc__p_char,
8260 _swigc__p_librdf_digest_s,
8261 _swigc__p_librdf_hash_s,
8262 _swigc__p_librdf_iterator_s,
8263 _swigc__p_librdf_log_func,
8264 _swigc__p_librdf_log_message,
8265 _swigc__p_librdf_model_s,
8266 _swigc__p_librdf_node_s,
8267 _swigc__p_librdf_parser_s,
8268 _swigc__p_librdf_query,
8269 _swigc__p_librdf_query_results,
8270 _swigc__p_librdf_serializer_s,
8271 _swigc__p_librdf_statement_s,
8272 _swigc__p_librdf_storage_s,
8273 _swigc__p_librdf_stream_s,
8274 _swigc__p_librdf_uri_s,
8275 _swigc__p_librdf_world_s,
8276 _swigc__p_p_char,
8277 _swigc__p_raptor_locator,
8278 };
8279
8280
8281 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
8282
8283 /* -----------------------------------------------------------------------------
8284 * Type initialization:
8285 * This problem is tough by the requirement that no dynamic
8286 * memory is used. Also, since swig_type_info structures store pointers to
8287 * swig_cast_info structures and swig_cast_info structures store pointers back
8288 * to swig_type_info structures, we need some lookup code at initialization.
8289 * The idea is that swig generates all the structures that are needed.
8290 * The runtime then collects these partially filled structures.
8291 * The SWIG_InitializeModule function takes these initial arrays out of
8292 * swig_module, and does all the lookup, filling in the swig_module.types
8293 * array with the correct data and linking the correct swig_cast_info
8294 * structures together.
8295 *
8296 * The generated swig_type_info structures are assigned staticly to an initial
8297 * array. We just loop through that array, and handle each type individually.
8298 * First we lookup if this type has been already loaded, and if so, use the
8299 * loaded structure instead of the generated one. Then we have to fill in the
8300 * cast linked list. The cast data is initially stored in something like a
8301 * two-dimensional array. Each row corresponds to a type (there are the same
8302 * number of rows as there are in the swig_type_initial array). Each entry in
8303 * a column is one of the swig_cast_info structures for that type.
8304 * The cast_initial array is actually an array of arrays, because each row has
8305 * a variable number of columns. So to actually build the cast linked list,
8306 * we find the array of casts associated with the type, and loop through it
8307 * adding the casts to the list. The one last trick we need to do is making
8308 * sure the type pointer in the swig_cast_info struct is correct.
8309 *
8310 * First off, we lookup the cast->type name to see if it is already loaded.
8311 * There are three cases to handle:
8312 * 1) If the cast->type has already been loaded AND the type we are adding
8313 * casting info to has not been loaded (it is in this module), THEN we
8314 * replace the cast->type pointer with the type pointer that has already
8315 * been loaded.
8316 * 2) If BOTH types (the one we are adding casting info to, and the
8317 * cast->type) are loaded, THEN the cast info has already been loaded by
8318 * the previous module so we just ignore it.
8319 * 3) Finally, if cast->type has not already been loaded, then we add that
8320 * swig_cast_info to the linked list (because the cast->type) pointer will
8321 * be correct.
8322 * ----------------------------------------------------------------------------- */
8323
8324 #ifdef __cplusplus
8325 extern "C" {
8326 #if 0
8327 } /* c-mode */
8328 #endif
8329 #endif
8330
8331 #if 0
8332 #define SWIGRUNTIME_DEBUG
8333 #endif
8334
8335
8336 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)8337 SWIG_InitializeModule(void *clientdata) {
8338 size_t i;
8339 swig_module_info *module_head, *iter;
8340 int found, init;
8341
8342 clientdata = clientdata;
8343
8344 /* check to see if the circular list has been setup, if not, set it up */
8345 if (swig_module.next==0) {
8346 /* Initialize the swig_module */
8347 swig_module.type_initial = swig_type_initial;
8348 swig_module.cast_initial = swig_cast_initial;
8349 swig_module.next = &swig_module;
8350 init = 1;
8351 } else {
8352 init = 0;
8353 }
8354
8355 /* Try and load any already created modules */
8356 module_head = SWIG_GetModule(clientdata);
8357 if (!module_head) {
8358 /* This is the first module loaded for this interpreter */
8359 /* so set the swig module into the interpreter */
8360 SWIG_SetModule(clientdata, &swig_module);
8361 module_head = &swig_module;
8362 } else {
8363 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
8364 found=0;
8365 iter=module_head;
8366 do {
8367 if (iter==&swig_module) {
8368 found=1;
8369 break;
8370 }
8371 iter=iter->next;
8372 } while (iter!= module_head);
8373
8374 /* if the is found in the list, then all is done and we may leave */
8375 if (found) return;
8376 /* otherwise we must add out module into the list */
8377 swig_module.next = module_head->next;
8378 module_head->next = &swig_module;
8379 }
8380
8381 /* When multiple interpeters are used, a module could have already been initialized in
8382 a different interpreter, but not yet have a pointer in this interpreter.
8383 In this case, we do not want to continue adding types... everything should be
8384 set up already */
8385 if (init == 0) return;
8386
8387 /* Now work on filling in swig_module.types */
8388 #ifdef SWIGRUNTIME_DEBUG
8389 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
8390 #endif
8391 for (i = 0; i < swig_module.size; ++i) {
8392 swig_type_info *type = 0;
8393 swig_type_info *ret;
8394 swig_cast_info *cast;
8395
8396 #ifdef SWIGRUNTIME_DEBUG
8397 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
8398 #endif
8399
8400 /* if there is another module already loaded */
8401 if (swig_module.next != &swig_module) {
8402 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
8403 }
8404 if (type) {
8405 /* Overwrite clientdata field */
8406 #ifdef SWIGRUNTIME_DEBUG
8407 printf("SWIG_InitializeModule: found type %s\n", type->name);
8408 #endif
8409 if (swig_module.type_initial[i]->clientdata) {
8410 type->clientdata = swig_module.type_initial[i]->clientdata;
8411 #ifdef SWIGRUNTIME_DEBUG
8412 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
8413 #endif
8414 }
8415 } else {
8416 type = swig_module.type_initial[i];
8417 }
8418
8419 /* Insert casting types */
8420 cast = swig_module.cast_initial[i];
8421 while (cast->type) {
8422
8423 /* Don't need to add information already in the list */
8424 ret = 0;
8425 #ifdef SWIGRUNTIME_DEBUG
8426 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
8427 #endif
8428 if (swig_module.next != &swig_module) {
8429 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
8430 #ifdef SWIGRUNTIME_DEBUG
8431 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
8432 #endif
8433 }
8434 if (ret) {
8435 if (type == swig_module.type_initial[i]) {
8436 #ifdef SWIGRUNTIME_DEBUG
8437 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
8438 #endif
8439 cast->type = ret;
8440 ret = 0;
8441 } else {
8442 /* Check for casting already in the list */
8443 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
8444 #ifdef SWIGRUNTIME_DEBUG
8445 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
8446 #endif
8447 if (!ocast) ret = 0;
8448 }
8449 }
8450
8451 if (!ret) {
8452 #ifdef SWIGRUNTIME_DEBUG
8453 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
8454 #endif
8455 if (type->cast) {
8456 type->cast->prev = cast;
8457 cast->next = type->cast;
8458 }
8459 type->cast = cast;
8460 }
8461 cast++;
8462 }
8463 /* Set entry in modules->types array equal to the type */
8464 swig_module.types[i] = type;
8465 }
8466 swig_module.types[i] = 0;
8467
8468 #ifdef SWIGRUNTIME_DEBUG
8469 printf("**** SWIG_InitializeModule: Cast List ******\n");
8470 for (i = 0; i < swig_module.size; ++i) {
8471 int j = 0;
8472 swig_cast_info *cast = swig_module.cast_initial[i];
8473 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
8474 while (cast->type) {
8475 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
8476 cast++;
8477 ++j;
8478 }
8479 printf("---- Total casts: %d\n",j);
8480 }
8481 printf("**** SWIG_InitializeModule: Cast List ******\n");
8482 #endif
8483 }
8484
8485 /* This function will propagate the clientdata field of type to
8486 * any new swig_type_info structures that have been added into the list
8487 * of equivalent types. It is like calling
8488 * SWIG_TypeClientData(type, clientdata) a second time.
8489 */
8490 SWIGRUNTIME void
SWIG_PropagateClientData(void)8491 SWIG_PropagateClientData(void) {
8492 size_t i;
8493 swig_cast_info *equiv;
8494 static int init_run = 0;
8495
8496 if (init_run) return;
8497 init_run = 1;
8498
8499 for (i = 0; i < swig_module.size; i++) {
8500 if (swig_module.types[i]->clientdata) {
8501 equiv = swig_module.types[i]->cast;
8502 while (equiv) {
8503 if (!equiv->converter) {
8504 if (equiv->type && !equiv->type->clientdata)
8505 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
8506 }
8507 equiv = equiv->next;
8508 }
8509 }
8510 }
8511 }
8512
8513 #ifdef __cplusplus
8514 #if 0
8515 { /* c-mode */
8516 #endif
8517 }
8518 #endif
8519
8520 /*
8521
8522 */
8523 #ifdef __cplusplus
8524 extern "C"
8525 #endif
Init_redland(void)8526 SWIGEXPORT void Init_redland(void) {
8527 size_t i;
8528
8529 SWIG_InitRuntime();
8530 mRedland = rb_define_module("Redland");
8531
8532 SWIG_InitializeModule(0);
8533 for (i = 0; i < swig_module.size; i++) {
8534 SWIG_define_class(swig_module.types[i]);
8535 }
8536
8537 SWIG_RubyInitializeTrackings();
8538
8539 /* compile-time include (inside a % ... % block) */
8540 #ifdef REDLAND_INIT_I
8541 #include <redland-init.i>
8542 #endif
8543
8544 rb_define_module_function(mRedland, "librdf_new_digest", _wrap_librdf_new_digest, -1);
8545 rb_define_module_function(mRedland, "librdf_free_digest", _wrap_librdf_free_digest, -1);
8546 rb_define_module_function(mRedland, "librdf_digest_init", _wrap_librdf_digest_init, -1);
8547 rb_define_module_function(mRedland, "librdf_digest_update", _wrap_librdf_digest_update, -1);
8548 rb_define_module_function(mRedland, "librdf_digest_update_string", _wrap_librdf_digest_update_string, -1);
8549 rb_define_module_function(mRedland, "librdf_digest_final", _wrap_librdf_digest_final, -1);
8550 rb_define_module_function(mRedland, "librdf_digest_to_string", _wrap_librdf_digest_to_string, -1);
8551 rb_define_module_function(mRedland, "librdf_new_hash", _wrap_librdf_new_hash, -1);
8552 rb_define_module_function(mRedland, "librdf_new_hash_from_string", _wrap_librdf_new_hash_from_string, -1);
8553 rb_define_module_function(mRedland, "librdf_new_hash_from_array_of_strings", _wrap_librdf_new_hash_from_array_of_strings, -1);
8554 rb_define_module_function(mRedland, "librdf_hash_to_string", _wrap_librdf_hash_to_string, -1);
8555 rb_define_module_function(mRedland, "librdf_free_hash", _wrap_librdf_free_hash, -1);
8556 rb_define_module_function(mRedland, "librdf_new_world", _wrap_librdf_new_world, -1);
8557 rb_define_module_function(mRedland, "librdf_free_world", _wrap_librdf_free_world, -1);
8558 rb_define_module_function(mRedland, "librdf_world_open", _wrap_librdf_world_open, -1);
8559 rb_define_module_function(mRedland, "librdf_world_get_feature", _wrap_librdf_world_get_feature, -1);
8560 rb_define_module_function(mRedland, "librdf_world_set_feature", _wrap_librdf_world_set_feature, -1);
8561 rb_define_module_function(mRedland, "librdf_parser_get_accept_header", _wrap_librdf_parser_get_accept_header, -1);
8562 rb_define_module_function(mRedland, "librdf_world_set_logger", _wrap_librdf_world_set_logger, -1);
8563 rb_define_module_function(mRedland, "librdf_free_iterator", _wrap_librdf_free_iterator, -1);
8564 rb_define_module_function(mRedland, "librdf_iterator_end", _wrap_librdf_iterator_end, -1);
8565 rb_define_module_function(mRedland, "librdf_iterator_get_object", _wrap_librdf_iterator_get_object, -1);
8566 rb_define_module_function(mRedland, "librdf_iterator_get_context", _wrap_librdf_iterator_get_context, -1);
8567 rb_define_module_function(mRedland, "librdf_iterator_next", _wrap_librdf_iterator_next, -1);
8568 rb_define_module_function(mRedland, "librdf_new_uri", _wrap_librdf_new_uri, -1);
8569 rb_define_module_function(mRedland, "librdf_new_uri_from_uri", _wrap_librdf_new_uri_from_uri, -1);
8570 rb_define_module_function(mRedland, "librdf_new_uri_from_filename", _wrap_librdf_new_uri_from_filename, -1);
8571 rb_define_module_function(mRedland, "librdf_free_uri", _wrap_librdf_free_uri, -1);
8572 rb_define_module_function(mRedland, "librdf_uri_to_string", _wrap_librdf_uri_to_string, -1);
8573 rb_define_module_function(mRedland, "librdf_uri_equals", _wrap_librdf_uri_equals, -1);
8574 rb_define_module_function(mRedland, "librdf_uri_compare", _wrap_librdf_uri_compare, -1);
8575 rb_define_module_function(mRedland, "librdf_new_node", _wrap_librdf_new_node, -1);
8576 rb_define_module_function(mRedland, "librdf_new_node_from_uri_string", _wrap_librdf_new_node_from_uri_string, -1);
8577 rb_define_module_function(mRedland, "librdf_new_node_from_uri", _wrap_librdf_new_node_from_uri, -1);
8578 rb_define_module_function(mRedland, "librdf_new_node_from_uri_local_name", _wrap_librdf_new_node_from_uri_local_name, -1);
8579 rb_define_module_function(mRedland, "librdf_new_node_from_normalised_uri_string", _wrap_librdf_new_node_from_normalised_uri_string, -1);
8580 rb_define_module_function(mRedland, "librdf_new_node_from_literal", _wrap_librdf_new_node_from_literal, -1);
8581 rb_define_module_function(mRedland, "librdf_new_node_from_typed_literal", _wrap_librdf_new_node_from_typed_literal, -1);
8582 rb_define_module_function(mRedland, "librdf_new_node_from_node", _wrap_librdf_new_node_from_node, -1);
8583 rb_define_module_function(mRedland, "librdf_new_node_from_blank_identifier", _wrap_librdf_new_node_from_blank_identifier, -1);
8584 rb_define_module_function(mRedland, "librdf_free_node", _wrap_librdf_free_node, -1);
8585 rb_define_module_function(mRedland, "librdf_node_get_uri", _wrap_librdf_node_get_uri, -1);
8586 rb_define_module_function(mRedland, "librdf_node_get_type", _wrap_librdf_node_get_type, -1);
8587 rb_define_module_function(mRedland, "librdf_node_get_literal_value", _wrap_librdf_node_get_literal_value, -1);
8588 rb_define_module_function(mRedland, "librdf_node_get_literal_value_as_latin1", _wrap_librdf_node_get_literal_value_as_latin1, -1);
8589 rb_define_module_function(mRedland, "librdf_node_get_literal_value_language", _wrap_librdf_node_get_literal_value_language, -1);
8590 rb_define_module_function(mRedland, "librdf_node_get_literal_value_datatype_uri", _wrap_librdf_node_get_literal_value_datatype_uri, -1);
8591 rb_define_module_function(mRedland, "librdf_node_get_literal_value_is_wf_xml", _wrap_librdf_node_get_literal_value_is_wf_xml, -1);
8592 rb_define_module_function(mRedland, "librdf_node_get_li_ordinal", _wrap_librdf_node_get_li_ordinal, -1);
8593 rb_define_module_function(mRedland, "librdf_node_to_string", _wrap_librdf_node_to_string, -1);
8594 rb_define_module_function(mRedland, "librdf_node_get_blank_identifier", _wrap_librdf_node_get_blank_identifier, -1);
8595 rb_define_module_function(mRedland, "librdf_node_is_resource", _wrap_librdf_node_is_resource, -1);
8596 rb_define_module_function(mRedland, "librdf_node_is_literal", _wrap_librdf_node_is_literal, -1);
8597 rb_define_module_function(mRedland, "librdf_node_is_blank", _wrap_librdf_node_is_blank, -1);
8598 rb_define_module_function(mRedland, "librdf_node_equals", _wrap_librdf_node_equals, -1);
8599 rb_define_module_function(mRedland, "librdf_new_statement", _wrap_librdf_new_statement, -1);
8600 rb_define_module_function(mRedland, "librdf_new_statement_from_statement", _wrap_librdf_new_statement_from_statement, -1);
8601 rb_define_module_function(mRedland, "librdf_new_statement_from_nodes", _wrap_librdf_new_statement_from_nodes, -1);
8602 rb_define_module_function(mRedland, "librdf_free_statement", _wrap_librdf_free_statement, -1);
8603 rb_define_module_function(mRedland, "librdf_statement_get_subject", _wrap_librdf_statement_get_subject, -1);
8604 rb_define_module_function(mRedland, "librdf_statement_set_subject", _wrap_librdf_statement_set_subject, -1);
8605 rb_define_module_function(mRedland, "librdf_statement_get_predicate", _wrap_librdf_statement_get_predicate, -1);
8606 rb_define_module_function(mRedland, "librdf_statement_set_predicate", _wrap_librdf_statement_set_predicate, -1);
8607 rb_define_module_function(mRedland, "librdf_statement_get_object", _wrap_librdf_statement_get_object, -1);
8608 rb_define_module_function(mRedland, "librdf_statement_set_object", _wrap_librdf_statement_set_object, -1);
8609 rb_define_module_function(mRedland, "librdf_statement_equals", _wrap_librdf_statement_equals, -1);
8610 rb_define_module_function(mRedland, "librdf_statement_match", _wrap_librdf_statement_match, -1);
8611 rb_define_module_function(mRedland, "librdf_statement_to_string", _wrap_librdf_statement_to_string, -1);
8612 rb_define_module_function(mRedland, "librdf_statement_is_complete", _wrap_librdf_statement_is_complete, -1);
8613 rb_define_module_function(mRedland, "librdf_new_model", _wrap_librdf_new_model, -1);
8614 rb_define_module_function(mRedland, "librdf_new_model_with_options", _wrap_librdf_new_model_with_options, -1);
8615 rb_define_module_function(mRedland, "librdf_new_model_from_model", _wrap_librdf_new_model_from_model, -1);
8616 rb_define_module_function(mRedland, "librdf_free_model", _wrap_librdf_free_model, -1);
8617 rb_define_module_function(mRedland, "librdf_model_size", _wrap_librdf_model_size, -1);
8618 rb_define_module_function(mRedland, "librdf_model_add", _wrap_librdf_model_add, -1);
8619 rb_define_module_function(mRedland, "librdf_model_add_string_literal_statement", _wrap_librdf_model_add_string_literal_statement, -1);
8620 rb_define_module_function(mRedland, "librdf_model_add_typed_literal_statement", _wrap_librdf_model_add_typed_literal_statement, -1);
8621 rb_define_module_function(mRedland, "librdf_model_add_statement", _wrap_librdf_model_add_statement, -1);
8622 rb_define_module_function(mRedland, "librdf_model_add_statements", _wrap_librdf_model_add_statements, -1);
8623 rb_define_module_function(mRedland, "librdf_model_remove_statement", _wrap_librdf_model_remove_statement, -1);
8624 rb_define_module_function(mRedland, "librdf_model_contains_statement", _wrap_librdf_model_contains_statement, -1);
8625 rb_define_module_function(mRedland, "librdf_model_as_stream", _wrap_librdf_model_as_stream, -1);
8626 rb_define_module_function(mRedland, "librdf_model_find_statements", _wrap_librdf_model_find_statements, -1);
8627 rb_define_module_function(mRedland, "librdf_model_find_statements_in_context", _wrap_librdf_model_find_statements_in_context, -1);
8628 rb_define_module_function(mRedland, "librdf_model_get_sources", _wrap_librdf_model_get_sources, -1);
8629 rb_define_module_function(mRedland, "librdf_model_get_arcs", _wrap_librdf_model_get_arcs, -1);
8630 rb_define_module_function(mRedland, "librdf_model_get_targets", _wrap_librdf_model_get_targets, -1);
8631 rb_define_module_function(mRedland, "librdf_model_get_source", _wrap_librdf_model_get_source, -1);
8632 rb_define_module_function(mRedland, "librdf_model_get_arc", _wrap_librdf_model_get_arc, -1);
8633 rb_define_module_function(mRedland, "librdf_model_get_arcs_out", _wrap_librdf_model_get_arcs_out, -1);
8634 rb_define_module_function(mRedland, "librdf_model_get_arcs_in", _wrap_librdf_model_get_arcs_in, -1);
8635 rb_define_module_function(mRedland, "librdf_model_has_arc_in", _wrap_librdf_model_has_arc_in, -1);
8636 rb_define_module_function(mRedland, "librdf_model_has_arc_out", _wrap_librdf_model_has_arc_out, -1);
8637 rb_define_module_function(mRedland, "librdf_model_get_target", _wrap_librdf_model_get_target, -1);
8638 rb_define_module_function(mRedland, "librdf_model_context_add_statement", _wrap_librdf_model_context_add_statement, -1);
8639 rb_define_module_function(mRedland, "librdf_model_context_add_statements", _wrap_librdf_model_context_add_statements, -1);
8640 rb_define_module_function(mRedland, "librdf_model_context_remove_statement", _wrap_librdf_model_context_remove_statement, -1);
8641 rb_define_module_function(mRedland, "librdf_model_context_remove_statements", _wrap_librdf_model_context_remove_statements, -1);
8642 rb_define_module_function(mRedland, "librdf_model_context_as_stream", _wrap_librdf_model_context_as_stream, -1);
8643 rb_define_module_function(mRedland, "librdf_model_sync", _wrap_librdf_model_sync, -1);
8644 rb_define_module_function(mRedland, "librdf_model_get_contexts", _wrap_librdf_model_get_contexts, -1);
8645 rb_define_module_function(mRedland, "librdf_model_contains_context", _wrap_librdf_model_contains_context, -1);
8646 rb_define_module_function(mRedland, "librdf_model_get_feature", _wrap_librdf_model_get_feature, -1);
8647 rb_define_module_function(mRedland, "librdf_model_set_feature", _wrap_librdf_model_set_feature, -1);
8648 rb_define_module_function(mRedland, "librdf_model_load", _wrap_librdf_model_load, -1);
8649 rb_define_module_function(mRedland, "librdf_model_query_execute", _wrap_librdf_model_query_execute, -1);
8650 rb_define_module_function(mRedland, "librdf_model_to_string", _wrap_librdf_model_to_string, -1);
8651 rb_define_module_function(mRedland, "librdf_model_transaction_start", _wrap_librdf_model_transaction_start, -1);
8652 rb_define_module_function(mRedland, "librdf_model_transaction_commit", _wrap_librdf_model_transaction_commit, -1);
8653 rb_define_module_function(mRedland, "librdf_model_transaction_rollback", _wrap_librdf_model_transaction_rollback, -1);
8654 rb_define_module_function(mRedland, "librdf_new_storage", _wrap_librdf_new_storage, -1);
8655 rb_define_module_function(mRedland, "librdf_new_storage_from_storage", _wrap_librdf_new_storage_from_storage, -1);
8656 rb_define_module_function(mRedland, "librdf_free_storage", _wrap_librdf_free_storage, -1);
8657 rb_define_module_function(mRedland, "librdf_parser_check_name", _wrap_librdf_parser_check_name, -1);
8658 rb_define_module_function(mRedland, "librdf_new_parser", _wrap_librdf_new_parser, -1);
8659 rb_define_module_function(mRedland, "librdf_free_parser", _wrap_librdf_free_parser, -1);
8660 rb_define_module_function(mRedland, "librdf_parser_parse_as_stream", _wrap_librdf_parser_parse_as_stream, -1);
8661 rb_define_module_function(mRedland, "librdf_parser_parse_into_model", _wrap_librdf_parser_parse_into_model, -1);
8662 rb_define_module_function(mRedland, "librdf_parser_parse_string_as_stream", _wrap_librdf_parser_parse_string_as_stream, -1);
8663 rb_define_module_function(mRedland, "librdf_parser_parse_string_into_model", _wrap_librdf_parser_parse_string_into_model, -1);
8664 rb_define_module_function(mRedland, "librdf_parser_parse_counted_string_as_stream", _wrap_librdf_parser_parse_counted_string_as_stream, -1);
8665 rb_define_module_function(mRedland, "librdf_parser_parse_counted_string_into_model", _wrap_librdf_parser_parse_counted_string_into_model, -1);
8666 rb_define_module_function(mRedland, "librdf_parser_get_feature", _wrap_librdf_parser_get_feature, -1);
8667 rb_define_module_function(mRedland, "librdf_parser_set_feature", _wrap_librdf_parser_set_feature, -1);
8668 rb_define_module_function(mRedland, "librdf_parser_guess_name", _wrap_librdf_parser_guess_name, -1);
8669 rb_define_module_function(mRedland, "librdf_parser_guess_name2", _wrap_librdf_parser_guess_name2, -1);
8670 rb_define_module_function(mRedland, "librdf_parser_get_namespaces_seen_prefix", _wrap_librdf_parser_get_namespaces_seen_prefix, -1);
8671 rb_define_module_function(mRedland, "librdf_parser_get_namespaces_seen_uri", _wrap_librdf_parser_get_namespaces_seen_uri, -1);
8672 rb_define_module_function(mRedland, "librdf_parser_get_namespaces_seen_count", _wrap_librdf_parser_get_namespaces_seen_count, -1);
8673 rb_define_module_function(mRedland, "librdf_new_query", _wrap_librdf_new_query, -1);
8674 rb_define_module_function(mRedland, "librdf_new_query_from_query", _wrap_librdf_new_query_from_query, -1);
8675 rb_define_module_function(mRedland, "librdf_free_query", _wrap_librdf_free_query, -1);
8676 rb_define_module_function(mRedland, "librdf_query_execute", _wrap_librdf_query_execute, -1);
8677 rb_define_module_function(mRedland, "librdf_query_get_limit", _wrap_librdf_query_get_limit, -1);
8678 rb_define_module_function(mRedland, "librdf_query_set_limit", _wrap_librdf_query_set_limit, -1);
8679 rb_define_module_function(mRedland, "librdf_query_get_offset", _wrap_librdf_query_get_offset, -1);
8680 rb_define_module_function(mRedland, "librdf_query_set_offset", _wrap_librdf_query_set_offset, -1);
8681 rb_define_module_function(mRedland, "librdf_query_results_as_stream", _wrap_librdf_query_results_as_stream, -1);
8682 rb_define_module_function(mRedland, "librdf_query_results_get_count", _wrap_librdf_query_results_get_count, -1);
8683 rb_define_module_function(mRedland, "librdf_query_results_next", _wrap_librdf_query_results_next, -1);
8684 rb_define_module_function(mRedland, "librdf_query_results_finished", _wrap_librdf_query_results_finished, -1);
8685 rb_define_module_function(mRedland, "librdf_query_results_get_binding_value", _wrap_librdf_query_results_get_binding_value, -1);
8686 rb_define_module_function(mRedland, "librdf_query_results_get_binding_name", _wrap_librdf_query_results_get_binding_name, -1);
8687 rb_define_module_function(mRedland, "librdf_query_results_get_binding_value_by_name", _wrap_librdf_query_results_get_binding_value_by_name, -1);
8688 rb_define_module_function(mRedland, "librdf_query_results_get_bindings_count", _wrap_librdf_query_results_get_bindings_count, -1);
8689 rb_define_module_function(mRedland, "librdf_query_results_to_file", _wrap_librdf_query_results_to_file, -1);
8690 rb_define_module_function(mRedland, "librdf_query_results_to_file2", _wrap_librdf_query_results_to_file2, -1);
8691 rb_define_module_function(mRedland, "librdf_query_results_to_string", _wrap_librdf_query_results_to_string, -1);
8692 rb_define_module_function(mRedland, "librdf_query_results_to_string2", _wrap_librdf_query_results_to_string2, -1);
8693 rb_define_module_function(mRedland, "librdf_free_query_results", _wrap_librdf_free_query_results, -1);
8694 rb_define_module_function(mRedland, "librdf_query_results_is_bindings", _wrap_librdf_query_results_is_bindings, -1);
8695 rb_define_module_function(mRedland, "librdf_query_results_is_boolean", _wrap_librdf_query_results_is_boolean, -1);
8696 rb_define_module_function(mRedland, "librdf_query_results_is_graph", _wrap_librdf_query_results_is_graph, -1);
8697 rb_define_module_function(mRedland, "librdf_query_results_is_syntax", _wrap_librdf_query_results_is_syntax, -1);
8698 rb_define_module_function(mRedland, "librdf_query_results_get_boolean", _wrap_librdf_query_results_get_boolean, -1);
8699 rb_define_module_function(mRedland, "librdf_serializer_check_name", _wrap_librdf_serializer_check_name, -1);
8700 rb_define_module_function(mRedland, "librdf_new_serializer", _wrap_librdf_new_serializer, -1);
8701 rb_define_module_function(mRedland, "librdf_free_serializer", _wrap_librdf_free_serializer, -1);
8702 rb_define_module_function(mRedland, "librdf_serializer_serialize_stream_to_file", _wrap_librdf_serializer_serialize_stream_to_file, -1);
8703 rb_define_module_function(mRedland, "librdf_serializer_serialize_model_to_file", _wrap_librdf_serializer_serialize_model_to_file, -1);
8704 rb_define_module_function(mRedland, "librdf_serializer_serialize_stream_to_string", _wrap_librdf_serializer_serialize_stream_to_string, -1);
8705 rb_define_module_function(mRedland, "librdf_serializer_serialize_model_to_string", _wrap_librdf_serializer_serialize_model_to_string, -1);
8706 rb_define_module_function(mRedland, "librdf_serializer_get_feature", _wrap_librdf_serializer_get_feature, -1);
8707 rb_define_module_function(mRedland, "librdf_serializer_set_feature", _wrap_librdf_serializer_set_feature, -1);
8708 rb_define_module_function(mRedland, "librdf_serializer_set_namespace", _wrap_librdf_serializer_set_namespace, -1);
8709 rb_define_module_function(mRedland, "librdf_free_stream", _wrap_librdf_free_stream, -1);
8710 rb_define_module_function(mRedland, "librdf_stream_end", _wrap_librdf_stream_end, -1);
8711 rb_define_module_function(mRedland, "librdf_stream_next", _wrap_librdf_stream_next, -1);
8712 rb_define_module_function(mRedland, "librdf_stream_get_object", _wrap_librdf_stream_get_object, -1);
8713 rb_define_module_function(mRedland, "librdf_stream_get_context", _wrap_librdf_stream_get_context, -1);
8714 rb_define_module_function(mRedland, "librdf_log_message_code", _wrap_librdf_log_message_code, -1);
8715 rb_define_module_function(mRedland, "librdf_log_message_level", _wrap_librdf_log_message_level, -1);
8716 rb_define_module_function(mRedland, "librdf_log_message_facility", _wrap_librdf_log_message_facility, -1);
8717 rb_define_module_function(mRedland, "librdf_log_message_message", _wrap_librdf_log_message_message, -1);
8718 rb_define_module_function(mRedland, "librdf_log_message_locator", _wrap_librdf_log_message_locator, -1);
8719 rb_define_module_function(mRedland, "raptor_locator_line", _wrap_raptor_locator_line, -1);
8720 rb_define_module_function(mRedland, "raptor_locator_column", _wrap_raptor_locator_column, -1);
8721 rb_define_module_function(mRedland, "raptor_locator_byte", _wrap_raptor_locator_byte, -1);
8722 rb_define_module_function(mRedland, "raptor_locator_file", _wrap_raptor_locator_file, -1);
8723 rb_define_module_function(mRedland, "raptor_locator_uri", _wrap_raptor_locator_uri, -1);
8724 rb_define_module_function(mRedland, "librdf_internal_test_error", _wrap_librdf_internal_test_error, -1);
8725 rb_define_module_function(mRedland, "librdf_internal_test_warning", _wrap_librdf_internal_test_warning, -1);
8726 rb_define_singleton_method(mRedland, "librdf_short_copyright_string", _wrap_librdf_short_copyright_string_get, 0);
8727 rb_define_singleton_method(mRedland, "librdf_copyright_string", _wrap_librdf_copyright_string_get, 0);
8728 rb_define_singleton_method(mRedland, "librdf_version_string", _wrap_librdf_version_string_get, 0);
8729 rb_define_singleton_method(mRedland, "librdf_version_major", _wrap_librdf_version_major_get, 0);
8730 rb_define_singleton_method(mRedland, "librdf_version_minor", _wrap_librdf_version_minor_get, 0);
8731 rb_define_singleton_method(mRedland, "librdf_version_release", _wrap_librdf_version_release_get, 0);
8732 rb_define_singleton_method(mRedland, "librdf_version_decimal", _wrap_librdf_version_decimal_get, 0);
8733 rb_define_singleton_method(mRedland, "raptor_version_string", _wrap_raptor_version_string_get, 0);
8734 rb_define_singleton_method(mRedland, "raptor_version_major", _wrap_raptor_version_major_get, 0);
8735 rb_define_singleton_method(mRedland, "raptor_version_minor", _wrap_raptor_version_minor_get, 0);
8736 rb_define_singleton_method(mRedland, "raptor_version_release", _wrap_raptor_version_release_get, 0);
8737 rb_define_singleton_method(mRedland, "raptor_version_decimal", _wrap_raptor_version_decimal_get, 0);
8738 rb_define_singleton_method(mRedland, "rasqal_version_string", _wrap_rasqal_version_string_get, 0);
8739 rb_define_singleton_method(mRedland, "rasqal_version_major", _wrap_rasqal_version_major_get, 0);
8740 rb_define_singleton_method(mRedland, "rasqal_version_minor", _wrap_rasqal_version_minor_get, 0);
8741 rb_define_singleton_method(mRedland, "rasqal_version_release", _wrap_rasqal_version_release_get, 0);
8742 rb_define_singleton_method(mRedland, "rasqal_version_decimal", _wrap_rasqal_version_decimal_get, 0);
8743 }
8744
8745