dep_selector 0.0.8 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/ext/dep_gecode/dep_selector_swig.i +2 -1
- data/ext/dep_gecode/dep_selector_swig_wrap.cxx +530 -180
- data/ext/dep_gecode/dep_selector_to_gecode.cpp +404 -360
- data/ext/dep_gecode/dep_selector_to_gecode.h +13 -5
- data/ext/dep_gecode/dep_selector_to_gecode_interface.cpp +3 -2
- data/ext/dep_gecode/dep_selector_to_gecode_interface.h +2 -1
- data/ext/dep_gecode/extconf.rb +24 -6
- data/lib/dep_selector/dep_selector_version.rb +1 -1
- data/lib/dep_selector/dependency_graph.rb +4 -1
- data/lib/dep_selector/error_reporter/simple_tree_traverser.rb +4 -0
- data/lib/dep_selector/exceptions.rb +5 -0
- data/lib/dep_selector/gecode_wrapper.rb +7 -4
- data/lib/dep_selector/selector.rb +46 -40
- metadata +71 -43
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 65eccadd24905931cab90dc78402759be7b5f1eb
|
4
|
+
data.tar.gz: db9220b82552eb1b3796b93f80915b9f7c5a52ef
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a99887a3e3e55c8ef559997778697b8f2c97c2b868cad556a9797498693211ff223e166cd1d29c44dc2493734d1aa9476893cf1fade2e01a1dc6e888e482d3e1
|
7
|
+
data.tar.gz: 109afbf133399e1b19c1616dd99f18657c4597c9c91310f0c1ea57e5ebd97948089fd88307c147fba3c688d4130fa2f38c9259d6d1790a7d9629961af88933a3
|
@@ -27,7 +27,8 @@
|
|
27
27
|
|
28
28
|
class VersionProblem;
|
29
29
|
|
30
|
-
VersionProblem * VersionProblemCreate(int packageCount, bool dumpStats,
|
30
|
+
VersionProblem * VersionProblemCreate(int packageCount, bool dumpStats,
|
31
|
+
bool debug, const char * log_id);
|
31
32
|
void VersionProblemDestroy(VersionProblem * vp);
|
32
33
|
|
33
34
|
int VersionProblemSize(VersionProblem *p);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
-
* Version
|
3
|
+
* Version 2.0.4
|
4
4
|
*
|
5
5
|
* This file is not intended to be easily readable and contains a number of
|
6
6
|
* coding conventions designed to improve portability and efficiency. Do not make
|
@@ -10,20 +10,28 @@
|
|
10
10
|
|
11
11
|
#define SWIGRUBY
|
12
12
|
|
13
|
+
|
13
14
|
#ifdef __cplusplus
|
14
|
-
|
15
|
-
|
15
|
+
/* SwigValueWrapper is described in swig.swg */
|
16
|
+
template<typename T> class SwigValueWrapper {
|
17
|
+
struct SwigMovePointer {
|
18
|
+
T *ptr;
|
19
|
+
SwigMovePointer(T *p) : ptr(p) { }
|
20
|
+
~SwigMovePointer() { delete ptr; }
|
21
|
+
SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
|
22
|
+
} pointer;
|
23
|
+
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
|
24
|
+
SwigValueWrapper(const SwigValueWrapper<T>& rhs);
|
16
25
|
public:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
|
22
|
-
operator T&() const { return *tt; }
|
23
|
-
T *operator&() { return tt; }
|
24
|
-
private:
|
25
|
-
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
|
26
|
+
SwigValueWrapper() : pointer(0) { }
|
27
|
+
SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
|
28
|
+
operator T&() const { return *pointer.ptr; }
|
29
|
+
T *operator&() { return pointer.ptr; }
|
26
30
|
};
|
31
|
+
|
32
|
+
template <typename T> T SwigValueInit() {
|
33
|
+
return T();
|
34
|
+
}
|
27
35
|
#endif
|
28
36
|
|
29
37
|
/* -----------------------------------------------------------------------------
|
@@ -33,14 +41,14 @@ private:
|
|
33
41
|
|
34
42
|
/* template workaround for compilers that cannot correctly implement the C++ standard */
|
35
43
|
#ifndef SWIGTEMPLATEDISAMBIGUATOR
|
36
|
-
# if defined(__SUNPRO_CC)
|
37
|
-
#
|
38
|
-
#
|
39
|
-
|
40
|
-
|
41
|
-
#
|
44
|
+
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
|
45
|
+
# define SWIGTEMPLATEDISAMBIGUATOR template
|
46
|
+
# elif defined(__HP_aCC)
|
47
|
+
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
|
48
|
+
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
|
49
|
+
# define SWIGTEMPLATEDISAMBIGUATOR template
|
42
50
|
# else
|
43
|
-
#
|
51
|
+
# define SWIGTEMPLATEDISAMBIGUATOR
|
44
52
|
# endif
|
45
53
|
#endif
|
46
54
|
|
@@ -68,6 +76,12 @@ private:
|
|
68
76
|
# endif
|
69
77
|
#endif
|
70
78
|
|
79
|
+
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
80
|
+
# if defined(_MSC_VER)
|
81
|
+
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
82
|
+
# endif
|
83
|
+
#endif
|
84
|
+
|
71
85
|
#ifndef SWIGUNUSEDPARM
|
72
86
|
# ifdef __cplusplus
|
73
87
|
# define SWIGUNUSEDPARM(p)
|
@@ -123,6 +137,12 @@ private:
|
|
123
137
|
# define _CRT_SECURE_NO_DEPRECATE
|
124
138
|
#endif
|
125
139
|
|
140
|
+
/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
|
141
|
+
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
|
142
|
+
# define _SCL_SECURE_NO_DEPRECATE
|
143
|
+
#endif
|
144
|
+
|
145
|
+
|
126
146
|
/* -----------------------------------------------------------------------------
|
127
147
|
* This section contains generic SWIG labels for method/variable
|
128
148
|
* declarations/attributes, and other compiler dependent labels.
|
@@ -130,14 +150,14 @@ private:
|
|
130
150
|
|
131
151
|
/* template workaround for compilers that cannot correctly implement the C++ standard */
|
132
152
|
#ifndef SWIGTEMPLATEDISAMBIGUATOR
|
133
|
-
# if defined(__SUNPRO_CC)
|
134
|
-
#
|
135
|
-
#
|
136
|
-
|
137
|
-
|
138
|
-
#
|
153
|
+
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
|
154
|
+
# define SWIGTEMPLATEDISAMBIGUATOR template
|
155
|
+
# elif defined(__HP_aCC)
|
156
|
+
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
|
157
|
+
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
|
158
|
+
# define SWIGTEMPLATEDISAMBIGUATOR template
|
139
159
|
# else
|
140
|
-
#
|
160
|
+
# define SWIGTEMPLATEDISAMBIGUATOR
|
141
161
|
# endif
|
142
162
|
#endif
|
143
163
|
|
@@ -165,6 +185,12 @@ private:
|
|
165
185
|
# endif
|
166
186
|
#endif
|
167
187
|
|
188
|
+
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
189
|
+
# if defined(_MSC_VER)
|
190
|
+
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
191
|
+
# endif
|
192
|
+
#endif
|
193
|
+
|
168
194
|
#ifndef SWIGUNUSEDPARM
|
169
195
|
# ifdef __cplusplus
|
170
196
|
# define SWIGUNUSEDPARM(p)
|
@@ -220,16 +246,22 @@ private:
|
|
220
246
|
# define _CRT_SECURE_NO_DEPRECATE
|
221
247
|
#endif
|
222
248
|
|
249
|
+
/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
|
250
|
+
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
|
251
|
+
# define _SCL_SECURE_NO_DEPRECATE
|
252
|
+
#endif
|
253
|
+
|
254
|
+
|
223
255
|
/* -----------------------------------------------------------------------------
|
224
256
|
* swigrun.swg
|
225
257
|
*
|
226
|
-
* This file contains generic
|
258
|
+
* This file contains generic C API SWIG runtime support for pointer
|
227
259
|
* type checking.
|
228
260
|
* ----------------------------------------------------------------------------- */
|
229
261
|
|
230
262
|
/* This should only be incremented when either the layout of swig_type_info changes,
|
231
263
|
or for whatever reason, the runtime changes incompatibly */
|
232
|
-
#define SWIG_RUNTIME_VERSION "
|
264
|
+
#define SWIG_RUNTIME_VERSION "4"
|
233
265
|
|
234
266
|
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
|
235
267
|
#ifdef SWIG_TYPE_TABLE
|
@@ -242,11 +274,11 @@ private:
|
|
242
274
|
|
243
275
|
/*
|
244
276
|
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
|
245
|
-
creating a static or dynamic library from the
|
246
|
-
In 99.9% of the cases,
|
277
|
+
creating a static or dynamic library from the SWIG runtime code.
|
278
|
+
In 99.9% of the cases, SWIG just needs to declare them as 'static'.
|
247
279
|
|
248
|
-
But only do this if
|
249
|
-
with your compiler or
|
280
|
+
But only do this if strictly necessary, ie, if you have problems
|
281
|
+
with your compiler or suchlike.
|
250
282
|
*/
|
251
283
|
|
252
284
|
#ifndef SWIGRUNTIME
|
@@ -264,6 +296,7 @@ private:
|
|
264
296
|
|
265
297
|
/* Flags for pointer conversions */
|
266
298
|
#define SWIG_POINTER_DISOWN 0x1
|
299
|
+
#define SWIG_CAST_NEW_MEMORY 0x2
|
267
300
|
|
268
301
|
/* Flags for new pointer objects */
|
269
302
|
#define SWIG_POINTER_OWN 0x1
|
@@ -272,14 +305,14 @@ private:
|
|
272
305
|
/*
|
273
306
|
Flags/methods for returning states.
|
274
307
|
|
275
|
-
The
|
308
|
+
The SWIG conversion methods, as ConvertPtr, return an integer
|
276
309
|
that tells if the conversion was successful or not. And if not,
|
277
310
|
an error code can be returned (see swigerrors.swg for the codes).
|
278
311
|
|
279
312
|
Use the following macros/flags to set or process the returning
|
280
313
|
states.
|
281
314
|
|
282
|
-
In old
|
315
|
+
In old versions of SWIG, code such as the following was usually written:
|
283
316
|
|
284
317
|
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
|
285
318
|
// success code
|
@@ -287,7 +320,7 @@ private:
|
|
287
320
|
//fail code
|
288
321
|
}
|
289
322
|
|
290
|
-
Now you can be more explicit
|
323
|
+
Now you can be more explicit:
|
291
324
|
|
292
325
|
int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
|
293
326
|
if (SWIG_IsOK(res)) {
|
@@ -296,7 +329,7 @@ private:
|
|
296
329
|
// fail code
|
297
330
|
}
|
298
331
|
|
299
|
-
|
332
|
+
which is the same really, but now you can also do
|
300
333
|
|
301
334
|
Type *ptr;
|
302
335
|
int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
|
@@ -314,7 +347,7 @@ private:
|
|
314
347
|
|
315
348
|
I.e., now SWIG_ConvertPtr can return new objects and you can
|
316
349
|
identify the case and take care of the deallocation. Of course that
|
317
|
-
|
350
|
+
also requires SWIG_ConvertPtr to return new result values, such as
|
318
351
|
|
319
352
|
int SWIG_ConvertPtr(obj, ptr,...) {
|
320
353
|
if (<obj is ok>) {
|
@@ -332,7 +365,7 @@ private:
|
|
332
365
|
|
333
366
|
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
|
334
367
|
more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
|
335
|
-
|
368
|
+
SWIG errors code.
|
336
369
|
|
337
370
|
Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
|
338
371
|
allows to return the 'cast rank', for example, if you have this
|
@@ -346,9 +379,8 @@ private:
|
|
346
379
|
fooi(1) // cast rank '0'
|
347
380
|
|
348
381
|
just use the SWIG_AddCast()/SWIG_CheckState()
|
382
|
+
*/
|
349
383
|
|
350
|
-
|
351
|
-
*/
|
352
384
|
#define SWIG_OK (0)
|
353
385
|
#define SWIG_ERROR (-1)
|
354
386
|
#define SWIG_IsOK(r) (r >= 0)
|
@@ -373,7 +405,6 @@ private:
|
|
373
405
|
#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
|
374
406
|
#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
|
375
407
|
|
376
|
-
|
377
408
|
/* Cast-Rank Mode */
|
378
409
|
#if defined(SWIG_CASTRANK_MODE)
|
379
410
|
# ifndef SWIG_TypeRank
|
@@ -396,18 +427,16 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
|
396
427
|
#endif
|
397
428
|
|
398
429
|
|
399
|
-
|
400
|
-
|
401
430
|
#include <string.h>
|
402
431
|
|
403
432
|
#ifdef __cplusplus
|
404
433
|
extern "C" {
|
405
434
|
#endif
|
406
435
|
|
407
|
-
typedef void *(*swig_converter_func)(void *);
|
436
|
+
typedef void *(*swig_converter_func)(void *, int *);
|
408
437
|
typedef struct swig_type_info *(*swig_dycast_func)(void **);
|
409
438
|
|
410
|
-
/* Structure to store
|
439
|
+
/* Structure to store information on one type */
|
411
440
|
typedef struct swig_type_info {
|
412
441
|
const char *name; /* mangled name of this type */
|
413
442
|
const char *str; /* human readable name of this type */
|
@@ -452,7 +481,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
|
|
452
481
|
while ((*f2 == ' ') && (f2 != l2)) ++f2;
|
453
482
|
if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
|
454
483
|
}
|
455
|
-
return (l1 - f1) - (l2 - f2);
|
484
|
+
return (int)((l1 - f1) - (l2 - f2));
|
456
485
|
}
|
457
486
|
|
458
487
|
/*
|
@@ -494,48 +523,66 @@ SWIG_TypeCompare(const char *nb, const char *tb) {
|
|
494
523
|
}
|
495
524
|
|
496
525
|
|
497
|
-
/* think of this as a c++ template<> or a scheme macro */
|
498
|
-
#define SWIG_TypeCheck_Template(comparison, ty) \
|
499
|
-
if (ty) { \
|
500
|
-
swig_cast_info *iter = ty->cast; \
|
501
|
-
while (iter) { \
|
502
|
-
if (comparison) { \
|
503
|
-
if (iter == ty->cast) return iter; \
|
504
|
-
/* Move iter to the top of the linked list */ \
|
505
|
-
iter->prev->next = iter->next; \
|
506
|
-
if (iter->next) \
|
507
|
-
iter->next->prev = iter->prev; \
|
508
|
-
iter->next = ty->cast; \
|
509
|
-
iter->prev = 0; \
|
510
|
-
if (ty->cast) ty->cast->prev = iter; \
|
511
|
-
ty->cast = iter; \
|
512
|
-
return iter; \
|
513
|
-
} \
|
514
|
-
iter = iter->next; \
|
515
|
-
} \
|
516
|
-
} \
|
517
|
-
return 0
|
518
|
-
|
519
526
|
/*
|
520
527
|
Check the typename
|
521
528
|
*/
|
522
529
|
SWIGRUNTIME swig_cast_info *
|
523
530
|
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
|
524
|
-
|
531
|
+
if (ty) {
|
532
|
+
swig_cast_info *iter = ty->cast;
|
533
|
+
while (iter) {
|
534
|
+
if (strcmp(iter->type->name, c) == 0) {
|
535
|
+
if (iter == ty->cast)
|
536
|
+
return iter;
|
537
|
+
/* Move iter to the top of the linked list */
|
538
|
+
iter->prev->next = iter->next;
|
539
|
+
if (iter->next)
|
540
|
+
iter->next->prev = iter->prev;
|
541
|
+
iter->next = ty->cast;
|
542
|
+
iter->prev = 0;
|
543
|
+
if (ty->cast) ty->cast->prev = iter;
|
544
|
+
ty->cast = iter;
|
545
|
+
return iter;
|
546
|
+
}
|
547
|
+
iter = iter->next;
|
548
|
+
}
|
549
|
+
}
|
550
|
+
return 0;
|
525
551
|
}
|
526
552
|
|
527
|
-
/*
|
553
|
+
/*
|
554
|
+
Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
|
555
|
+
*/
|
528
556
|
SWIGRUNTIME swig_cast_info *
|
529
|
-
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *
|
530
|
-
|
557
|
+
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
|
558
|
+
if (ty) {
|
559
|
+
swig_cast_info *iter = ty->cast;
|
560
|
+
while (iter) {
|
561
|
+
if (iter->type == from) {
|
562
|
+
if (iter == ty->cast)
|
563
|
+
return iter;
|
564
|
+
/* Move iter to the top of the linked list */
|
565
|
+
iter->prev->next = iter->next;
|
566
|
+
if (iter->next)
|
567
|
+
iter->next->prev = iter->prev;
|
568
|
+
iter->next = ty->cast;
|
569
|
+
iter->prev = 0;
|
570
|
+
if (ty->cast) ty->cast->prev = iter;
|
571
|
+
ty->cast = iter;
|
572
|
+
return iter;
|
573
|
+
}
|
574
|
+
iter = iter->next;
|
575
|
+
}
|
576
|
+
}
|
577
|
+
return 0;
|
531
578
|
}
|
532
579
|
|
533
580
|
/*
|
534
581
|
Cast a pointer up an inheritance hierarchy
|
535
582
|
*/
|
536
583
|
SWIGRUNTIMEINLINE void *
|
537
|
-
SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
|
538
|
-
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
|
584
|
+
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
|
585
|
+
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
|
539
586
|
}
|
540
587
|
|
541
588
|
/*
|
@@ -808,6 +855,33 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
808
855
|
|
809
856
|
#include <ruby.h>
|
810
857
|
|
858
|
+
/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
|
859
|
+
* breaks using rb_intern as an lvalue, as SWIG does. We work around this
|
860
|
+
* issue for now by disabling this.
|
861
|
+
* https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
|
862
|
+
*/
|
863
|
+
#ifdef rb_intern
|
864
|
+
# undef rb_intern
|
865
|
+
#endif
|
866
|
+
|
867
|
+
/* Remove global macros defined in Ruby's win32.h */
|
868
|
+
#ifdef write
|
869
|
+
# undef write
|
870
|
+
#endif
|
871
|
+
#ifdef read
|
872
|
+
# undef read
|
873
|
+
#endif
|
874
|
+
#ifdef bind
|
875
|
+
# undef bind
|
876
|
+
#endif
|
877
|
+
#ifdef close
|
878
|
+
# undef close
|
879
|
+
#endif
|
880
|
+
#ifdef connect
|
881
|
+
# undef connect
|
882
|
+
#endif
|
883
|
+
|
884
|
+
|
811
885
|
/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
|
812
886
|
#ifndef NUM2LL
|
813
887
|
#define NUM2LL(x) NUM2LONG((x))
|
@@ -836,12 +910,44 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
836
910
|
#ifndef RSTRING_PTR
|
837
911
|
# define RSTRING_PTR(x) RSTRING(x)->ptr
|
838
912
|
#endif
|
913
|
+
#ifndef RSTRING_END
|
914
|
+
# define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
|
915
|
+
#endif
|
839
916
|
#ifndef RARRAY_LEN
|
840
917
|
# define RARRAY_LEN(x) RARRAY(x)->len
|
841
918
|
#endif
|
842
919
|
#ifndef RARRAY_PTR
|
843
920
|
# define RARRAY_PTR(x) RARRAY(x)->ptr
|
844
921
|
#endif
|
922
|
+
#ifndef RFLOAT_VALUE
|
923
|
+
# define RFLOAT_VALUE(x) RFLOAT(x)->value
|
924
|
+
#endif
|
925
|
+
#ifndef DOUBLE2NUM
|
926
|
+
# define DOUBLE2NUM(x) rb_float_new(x)
|
927
|
+
#endif
|
928
|
+
#ifndef RHASH_TBL
|
929
|
+
# define RHASH_TBL(x) (RHASH(x)->tbl)
|
930
|
+
#endif
|
931
|
+
#ifndef RHASH_ITER_LEV
|
932
|
+
# define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
|
933
|
+
#endif
|
934
|
+
#ifndef RHASH_IFNONE
|
935
|
+
# define RHASH_IFNONE(x) (RHASH(x)->ifnone)
|
936
|
+
#endif
|
937
|
+
#ifndef RHASH_SIZE
|
938
|
+
# define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
|
939
|
+
#endif
|
940
|
+
#ifndef RHASH_EMPTY_P
|
941
|
+
# define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
|
942
|
+
#endif
|
943
|
+
#ifndef RSTRUCT_LEN
|
944
|
+
# define RSTRUCT_LEN(x) RSTRUCT(x)->len
|
945
|
+
#endif
|
946
|
+
#ifndef RSTRUCT_PTR
|
947
|
+
# define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
|
948
|
+
#endif
|
949
|
+
|
950
|
+
|
845
951
|
|
846
952
|
/*
|
847
953
|
* Need to be very careful about how these macros are defined, especially
|
@@ -903,6 +1009,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
903
1009
|
#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
|
904
1010
|
#endif
|
905
1011
|
|
1012
|
+
static VALUE _mSWIG = Qnil;
|
906
1013
|
|
907
1014
|
/* -----------------------------------------------------------------------------
|
908
1015
|
* error manipulation
|
@@ -915,7 +1022,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
915
1022
|
|
916
1023
|
/* Define custom exceptions for errors that do not map to existing Ruby
|
917
1024
|
exceptions. Note this only works for C++ since a global cannot be
|
918
|
-
initialized by a
|
1025
|
+
initialized by a function in C. For C, fallback to rb_eRuntimeError.*/
|
919
1026
|
|
920
1027
|
SWIGINTERN VALUE
|
921
1028
|
getNullReferenceError(void) {
|
@@ -993,12 +1100,73 @@ SWIG_Ruby_ErrorType(int SWIG_code) {
|
|
993
1100
|
}
|
994
1101
|
|
995
1102
|
|
1103
|
+
/* This function is called when a user inputs a wrong argument to
|
1104
|
+
a method.
|
1105
|
+
*/
|
1106
|
+
SWIGINTERN
|
1107
|
+
const char* Ruby_Format_TypeError( const char* msg,
|
1108
|
+
const char* type,
|
1109
|
+
const char* name,
|
1110
|
+
const int argn,
|
1111
|
+
VALUE input )
|
1112
|
+
{
|
1113
|
+
char buf[128];
|
1114
|
+
VALUE str;
|
1115
|
+
VALUE asStr;
|
1116
|
+
if ( msg && *msg )
|
1117
|
+
{
|
1118
|
+
str = rb_str_new2(msg);
|
1119
|
+
}
|
1120
|
+
else
|
1121
|
+
{
|
1122
|
+
str = rb_str_new(NULL, 0);
|
1123
|
+
}
|
1124
|
+
|
1125
|
+
str = rb_str_cat2( str, "Expected argument " );
|
1126
|
+
sprintf( buf, "%d of type ", argn-1 );
|
1127
|
+
str = rb_str_cat2( str, buf );
|
1128
|
+
str = rb_str_cat2( str, type );
|
1129
|
+
str = rb_str_cat2( str, ", but got " );
|
1130
|
+
str = rb_str_cat2( str, rb_obj_classname(input) );
|
1131
|
+
str = rb_str_cat2( str, " " );
|
1132
|
+
asStr = rb_inspect(input);
|
1133
|
+
if ( RSTRING_LEN(asStr) > 30 )
|
1134
|
+
{
|
1135
|
+
str = rb_str_cat( str, StringValuePtr(asStr), 30 );
|
1136
|
+
str = rb_str_cat2( str, "..." );
|
1137
|
+
}
|
1138
|
+
else
|
1139
|
+
{
|
1140
|
+
str = rb_str_append( str, asStr );
|
1141
|
+
}
|
1142
|
+
|
1143
|
+
if ( name )
|
1144
|
+
{
|
1145
|
+
str = rb_str_cat2( str, "\n\tin SWIG method '" );
|
1146
|
+
str = rb_str_cat2( str, name );
|
1147
|
+
str = rb_str_cat2( str, "'" );
|
1148
|
+
}
|
1149
|
+
|
1150
|
+
return StringValuePtr( str );
|
1151
|
+
}
|
996
1152
|
|
1153
|
+
/* This function is called when an overloaded method fails */
|
1154
|
+
SWIGINTERN
|
1155
|
+
void Ruby_Format_OverloadedError(
|
1156
|
+
const int argc,
|
1157
|
+
const int maxargs,
|
1158
|
+
const char* method,
|
1159
|
+
const char* prototypes
|
1160
|
+
)
|
1161
|
+
{
|
1162
|
+
const char* msg = "Wrong # of arguments";
|
1163
|
+
if ( argc <= maxargs ) msg = "Wrong arguments";
|
1164
|
+
rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"
|
1165
|
+
"Possible C/C++ prototypes are:\n%s",
|
1166
|
+
msg, method, prototypes);
|
1167
|
+
}
|
997
1168
|
|
998
1169
|
/* -----------------------------------------------------------------------------
|
999
|
-
* See the LICENSE file for information on copyright, usage and redistribution
|
1000
|
-
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
|
1001
|
-
*
|
1002
1170
|
* rubytracking.swg
|
1003
1171
|
*
|
1004
1172
|
* This file contains support for tracking mappings from
|
@@ -1011,26 +1179,54 @@ SWIG_Ruby_ErrorType(int SWIG_code) {
|
|
1011
1179
|
extern "C" {
|
1012
1180
|
#endif
|
1013
1181
|
|
1182
|
+
/* Ruby 1.8 actually assumes the first case. */
|
1183
|
+
#if SIZEOF_VOIDP == SIZEOF_LONG
|
1184
|
+
# define SWIG2NUM(v) LONG2NUM((unsigned long)v)
|
1185
|
+
# define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
|
1186
|
+
#elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
|
1187
|
+
# define SWIG2NUM(v) LL2NUM((unsigned long long)v)
|
1188
|
+
# define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
|
1189
|
+
#else
|
1190
|
+
# error sizeof(void*) is not the same as long or long long
|
1191
|
+
#endif
|
1192
|
+
|
1014
1193
|
|
1015
1194
|
/* Global Ruby hash table to store Trackings from C/C++
|
1016
|
-
structs to Ruby Objects.
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1195
|
+
structs to Ruby Objects.
|
1196
|
+
*/
|
1197
|
+
static VALUE swig_ruby_trackings = Qnil;
|
1198
|
+
|
1199
|
+
/* Global variable that stores a reference to the ruby
|
1200
|
+
hash table delete function. */
|
1201
|
+
static ID swig_ruby_hash_delete;
|
1022
1202
|
|
1023
1203
|
/* Setup a Ruby hash table to store Trackings */
|
1024
1204
|
SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
|
1025
1205
|
/* Create a ruby hash table to store Trackings from C++
|
1026
|
-
objects to Ruby objects.
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1206
|
+
objects to Ruby objects. */
|
1207
|
+
|
1208
|
+
/* Try to see if some other .so has already created a
|
1209
|
+
tracking hash table, which we keep hidden in an instance var
|
1210
|
+
in the SWIG module.
|
1211
|
+
This is done to allow multiple DSOs to share the same
|
1212
|
+
tracking table.
|
1213
|
+
*/
|
1214
|
+
ID trackings_id = rb_intern( "@__trackings__" );
|
1215
|
+
VALUE verbose = rb_gv_get("VERBOSE");
|
1216
|
+
rb_gv_set("VERBOSE", Qfalse);
|
1217
|
+
swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
|
1218
|
+
rb_gv_set("VERBOSE", verbose);
|
1219
|
+
|
1220
|
+
/* No, it hasn't. Create one ourselves */
|
1221
|
+
if ( swig_ruby_trackings == Qnil )
|
1222
|
+
{
|
1223
|
+
swig_ruby_trackings = rb_hash_new();
|
1224
|
+
rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
/* Now store a reference to the hash table delete function
|
1228
|
+
so that we only have to look it up once.*/
|
1229
|
+
swig_ruby_hash_delete = rb_intern("delete");
|
1034
1230
|
}
|
1035
1231
|
|
1036
1232
|
/* Get a Ruby number to reference a pointer */
|
@@ -1040,8 +1236,7 @@ SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
|
|
1040
1236
|
a Ruby number object. */
|
1041
1237
|
|
1042
1238
|
/* Convert the pointer to a Ruby number */
|
1043
|
-
|
1044
|
-
return LONG2NUM(value);
|
1239
|
+
return SWIG2NUM(ptr);
|
1045
1240
|
}
|
1046
1241
|
|
1047
1242
|
/* Get a Ruby number to reference an object */
|
@@ -1051,8 +1246,7 @@ SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
|
|
1051
1246
|
a Ruby number object. */
|
1052
1247
|
|
1053
1248
|
/* Convert the Object to a Ruby number */
|
1054
|
-
|
1055
|
-
return LONG2NUM(value);
|
1249
|
+
return SWIG2NUM(object);
|
1056
1250
|
}
|
1057
1251
|
|
1058
1252
|
/* Get a Ruby object from a previously stored reference */
|
@@ -1060,9 +1254,8 @@ SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
|
|
1060
1254
|
/* The provided Ruby number object is a reference
|
1061
1255
|
to the Ruby object we want.*/
|
1062
1256
|
|
1063
|
-
/*
|
1064
|
-
|
1065
|
-
return (VALUE) value;
|
1257
|
+
/* Convert the Ruby number to a Ruby object */
|
1258
|
+
return NUM2SWIG(reference);
|
1066
1259
|
}
|
1067
1260
|
|
1068
1261
|
/* Add a Tracking from a C/C++ struct to a Ruby object */
|
@@ -1154,15 +1347,21 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1154
1347
|
return target;
|
1155
1348
|
}
|
1156
1349
|
|
1350
|
+
/* For ruby1.8.4 and earlier. */
|
1351
|
+
#ifndef RUBY_INIT_STACK
|
1352
|
+
RUBY_EXTERN void Init_stack(VALUE* addr);
|
1353
|
+
# define RUBY_INIT_STACK \
|
1354
|
+
VALUE variable_in_this_stack_frame; \
|
1355
|
+
Init_stack(&variable_in_this_stack_frame);
|
1356
|
+
#endif
|
1357
|
+
|
1358
|
+
|
1157
1359
|
#ifdef __cplusplus
|
1158
1360
|
}
|
1159
1361
|
#endif
|
1160
1362
|
|
1161
1363
|
|
1162
1364
|
/* -----------------------------------------------------------------------------
|
1163
|
-
* See the LICENSE file for information on copyright, usage and redistribution
|
1164
|
-
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
|
1165
|
-
*
|
1166
1365
|
* rubyrun.swg
|
1167
1366
|
*
|
1168
1367
|
* This file contains the runtime support for Ruby modules
|
@@ -1206,7 +1405,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1206
1405
|
/* Error manipulation */
|
1207
1406
|
|
1208
1407
|
#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
|
1209
|
-
#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg)
|
1408
|
+
#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
|
1210
1409
|
#define SWIG_fail goto fail
|
1211
1410
|
|
1212
1411
|
|
@@ -1218,6 +1417,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1218
1417
|
#define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
|
1219
1418
|
#define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
|
1220
1419
|
|
1420
|
+
#include "assert.h"
|
1221
1421
|
|
1222
1422
|
/* -----------------------------------------------------------------------------
|
1223
1423
|
* pointers/data manipulation
|
@@ -1225,9 +1425,6 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1225
1425
|
|
1226
1426
|
#ifdef __cplusplus
|
1227
1427
|
extern "C" {
|
1228
|
-
#if 0
|
1229
|
-
} /* cc-mode */
|
1230
|
-
#endif
|
1231
1428
|
#endif
|
1232
1429
|
|
1233
1430
|
typedef struct {
|
@@ -1239,10 +1436,44 @@ typedef struct {
|
|
1239
1436
|
} swig_class;
|
1240
1437
|
|
1241
1438
|
|
1242
|
-
|
1439
|
+
/* Global pointer used to keep some internal SWIG stuff */
|
1243
1440
|
static VALUE _cSWIG_Pointer = Qnil;
|
1244
1441
|
static VALUE swig_runtime_data_type_pointer = Qnil;
|
1245
1442
|
|
1443
|
+
/* Global IDs used to keep some internal SWIG stuff */
|
1444
|
+
static ID swig_arity_id = 0;
|
1445
|
+
static ID swig_call_id = 0;
|
1446
|
+
|
1447
|
+
/*
|
1448
|
+
If your swig extension is to be run within an embedded ruby and has
|
1449
|
+
director callbacks, you should set -DRUBY_EMBEDDED during compilation.
|
1450
|
+
This will reset ruby's stack frame on each entry point from the main
|
1451
|
+
program the first time a virtual director function is invoked (in a
|
1452
|
+
non-recursive way).
|
1453
|
+
If this is not done, you run the risk of Ruby trashing the stack.
|
1454
|
+
*/
|
1455
|
+
|
1456
|
+
#ifdef RUBY_EMBEDDED
|
1457
|
+
|
1458
|
+
# define SWIG_INIT_STACK \
|
1459
|
+
if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
|
1460
|
+
++swig_virtual_calls;
|
1461
|
+
# define SWIG_RELEASE_STACK --swig_virtual_calls;
|
1462
|
+
# define Ruby_DirectorTypeMismatchException(x) \
|
1463
|
+
rb_raise( rb_eTypeError, "%s", x ); return c_result;
|
1464
|
+
|
1465
|
+
static unsigned int swig_virtual_calls = 0;
|
1466
|
+
|
1467
|
+
#else /* normal non-embedded extension */
|
1468
|
+
|
1469
|
+
# define SWIG_INIT_STACK
|
1470
|
+
# define SWIG_RELEASE_STACK
|
1471
|
+
# define Ruby_DirectorTypeMismatchException(x) \
|
1472
|
+
throw Swig::DirectorTypeMismatchException( x );
|
1473
|
+
|
1474
|
+
#endif /* RUBY_EMBEDDED */
|
1475
|
+
|
1476
|
+
|
1246
1477
|
SWIGRUNTIME VALUE
|
1247
1478
|
getExceptionClass(void) {
|
1248
1479
|
static int init = 0;
|
@@ -1274,6 +1505,8 @@ SWIG_Ruby_InitRuntime(void)
|
|
1274
1505
|
{
|
1275
1506
|
if (_mSWIG == Qnil) {
|
1276
1507
|
_mSWIG = rb_define_module("SWIG");
|
1508
|
+
swig_call_id = rb_intern("call");
|
1509
|
+
swig_arity_id = rb_intern("arity");
|
1277
1510
|
}
|
1278
1511
|
}
|
1279
1512
|
|
@@ -1297,7 +1530,7 @@ SWIGRUNTIME VALUE
|
|
1297
1530
|
SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
1298
1531
|
{
|
1299
1532
|
int own = flags & SWIG_POINTER_OWN;
|
1300
|
-
|
1533
|
+
int track;
|
1301
1534
|
char *klass_name;
|
1302
1535
|
swig_class *sklass;
|
1303
1536
|
VALUE klass;
|
@@ -1310,14 +1543,15 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1310
1543
|
sklass = (swig_class *) type->clientdata;
|
1311
1544
|
|
1312
1545
|
/* Are we tracking this class and have we already returned this Ruby object? */
|
1313
|
-
|
1546
|
+
track = sklass->trackObjects;
|
1547
|
+
if (track) {
|
1314
1548
|
obj = SWIG_RubyInstanceFor(ptr);
|
1315
1549
|
|
1316
1550
|
/* Check the object's type and make sure it has the correct type.
|
1317
1551
|
It might not in cases where methods do things like
|
1318
1552
|
downcast methods. */
|
1319
1553
|
if (obj != Qnil) {
|
1320
|
-
VALUE value = rb_iv_get(obj, "__swigtype__");
|
1554
|
+
VALUE value = rb_iv_get(obj, "@__swigtype__");
|
1321
1555
|
char* type_name = RSTRING_PTR(value);
|
1322
1556
|
|
1323
1557
|
if (strcmp(type->name, type_name) == 0) {
|
@@ -1327,10 +1561,13 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1327
1561
|
}
|
1328
1562
|
|
1329
1563
|
/* Create a new Ruby object */
|
1330
|
-
obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
|
1564
|
+
obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
|
1565
|
+
( own ? VOIDFUNC(sklass->destroy) :
|
1566
|
+
(track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
|
1567
|
+
), ptr);
|
1331
1568
|
|
1332
1569
|
/* If tracking is on for this class then track this object. */
|
1333
|
-
if (
|
1570
|
+
if (track) {
|
1334
1571
|
SWIG_RubyAddTracking(ptr, obj);
|
1335
1572
|
}
|
1336
1573
|
} else {
|
@@ -1340,7 +1577,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1340
1577
|
free((void *) klass_name);
|
1341
1578
|
obj = Data_Wrap_Struct(klass, 0, 0, ptr);
|
1342
1579
|
}
|
1343
|
-
rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
|
1580
|
+
rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
|
1344
1581
|
|
1345
1582
|
return obj;
|
1346
1583
|
}
|
@@ -1352,7 +1589,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
|
|
1352
1589
|
VALUE obj;
|
1353
1590
|
swig_class *sklass = (swig_class *) type->clientdata;
|
1354
1591
|
obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
|
1355
|
-
rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
|
1592
|
+
rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
|
1356
1593
|
return obj;
|
1357
1594
|
}
|
1358
1595
|
|
@@ -1360,7 +1597,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
|
|
1360
1597
|
SWIGRUNTIMEINLINE char *
|
1361
1598
|
SWIG_Ruby_MangleStr(VALUE obj)
|
1362
1599
|
{
|
1363
|
-
VALUE stype = rb_iv_get(obj, "__swigtype__");
|
1600
|
+
VALUE stype = rb_iv_get(obj, "@__swigtype__");
|
1364
1601
|
return StringValuePtr(stype);
|
1365
1602
|
}
|
1366
1603
|
|
@@ -1442,8 +1679,11 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1442
1679
|
tc = SWIG_TypeCheck(c, ty);
|
1443
1680
|
if (!tc) {
|
1444
1681
|
return SWIG_ERROR;
|
1682
|
+
} else {
|
1683
|
+
int newmemory = 0;
|
1684
|
+
*ptr = SWIG_TypeCast(tc, vptr, &newmemory);
|
1685
|
+
assert(!newmemory); /* newmemory handling not yet implemented */
|
1445
1686
|
}
|
1446
|
-
*ptr = SWIG_TypeCast(tc, vptr);
|
1447
1687
|
} else {
|
1448
1688
|
*ptr = vptr;
|
1449
1689
|
}
|
@@ -1524,10 +1764,42 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
|
|
1524
1764
|
rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
|
1525
1765
|
}
|
1526
1766
|
|
1767
|
+
/* This function can be used to check whether a proc or method or similarly
|
1768
|
+
callable function has been passed. Usually used in a %typecheck, like:
|
1769
|
+
|
1770
|
+
%typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
|
1771
|
+
$result = SWIG_Ruby_isCallable( $input );
|
1772
|
+
}
|
1773
|
+
*/
|
1774
|
+
SWIGINTERN
|
1775
|
+
int SWIG_Ruby_isCallable( VALUE proc )
|
1776
|
+
{
|
1777
|
+
if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
|
1778
|
+
return 1;
|
1779
|
+
return 0;
|
1780
|
+
}
|
1781
|
+
|
1782
|
+
/* This function can be used to check the arity (number of arguments)
|
1783
|
+
a proc or method can take. Usually used in a %typecheck.
|
1784
|
+
Valid arities will be that equal to minimal or those < 0
|
1785
|
+
which indicate a variable number of parameters at the end.
|
1786
|
+
*/
|
1787
|
+
SWIGINTERN
|
1788
|
+
int SWIG_Ruby_arity( VALUE proc, int minimal )
|
1789
|
+
{
|
1790
|
+
if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
|
1791
|
+
{
|
1792
|
+
VALUE num = rb_funcall( proc, swig_arity_id, 0 );
|
1793
|
+
int arity = NUM2INT(num);
|
1794
|
+
if ( arity < 0 && (arity+1) < -minimal ) return 1;
|
1795
|
+
if ( arity == minimal ) return 1;
|
1796
|
+
return 1;
|
1797
|
+
}
|
1798
|
+
return 0;
|
1799
|
+
}
|
1800
|
+
|
1801
|
+
|
1527
1802
|
#ifdef __cplusplus
|
1528
|
-
#if 0
|
1529
|
-
{ /* cc-mode */
|
1530
|
-
#endif
|
1531
1803
|
}
|
1532
1804
|
#endif
|
1533
1805
|
|
@@ -1555,7 +1827,11 @@ static swig_module_info swig_module = {swig_types, 2, 0, 0, 0, 0};
|
|
1555
1827
|
|
1556
1828
|
static VALUE mDep_gecode;
|
1557
1829
|
|
1558
|
-
#define
|
1830
|
+
#define SWIG_RUBY_THREAD_BEGIN_BLOCK
|
1831
|
+
#define SWIG_RUBY_THREAD_END_BLOCK
|
1832
|
+
|
1833
|
+
|
1834
|
+
#define SWIGVERSION 0x020004
|
1559
1835
|
#define SWIG_VERSION SWIGVERSION
|
1560
1836
|
|
1561
1837
|
|
@@ -1570,14 +1846,12 @@ static VALUE mDep_gecode;
|
|
1570
1846
|
|
1571
1847
|
|
1572
1848
|
#include <limits.h>
|
1573
|
-
#
|
1574
|
-
#
|
1575
|
-
#
|
1576
|
-
#
|
1577
|
-
#
|
1578
|
-
#endif
|
1579
|
-
#ifndef ULLONG_MAX
|
1580
|
-
# define ULLONG_MAX ULONG_LONG_MAX
|
1849
|
+
#if !defined(SWIG_NO_LLONG_MAX)
|
1850
|
+
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
|
1851
|
+
# define LLONG_MAX __LONG_LONG_MAX__
|
1852
|
+
# define LLONG_MIN (-LLONG_MAX - 1LL)
|
1853
|
+
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
|
1854
|
+
# endif
|
1581
1855
|
#endif
|
1582
1856
|
|
1583
1857
|
|
@@ -1588,7 +1862,7 @@ SWIG_ruby_failed(void)
|
|
1588
1862
|
}
|
1589
1863
|
|
1590
1864
|
|
1591
|
-
/*@SWIG
|
1865
|
+
/*@SWIG:/usr/local/Cellar/swig/2.0.4/share/swig/2.0.4/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
1592
1866
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
|
1593
1867
|
{
|
1594
1868
|
VALUE obj = args[0];
|
@@ -1653,6 +1927,60 @@ SWIG_AsVal_bool (VALUE obj, bool *val)
|
|
1653
1927
|
}
|
1654
1928
|
|
1655
1929
|
|
1930
|
+
SWIGINTERN swig_type_info*
|
1931
|
+
SWIG_pchar_descriptor(void)
|
1932
|
+
{
|
1933
|
+
static int init = 0;
|
1934
|
+
static swig_type_info* info = 0;
|
1935
|
+
if (!init) {
|
1936
|
+
info = SWIG_TypeQuery("_p_char");
|
1937
|
+
init = 1;
|
1938
|
+
}
|
1939
|
+
return info;
|
1940
|
+
}
|
1941
|
+
|
1942
|
+
|
1943
|
+
SWIGINTERN int
|
1944
|
+
SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
|
1945
|
+
{
|
1946
|
+
if (TYPE(obj) == T_STRING) {
|
1947
|
+
#if defined(StringValuePtr)
|
1948
|
+
char *cstr = StringValuePtr(obj);
|
1949
|
+
#else
|
1950
|
+
char *cstr = STR2CSTR(obj);
|
1951
|
+
#endif
|
1952
|
+
size_t size = RSTRING_LEN(obj) + 1;
|
1953
|
+
if (cptr) {
|
1954
|
+
if (alloc) {
|
1955
|
+
if (*alloc == SWIG_NEWOBJ) {
|
1956
|
+
*cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size)));
|
1957
|
+
} else {
|
1958
|
+
*cptr = cstr;
|
1959
|
+
*alloc = SWIG_OLDOBJ;
|
1960
|
+
}
|
1961
|
+
}
|
1962
|
+
}
|
1963
|
+
if (psize) *psize = size;
|
1964
|
+
return SWIG_OK;
|
1965
|
+
} else {
|
1966
|
+
swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
|
1967
|
+
if (pchar_descriptor) {
|
1968
|
+
void* vptr = 0;
|
1969
|
+
if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
|
1970
|
+
if (cptr) *cptr = (char *)vptr;
|
1971
|
+
if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
|
1972
|
+
if (alloc) *alloc = SWIG_OLDOBJ;
|
1973
|
+
return SWIG_OK;
|
1974
|
+
}
|
1975
|
+
}
|
1976
|
+
}
|
1977
|
+
return SWIG_TypeError;
|
1978
|
+
}
|
1979
|
+
|
1980
|
+
|
1981
|
+
|
1982
|
+
|
1983
|
+
|
1656
1984
|
#define SWIG_From_long LONG2NUM
|
1657
1985
|
|
1658
1986
|
|
@@ -1674,37 +2002,48 @@ _wrap_VersionProblemCreate(int argc, VALUE *argv, VALUE self) {
|
|
1674
2002
|
int arg1 ;
|
1675
2003
|
bool arg2 ;
|
1676
2004
|
bool arg3 ;
|
1677
|
-
|
2005
|
+
char *arg4 = (char *) 0 ;
|
1678
2006
|
int val1 ;
|
1679
2007
|
int ecode1 = 0 ;
|
1680
2008
|
bool val2 ;
|
1681
2009
|
int ecode2 = 0 ;
|
1682
2010
|
bool val3 ;
|
1683
2011
|
int ecode3 = 0 ;
|
2012
|
+
int res4 ;
|
2013
|
+
char *buf4 = 0 ;
|
2014
|
+
int alloc4 = 0 ;
|
2015
|
+
VersionProblem *result = 0 ;
|
1684
2016
|
VALUE vresult = Qnil;
|
1685
2017
|
|
1686
|
-
if ((argc <
|
1687
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2018
|
+
if ((argc < 4) || (argc > 4)) {
|
2019
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
|
1688
2020
|
}
|
1689
2021
|
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
1690
2022
|
if (!SWIG_IsOK(ecode1)) {
|
1691
|
-
SWIG_exception_fail(SWIG_ArgError(ecode1),
|
2023
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","VersionProblemCreate", 1, argv[0] ));
|
1692
2024
|
}
|
1693
2025
|
arg1 = static_cast< int >(val1);
|
1694
2026
|
ecode2 = SWIG_AsVal_bool(argv[1], &val2);
|
1695
2027
|
if (!SWIG_IsOK(ecode2)) {
|
1696
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2),
|
2028
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","VersionProblemCreate", 2, argv[1] ));
|
1697
2029
|
}
|
1698
2030
|
arg2 = static_cast< bool >(val2);
|
1699
2031
|
ecode3 = SWIG_AsVal_bool(argv[2], &val3);
|
1700
2032
|
if (!SWIG_IsOK(ecode3)) {
|
1701
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3),
|
2033
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","VersionProblemCreate", 3, argv[2] ));
|
1702
2034
|
}
|
1703
2035
|
arg3 = static_cast< bool >(val3);
|
1704
|
-
|
2036
|
+
res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
|
2037
|
+
if (!SWIG_IsOK(res4)) {
|
2038
|
+
SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","VersionProblemCreate", 4, argv[3] ));
|
2039
|
+
}
|
2040
|
+
arg4 = reinterpret_cast< char * >(buf4);
|
2041
|
+
result = (VersionProblem *)VersionProblemCreate(arg1,arg2,arg3,(char const *)arg4);
|
1705
2042
|
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VersionProblem, 0 | 0 );
|
2043
|
+
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
1706
2044
|
return vresult;
|
1707
2045
|
fail:
|
2046
|
+
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
1708
2047
|
return Qnil;
|
1709
2048
|
}
|
1710
2049
|
|
@@ -1720,7 +2059,7 @@ _wrap_VersionProblemDestroy(int argc, VALUE *argv, VALUE self) {
|
|
1720
2059
|
}
|
1721
2060
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
1722
2061
|
if (!SWIG_IsOK(res1)) {
|
1723
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2062
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","VersionProblemDestroy", 1, argv[0] ));
|
1724
2063
|
}
|
1725
2064
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
1726
2065
|
VersionProblemDestroy(arg1);
|
@@ -1733,9 +2072,9 @@ fail:
|
|
1733
2072
|
SWIGINTERN VALUE
|
1734
2073
|
_wrap_VersionProblemSize(int argc, VALUE *argv, VALUE self) {
|
1735
2074
|
VersionProblem *arg1 = (VersionProblem *) 0 ;
|
1736
|
-
int result;
|
1737
2075
|
void *argp1 = 0 ;
|
1738
2076
|
int res1 = 0 ;
|
2077
|
+
int result;
|
1739
2078
|
VALUE vresult = Qnil;
|
1740
2079
|
|
1741
2080
|
if ((argc < 1) || (argc > 1)) {
|
@@ -1743,7 +2082,7 @@ _wrap_VersionProblemSize(int argc, VALUE *argv, VALUE self) {
|
|
1743
2082
|
}
|
1744
2083
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
1745
2084
|
if (!SWIG_IsOK(res1)) {
|
1746
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2085
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","VersionProblemSize", 1, argv[0] ));
|
1747
2086
|
}
|
1748
2087
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
1749
2088
|
result = (int)VersionProblemSize(arg1);
|
@@ -1757,9 +2096,9 @@ fail:
|
|
1757
2096
|
SWIGINTERN VALUE
|
1758
2097
|
_wrap_VersionProblemPackageCount(int argc, VALUE *argv, VALUE self) {
|
1759
2098
|
VersionProblem *arg1 = (VersionProblem *) 0 ;
|
1760
|
-
int result;
|
1761
2099
|
void *argp1 = 0 ;
|
1762
2100
|
int res1 = 0 ;
|
2101
|
+
int result;
|
1763
2102
|
VALUE vresult = Qnil;
|
1764
2103
|
|
1765
2104
|
if ((argc < 1) || (argc > 1)) {
|
@@ -1767,7 +2106,7 @@ _wrap_VersionProblemPackageCount(int argc, VALUE *argv, VALUE self) {
|
|
1767
2106
|
}
|
1768
2107
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
1769
2108
|
if (!SWIG_IsOK(res1)) {
|
1770
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2109
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","VersionProblemPackageCount", 1, argv[0] ));
|
1771
2110
|
}
|
1772
2111
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
1773
2112
|
result = (int)VersionProblemPackageCount(arg1);
|
@@ -1784,7 +2123,6 @@ _wrap_AddPackage(int argc, VALUE *argv, VALUE self) {
|
|
1784
2123
|
int arg2 ;
|
1785
2124
|
int arg3 ;
|
1786
2125
|
int arg4 ;
|
1787
|
-
int result;
|
1788
2126
|
void *argp1 = 0 ;
|
1789
2127
|
int res1 = 0 ;
|
1790
2128
|
int val2 ;
|
@@ -1793,6 +2131,7 @@ _wrap_AddPackage(int argc, VALUE *argv, VALUE self) {
|
|
1793
2131
|
int ecode3 = 0 ;
|
1794
2132
|
int val4 ;
|
1795
2133
|
int ecode4 = 0 ;
|
2134
|
+
int result;
|
1796
2135
|
VALUE vresult = Qnil;
|
1797
2136
|
|
1798
2137
|
if ((argc < 4) || (argc > 4)) {
|
@@ -1800,22 +2139,22 @@ _wrap_AddPackage(int argc, VALUE *argv, VALUE self) {
|
|
1800
2139
|
}
|
1801
2140
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
1802
2141
|
if (!SWIG_IsOK(res1)) {
|
1803
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2142
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","AddPackage", 1, argv[0] ));
|
1804
2143
|
}
|
1805
2144
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
1806
2145
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
1807
2146
|
if (!SWIG_IsOK(ecode2)) {
|
1808
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2),
|
2147
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","AddPackage", 2, argv[1] ));
|
1809
2148
|
}
|
1810
2149
|
arg2 = static_cast< int >(val2);
|
1811
2150
|
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
1812
2151
|
if (!SWIG_IsOK(ecode3)) {
|
1813
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3),
|
2152
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","AddPackage", 3, argv[2] ));
|
1814
2153
|
}
|
1815
2154
|
arg3 = static_cast< int >(val3);
|
1816
2155
|
ecode4 = SWIG_AsVal_int(argv[3], &val4);
|
1817
2156
|
if (!SWIG_IsOK(ecode4)) {
|
1818
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4),
|
2157
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","AddPackage", 4, argv[3] ));
|
1819
2158
|
}
|
1820
2159
|
arg4 = static_cast< int >(val4);
|
1821
2160
|
result = (int)AddPackage(arg1,arg2,arg3,arg4);
|
@@ -1834,7 +2173,6 @@ _wrap_AddVersionConstraint(int argc, VALUE *argv, VALUE self) {
|
|
1834
2173
|
int arg4 ;
|
1835
2174
|
int arg5 ;
|
1836
2175
|
int arg6 ;
|
1837
|
-
bool result;
|
1838
2176
|
void *argp1 = 0 ;
|
1839
2177
|
int res1 = 0 ;
|
1840
2178
|
int val2 ;
|
@@ -1847,6 +2185,7 @@ _wrap_AddVersionConstraint(int argc, VALUE *argv, VALUE self) {
|
|
1847
2185
|
int ecode5 = 0 ;
|
1848
2186
|
int val6 ;
|
1849
2187
|
int ecode6 = 0 ;
|
2188
|
+
bool result;
|
1850
2189
|
VALUE vresult = Qnil;
|
1851
2190
|
|
1852
2191
|
if ((argc < 6) || (argc > 6)) {
|
@@ -1854,32 +2193,32 @@ _wrap_AddVersionConstraint(int argc, VALUE *argv, VALUE self) {
|
|
1854
2193
|
}
|
1855
2194
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
1856
2195
|
if (!SWIG_IsOK(res1)) {
|
1857
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2196
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","AddVersionConstraint", 1, argv[0] ));
|
1858
2197
|
}
|
1859
2198
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
1860
2199
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
1861
2200
|
if (!SWIG_IsOK(ecode2)) {
|
1862
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2),
|
2201
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","AddVersionConstraint", 2, argv[1] ));
|
1863
2202
|
}
|
1864
2203
|
arg2 = static_cast< int >(val2);
|
1865
2204
|
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
1866
2205
|
if (!SWIG_IsOK(ecode3)) {
|
1867
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3),
|
2206
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","AddVersionConstraint", 3, argv[2] ));
|
1868
2207
|
}
|
1869
2208
|
arg3 = static_cast< int >(val3);
|
1870
2209
|
ecode4 = SWIG_AsVal_int(argv[3], &val4);
|
1871
2210
|
if (!SWIG_IsOK(ecode4)) {
|
1872
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4),
|
2211
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","AddVersionConstraint", 4, argv[3] ));
|
1873
2212
|
}
|
1874
2213
|
arg4 = static_cast< int >(val4);
|
1875
2214
|
ecode5 = SWIG_AsVal_int(argv[4], &val5);
|
1876
2215
|
if (!SWIG_IsOK(ecode5)) {
|
1877
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5),
|
2216
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","AddVersionConstraint", 5, argv[4] ));
|
1878
2217
|
}
|
1879
2218
|
arg5 = static_cast< int >(val5);
|
1880
2219
|
ecode6 = SWIG_AsVal_int(argv[5], &val6);
|
1881
2220
|
if (!SWIG_IsOK(ecode6)) {
|
1882
|
-
SWIG_exception_fail(SWIG_ArgError(ecode6),
|
2221
|
+
SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "int","AddVersionConstraint", 6, argv[5] ));
|
1883
2222
|
}
|
1884
2223
|
arg6 = static_cast< int >(val6);
|
1885
2224
|
result = (bool)AddVersionConstraint(arg1,arg2,arg3,arg4,arg5,arg6);
|
@@ -1904,12 +2243,12 @@ _wrap_MarkPackageSuspicious(int argc, VALUE *argv, VALUE self) {
|
|
1904
2243
|
}
|
1905
2244
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
1906
2245
|
if (!SWIG_IsOK(res1)) {
|
1907
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2246
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","MarkPackageSuspicious", 1, argv[0] ));
|
1908
2247
|
}
|
1909
2248
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
1910
2249
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
1911
2250
|
if (!SWIG_IsOK(ecode2)) {
|
1912
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2),
|
2251
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","MarkPackageSuspicious", 2, argv[1] ));
|
1913
2252
|
}
|
1914
2253
|
arg2 = static_cast< int >(val2);
|
1915
2254
|
MarkPackageSuspicious(arg1,arg2);
|
@@ -1933,12 +2272,12 @@ _wrap_MarkPackageRequired(int argc, VALUE *argv, VALUE self) {
|
|
1933
2272
|
}
|
1934
2273
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
1935
2274
|
if (!SWIG_IsOK(res1)) {
|
1936
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2275
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","MarkPackageRequired", 1, argv[0] ));
|
1937
2276
|
}
|
1938
2277
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
1939
2278
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
1940
2279
|
if (!SWIG_IsOK(ecode2)) {
|
1941
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2),
|
2280
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","MarkPackageRequired", 2, argv[1] ));
|
1942
2281
|
}
|
1943
2282
|
arg2 = static_cast< int >(val2);
|
1944
2283
|
MarkPackageRequired(arg1,arg2);
|
@@ -1965,17 +2304,17 @@ _wrap_MarkPackagePreferredToBeAtLatest(int argc, VALUE *argv, VALUE self) {
|
|
1965
2304
|
}
|
1966
2305
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
1967
2306
|
if (!SWIG_IsOK(res1)) {
|
1968
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2307
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","MarkPackagePreferredToBeAtLatest", 1, argv[0] ));
|
1969
2308
|
}
|
1970
2309
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
1971
2310
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
1972
2311
|
if (!SWIG_IsOK(ecode2)) {
|
1973
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2),
|
2312
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","MarkPackagePreferredToBeAtLatest", 2, argv[1] ));
|
1974
2313
|
}
|
1975
2314
|
arg2 = static_cast< int >(val2);
|
1976
2315
|
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
1977
2316
|
if (!SWIG_IsOK(ecode3)) {
|
1978
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3),
|
2317
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","MarkPackagePreferredToBeAtLatest", 3, argv[2] ));
|
1979
2318
|
}
|
1980
2319
|
arg3 = static_cast< int >(val3);
|
1981
2320
|
MarkPackagePreferredToBeAtLatest(arg1,arg2,arg3);
|
@@ -1989,11 +2328,11 @@ SWIGINTERN VALUE
|
|
1989
2328
|
_wrap_GetPackageVersion(int argc, VALUE *argv, VALUE self) {
|
1990
2329
|
VersionProblem *arg1 = (VersionProblem *) 0 ;
|
1991
2330
|
int arg2 ;
|
1992
|
-
int result;
|
1993
2331
|
void *argp1 = 0 ;
|
1994
2332
|
int res1 = 0 ;
|
1995
2333
|
int val2 ;
|
1996
2334
|
int ecode2 = 0 ;
|
2335
|
+
int result;
|
1997
2336
|
VALUE vresult = Qnil;
|
1998
2337
|
|
1999
2338
|
if ((argc < 2) || (argc > 2)) {
|
@@ -2001,12 +2340,12 @@ _wrap_GetPackageVersion(int argc, VALUE *argv, VALUE self) {
|
|
2001
2340
|
}
|
2002
2341
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
2003
2342
|
if (!SWIG_IsOK(res1)) {
|
2004
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2343
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","GetPackageVersion", 1, argv[0] ));
|
2005
2344
|
}
|
2006
2345
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
2007
2346
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2008
2347
|
if (!SWIG_IsOK(ecode2)) {
|
2009
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2),
|
2348
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","GetPackageVersion", 2, argv[1] ));
|
2010
2349
|
}
|
2011
2350
|
arg2 = static_cast< int >(val2);
|
2012
2351
|
result = (int)GetPackageVersion(arg1,arg2);
|
@@ -2021,11 +2360,11 @@ SWIGINTERN VALUE
|
|
2021
2360
|
_wrap_GetPackageDisabledState(int argc, VALUE *argv, VALUE self) {
|
2022
2361
|
VersionProblem *arg1 = (VersionProblem *) 0 ;
|
2023
2362
|
int arg2 ;
|
2024
|
-
bool result;
|
2025
2363
|
void *argp1 = 0 ;
|
2026
2364
|
int res1 = 0 ;
|
2027
2365
|
int val2 ;
|
2028
2366
|
int ecode2 = 0 ;
|
2367
|
+
bool result;
|
2029
2368
|
VALUE vresult = Qnil;
|
2030
2369
|
|
2031
2370
|
if ((argc < 2) || (argc > 2)) {
|
@@ -2033,12 +2372,12 @@ _wrap_GetPackageDisabledState(int argc, VALUE *argv, VALUE self) {
|
|
2033
2372
|
}
|
2034
2373
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
2035
2374
|
if (!SWIG_IsOK(res1)) {
|
2036
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2375
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","GetPackageDisabledState", 1, argv[0] ));
|
2037
2376
|
}
|
2038
2377
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
2039
2378
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2040
2379
|
if (!SWIG_IsOK(ecode2)) {
|
2041
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2),
|
2380
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","GetPackageDisabledState", 2, argv[1] ));
|
2042
2381
|
}
|
2043
2382
|
arg2 = static_cast< int >(val2);
|
2044
2383
|
result = (bool)GetPackageDisabledState(arg1,arg2);
|
@@ -2053,11 +2392,11 @@ SWIGINTERN VALUE
|
|
2053
2392
|
_wrap_GetPackageMax(int argc, VALUE *argv, VALUE self) {
|
2054
2393
|
VersionProblem *arg1 = (VersionProblem *) 0 ;
|
2055
2394
|
int arg2 ;
|
2056
|
-
int result;
|
2057
2395
|
void *argp1 = 0 ;
|
2058
2396
|
int res1 = 0 ;
|
2059
2397
|
int val2 ;
|
2060
2398
|
int ecode2 = 0 ;
|
2399
|
+
int result;
|
2061
2400
|
VALUE vresult = Qnil;
|
2062
2401
|
|
2063
2402
|
if ((argc < 2) || (argc > 2)) {
|
@@ -2065,12 +2404,12 @@ _wrap_GetPackageMax(int argc, VALUE *argv, VALUE self) {
|
|
2065
2404
|
}
|
2066
2405
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
2067
2406
|
if (!SWIG_IsOK(res1)) {
|
2068
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2407
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","GetPackageMax", 1, argv[0] ));
|
2069
2408
|
}
|
2070
2409
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
2071
2410
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2072
2411
|
if (!SWIG_IsOK(ecode2)) {
|
2073
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2),
|
2412
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","GetPackageMax", 2, argv[1] ));
|
2074
2413
|
}
|
2075
2414
|
arg2 = static_cast< int >(val2);
|
2076
2415
|
result = (int)GetPackageMax(arg1,arg2);
|
@@ -2085,11 +2424,11 @@ SWIGINTERN VALUE
|
|
2085
2424
|
_wrap_GetPackageMin(int argc, VALUE *argv, VALUE self) {
|
2086
2425
|
VersionProblem *arg1 = (VersionProblem *) 0 ;
|
2087
2426
|
int arg2 ;
|
2088
|
-
int result;
|
2089
2427
|
void *argp1 = 0 ;
|
2090
2428
|
int res1 = 0 ;
|
2091
2429
|
int val2 ;
|
2092
2430
|
int ecode2 = 0 ;
|
2431
|
+
int result;
|
2093
2432
|
VALUE vresult = Qnil;
|
2094
2433
|
|
2095
2434
|
if ((argc < 2) || (argc > 2)) {
|
@@ -2097,12 +2436,12 @@ _wrap_GetPackageMin(int argc, VALUE *argv, VALUE self) {
|
|
2097
2436
|
}
|
2098
2437
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
2099
2438
|
if (!SWIG_IsOK(res1)) {
|
2100
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2439
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","GetPackageMin", 1, argv[0] ));
|
2101
2440
|
}
|
2102
2441
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
2103
2442
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2104
2443
|
if (!SWIG_IsOK(ecode2)) {
|
2105
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2),
|
2444
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","GetPackageMin", 2, argv[1] ));
|
2106
2445
|
}
|
2107
2446
|
arg2 = static_cast< int >(val2);
|
2108
2447
|
result = (int)GetPackageMin(arg1,arg2);
|
@@ -2116,9 +2455,9 @@ fail:
|
|
2116
2455
|
SWIGINTERN VALUE
|
2117
2456
|
_wrap_GetDisabledVariableCount(int argc, VALUE *argv, VALUE self) {
|
2118
2457
|
VersionProblem *arg1 = (VersionProblem *) 0 ;
|
2119
|
-
int result;
|
2120
2458
|
void *argp1 = 0 ;
|
2121
2459
|
int res1 = 0 ;
|
2460
|
+
int result;
|
2122
2461
|
VALUE vresult = Qnil;
|
2123
2462
|
|
2124
2463
|
if ((argc < 1) || (argc > 1)) {
|
@@ -2126,7 +2465,7 @@ _wrap_GetDisabledVariableCount(int argc, VALUE *argv, VALUE self) {
|
|
2126
2465
|
}
|
2127
2466
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
2128
2467
|
if (!SWIG_IsOK(res1)) {
|
2129
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2468
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","GetDisabledVariableCount", 1, argv[0] ));
|
2130
2469
|
}
|
2131
2470
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
2132
2471
|
result = (int)GetDisabledVariableCount(arg1);
|
@@ -2148,7 +2487,7 @@ _wrap_VersionProblemDump(int argc, VALUE *argv, VALUE self) {
|
|
2148
2487
|
}
|
2149
2488
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
2150
2489
|
if (!SWIG_IsOK(res1)) {
|
2151
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2490
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","VersionProblemDump", 1, argv[0] ));
|
2152
2491
|
}
|
2153
2492
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
2154
2493
|
VersionProblemDump(arg1);
|
@@ -2172,12 +2511,12 @@ _wrap_VersionProblemPrintPackageVar(int argc, VALUE *argv, VALUE self) {
|
|
2172
2511
|
}
|
2173
2512
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
2174
2513
|
if (!SWIG_IsOK(res1)) {
|
2175
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2514
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","VersionProblemPrintPackageVar", 1, argv[0] ));
|
2176
2515
|
}
|
2177
2516
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
2178
2517
|
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2179
2518
|
if (!SWIG_IsOK(ecode2)) {
|
2180
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2),
|
2519
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","VersionProblemPrintPackageVar", 2, argv[1] ));
|
2181
2520
|
}
|
2182
2521
|
arg2 = static_cast< int >(val2);
|
2183
2522
|
VersionProblemPrintPackageVar(arg1,arg2);
|
@@ -2190,9 +2529,9 @@ fail:
|
|
2190
2529
|
SWIGINTERN VALUE
|
2191
2530
|
_wrap_Solve(int argc, VALUE *argv, VALUE self) {
|
2192
2531
|
VersionProblem *arg1 = (VersionProblem *) 0 ;
|
2193
|
-
VersionProblem *result = 0 ;
|
2194
2532
|
void *argp1 = 0 ;
|
2195
2533
|
int res1 = 0 ;
|
2534
|
+
VersionProblem *result = 0 ;
|
2196
2535
|
VALUE vresult = Qnil;
|
2197
2536
|
|
2198
2537
|
if ((argc < 1) || (argc > 1)) {
|
@@ -2200,7 +2539,7 @@ _wrap_Solve(int argc, VALUE *argv, VALUE self) {
|
|
2200
2539
|
}
|
2201
2540
|
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_VersionProblem, 0 | 0 );
|
2202
2541
|
if (!SWIG_IsOK(res1)) {
|
2203
|
-
SWIG_exception_fail(SWIG_ArgError(res1),
|
2542
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "VersionProblem *","Solve", 1, argv[0] ));
|
2204
2543
|
}
|
2205
2544
|
arg1 = reinterpret_cast< VersionProblem * >(argp1);
|
2206
2545
|
result = (VersionProblem *)Solve(arg1);
|
@@ -2290,7 +2629,7 @@ SWIGRUNTIME void
|
|
2290
2629
|
SWIG_InitializeModule(void *clientdata) {
|
2291
2630
|
size_t i;
|
2292
2631
|
swig_module_info *module_head, *iter;
|
2293
|
-
int found;
|
2632
|
+
int found, init;
|
2294
2633
|
|
2295
2634
|
clientdata = clientdata;
|
2296
2635
|
|
@@ -2300,6 +2639,9 @@ SWIG_InitializeModule(void *clientdata) {
|
|
2300
2639
|
swig_module.type_initial = swig_type_initial;
|
2301
2640
|
swig_module.cast_initial = swig_cast_initial;
|
2302
2641
|
swig_module.next = &swig_module;
|
2642
|
+
init = 1;
|
2643
|
+
} else {
|
2644
|
+
init = 0;
|
2303
2645
|
}
|
2304
2646
|
|
2305
2647
|
/* Try and load any already created modules */
|
@@ -2328,6 +2670,12 @@ SWIG_InitializeModule(void *clientdata) {
|
|
2328
2670
|
module_head->next = &swig_module;
|
2329
2671
|
}
|
2330
2672
|
|
2673
|
+
/* When multiple interpeters are used, a module could have already been initialized in
|
2674
|
+
a different interpreter, but not yet have a pointer in this interpreter.
|
2675
|
+
In this case, we do not want to continue adding types... everything should be
|
2676
|
+
set up already */
|
2677
|
+
if (init == 0) return;
|
2678
|
+
|
2331
2679
|
/* Now work on filling in swig_module.types */
|
2332
2680
|
#ifdef SWIGRUNTIME_DEBUG
|
2333
2681
|
printf("SWIG_InitializeModule: size %d\n", swig_module.size);
|
@@ -2461,7 +2809,9 @@ SWIG_PropagateClientData(void) {
|
|
2461
2809
|
}
|
2462
2810
|
#endif
|
2463
2811
|
|
2812
|
+
/*
|
2464
2813
|
|
2814
|
+
*/
|
2465
2815
|
#ifdef __cplusplus
|
2466
2816
|
extern "C"
|
2467
2817
|
#endif
|