1
1
/* ----------------------------------------------------------------------------
2
2
* This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 1.3.38
3
+ * Version 1.3.36
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
10
11
11
#define SWIGRUBY
12
12
13
-
14
13
#ifdef __cplusplus
15
- /* SwigValueWrapper is described in swig.swg */
16
14
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);
15
+ T *tt;
25
16
public:
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 ; }
17
+ SwigValueWrapper () : tt(0 ) { }
18
+ SwigValueWrapper (const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
19
+ SwigValueWrapper (const T& t) : tt(new T(t)) { }
20
+ ~SwigValueWrapper () { delete tt; }
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);
30
26
};
31
27
32
28
template <typename T> T SwigValueInit () {
@@ -255,7 +251,7 @@ template <typename T> T SwigValueInit() {
255
251
/* -----------------------------------------------------------------------------
256
252
* swigrun.swg
257
253
*
258
- * This file contains generic C API SWIG runtime support for pointer
254
+ * This file contains generic CAPI SWIG runtime support for pointer
259
255
* type checking.
260
256
* ----------------------------------------------------------------------------- */
261
257
@@ -274,11 +270,11 @@ template <typename T> T SwigValueInit() {
274
270
275
271
/*
276
272
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
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'.
273
+ creating a static or dynamic library from the swig runtime code.
274
+ In 99.9% of the cases, swig just needs to declare them as 'static'.
279
275
280
- But only do this if strictly necessary, ie, if you have problems
281
- with your compiler or suchlike .
276
+ But only do this if is strictly necessary, ie, if you have problems
277
+ with your compiler or so .
282
278
*/
283
279
284
280
#ifndef SWIGRUNTIME
@@ -305,22 +301,22 @@ template <typename T> T SwigValueInit() {
305
301
/*
306
302
Flags/methods for returning states.
307
303
308
- The SWIG conversion methods, as ConvertPtr, return and integer
304
+ The swig conversion methods, as ConvertPtr, return and integer
309
305
that tells if the conversion was successful or not. And if not,
310
306
an error code can be returned (see swigerrors.swg for the codes).
311
307
312
308
Use the following macros/flags to set or process the returning
313
309
states.
314
310
315
- In old versions of SWIG, code such as the following was usually written :
311
+ In old swig versions, you usually write code as :
316
312
317
313
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
318
314
// success code
319
315
} else {
320
316
//fail code
321
317
}
322
318
323
- Now you can be more explicit:
319
+ Now you can be more explicit as :
324
320
325
321
int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
326
322
if (SWIG_IsOK(res)) {
@@ -329,7 +325,7 @@ template <typename T> T SwigValueInit() {
329
325
// fail code
330
326
}
331
327
332
- which is the same really , but now you can also do
328
+ that seems to be the same, but now you can also do
333
329
334
330
Type *ptr;
335
331
int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
@@ -347,7 +343,7 @@ template <typename T> T SwigValueInit() {
347
343
348
344
I.e., now SWIG_ConvertPtr can return new objects and you can
349
345
identify the case and take care of the deallocation. Of course that
350
- also requires SWIG_ConvertPtr to return new result values, such as
346
+ requires also to SWIG_ConvertPtr to return new result values, as
351
347
352
348
int SWIG_ConvertPtr(obj, ptr,...) {
353
349
if (<obj is ok>) {
@@ -365,7 +361,7 @@ template <typename T> T SwigValueInit() {
365
361
366
362
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
367
363
more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
368
- SWIG errors code.
364
+ swig errors code.
369
365
370
366
Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
371
367
allows to return the 'cast rank', for example, if you have this
@@ -379,8 +375,9 @@ template <typename T> T SwigValueInit() {
379
375
fooi(1) // cast rank '0'
380
376
381
377
just use the SWIG_AddCast()/SWIG_CheckState()
382
- */
383
378
379
+
380
+ */
384
381
#define SWIG_OK (0 )
385
382
#define SWIG_ERROR (-1 )
386
383
#define SWIG_IsOK (r ) (r >= 0 )
@@ -405,6 +402,7 @@ template <typename T> T SwigValueInit() {
405
402
#define SWIG_DelTmpMask (r ) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
406
403
#define SWIG_IsTmpObj (r ) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
407
404
405
+
408
406
/* Cast-Rank Mode */
409
407
#if defined(SWIG_CASTRANK_MODE)
410
408
# ifndef SWIG_TypeRank
@@ -427,6 +425,8 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
427
425
#endif
428
426
429
427
428
+
429
+
430
430
#include < string.h>
431
431
432
432
#ifdef __cplusplus
@@ -523,58 +523,40 @@ SWIG_TypeCompare(const char *nb, const char *tb) {
523
523
}
524
524
525
525
526
+ /* think of this as a c++ template<> or a scheme macro */
527
+ #define SWIG_TypeCheck_Template (comparison, ty ) \
528
+ if (ty) { \
529
+ swig_cast_info *iter = ty->cast ; \
530
+ while (iter) { \
531
+ if (comparison) { \
532
+ if (iter == ty->cast ) return iter; \
533
+ /* Move iter to the top of the linked list */ \
534
+ iter->prev ->next = iter->next ; \
535
+ if (iter->next ) \
536
+ iter->next ->prev = iter->prev ; \
537
+ iter->next = ty->cast ; \
538
+ iter->prev = 0 ; \
539
+ if (ty->cast ) ty->cast ->prev = iter; \
540
+ ty->cast = iter; \
541
+ return iter; \
542
+ } \
543
+ iter = iter->next ; \
544
+ } \
545
+ } \
546
+ return 0
547
+
526
548
/*
527
549
Check the typename
528
550
*/
529
551
SWIGRUNTIME swig_cast_info *
530
552
SWIG_TypeCheck (const char *c, swig_type_info *ty) {
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 ;
553
+ SWIG_TypeCheck_Template (strcmp (iter->type ->name , c) == 0 , ty);
551
554
}
552
555
553
- /*
554
- Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
555
- */
556
+ /* Same as previous function, except strcmp is replaced with a pointer comparison */
556
557
SWIGRUNTIME swig_cast_info *
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 ;
558
+ SWIG_TypeCheckStruct (swig_type_info *from, swig_type_info *into) {
559
+ SWIG_TypeCheck_Template (iter->type == from, into);
578
560
}
579
561
580
562
/*
@@ -1825,7 +1807,7 @@ static VALUE mLibsvm;
1825
1807
#define SWIG_RUBY_THREAD_END_BLOCK
1826
1808
1827
1809
1828
- #define SWIGVERSION 0x010338
1810
+ #define SWIGVERSION 0x010336
1829
1811
#define SWIG_VERSION SWIGVERSION
1830
1812
1831
1813
@@ -1866,7 +1848,7 @@ SWIG_ruby_failed(void)
1866
1848
}
1867
1849
1868
1850
1869
- /* @SWIG:/usr/local/ share/swig/1.3.38 /ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
1851
+ /* @SWIG:/usr/share/swig1.3 /ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
1870
1852
SWIGINTERN VALUE SWIG_AUX_NUM2LONG (VALUE *args)
1871
1853
{
1872
1854
VALUE obj = args[0 ];
@@ -1911,7 +1893,7 @@ SWIG_AsVal_int (VALUE obj, int *val)
1911
1893
}
1912
1894
1913
1895
1914
- /* @SWIG:/usr/local/ share/swig/1.3.38 /ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
1896
+ /* @SWIG:/usr/share/swig1.3 /ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
1915
1897
SWIGINTERN VALUE SWIG_AUX_NUM2DBL (VALUE *args)
1916
1898
{
1917
1899
VALUE obj = args[0 ];
@@ -2037,7 +2019,7 @@ SWIG_FromCharPtr(const char *cptr)
2037
2019
}
2038
2020
2039
2021
2040
- /* @SWIG:/usr/local/ share/swig/1.3.38 /ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
2022
+ /* @SWIG:/usr/share/swig1.3 /ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
2041
2023
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG (VALUE *args)
2042
2024
{
2043
2025
VALUE obj = args[0 ];
0 commit comments