qpid_proton 0.32.0 → 0.36.0
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 +5 -5
- data/examples/ssl_send.rb +2 -1
- data/ext/cproton/cproton.c +399 -405
- data/lib/core/ssl_domain.rb +4 -3
- metadata +68 -68
data/ext/cproton/cproton.c
CHANGED
@@ -1,18 +1,14 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
-
* Version
|
4
|
-
*
|
5
|
-
* This file is not intended to be easily readable and contains a number of
|
3
|
+
* Version 2.0.10
|
4
|
+
*
|
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
|
7
|
-
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
-
* interface file instead.
|
7
|
+
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
+
* interface file instead.
|
9
9
|
* ----------------------------------------------------------------------------- */
|
10
10
|
|
11
|
-
|
12
|
-
#ifndef SWIGRUBY
|
13
11
|
#define SWIGRUBY
|
14
|
-
#endif
|
15
|
-
|
16
12
|
|
17
13
|
/* -----------------------------------------------------------------------------
|
18
14
|
* This section contains generic SWIG labels for method/variable
|
@@ -45,28 +41,28 @@
|
|
45
41
|
#ifndef SWIGUNUSED
|
46
42
|
# if defined(__GNUC__)
|
47
43
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
48
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
44
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
49
45
|
# else
|
50
46
|
# define SWIGUNUSED
|
51
47
|
# endif
|
52
48
|
# elif defined(__ICC)
|
53
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
49
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
54
50
|
# else
|
55
|
-
# define SWIGUNUSED
|
51
|
+
# define SWIGUNUSED
|
56
52
|
# endif
|
57
53
|
#endif
|
58
54
|
|
59
55
|
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
60
56
|
# if defined(_MSC_VER)
|
61
57
|
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
62
|
-
# endif
|
58
|
+
# endif
|
63
59
|
#endif
|
64
60
|
|
65
61
|
#ifndef SWIGUNUSEDPARM
|
66
62
|
# ifdef __cplusplus
|
67
63
|
# define SWIGUNUSEDPARM(p)
|
68
64
|
# else
|
69
|
-
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
65
|
+
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
70
66
|
# endif
|
71
67
|
#endif
|
72
68
|
|
@@ -81,11 +77,9 @@
|
|
81
77
|
#endif
|
82
78
|
|
83
79
|
/* exporting methods */
|
84
|
-
#if
|
85
|
-
#
|
86
|
-
#
|
87
|
-
# define GCC_HASCLASSVISIBILITY
|
88
|
-
# endif
|
80
|
+
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
81
|
+
# ifndef GCC_HASCLASSVISIBILITY
|
82
|
+
# define GCC_HASCLASSVISIBILITY
|
89
83
|
# endif
|
90
84
|
#endif
|
91
85
|
|
@@ -111,7 +105,7 @@
|
|
111
105
|
# define SWIGSTDCALL __stdcall
|
112
106
|
# else
|
113
107
|
# define SWIGSTDCALL
|
114
|
-
# endif
|
108
|
+
# endif
|
115
109
|
#endif
|
116
110
|
|
117
111
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
@@ -124,19 +118,6 @@
|
|
124
118
|
# define _SCL_SECURE_NO_DEPRECATE
|
125
119
|
#endif
|
126
120
|
|
127
|
-
/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
|
128
|
-
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
|
129
|
-
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
|
130
|
-
#endif
|
131
|
-
|
132
|
-
/* Intel's compiler complains if a variable which was never initialised is
|
133
|
-
* cast to void, which is a common idiom which we use to indicate that we
|
134
|
-
* are aware a variable isn't used. So we just silence that warning.
|
135
|
-
* See: https://github.com/swig/swig/issues/192 for more discussion.
|
136
|
-
*/
|
137
|
-
#ifdef __INTEL_COMPILER
|
138
|
-
# pragma warning disable 592
|
139
|
-
#endif
|
140
121
|
|
141
122
|
/* -----------------------------------------------------------------------------
|
142
123
|
* This section contains generic SWIG labels for method/variable
|
@@ -169,28 +150,28 @@
|
|
169
150
|
#ifndef SWIGUNUSED
|
170
151
|
# if defined(__GNUC__)
|
171
152
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
172
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
153
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
173
154
|
# else
|
174
155
|
# define SWIGUNUSED
|
175
156
|
# endif
|
176
157
|
# elif defined(__ICC)
|
177
|
-
# define SWIGUNUSED __attribute__ ((__unused__))
|
158
|
+
# define SWIGUNUSED __attribute__ ((__unused__))
|
178
159
|
# else
|
179
|
-
# define SWIGUNUSED
|
160
|
+
# define SWIGUNUSED
|
180
161
|
# endif
|
181
162
|
#endif
|
182
163
|
|
183
164
|
#ifndef SWIG_MSC_UNSUPPRESS_4505
|
184
165
|
# if defined(_MSC_VER)
|
185
166
|
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
186
|
-
# endif
|
167
|
+
# endif
|
187
168
|
#endif
|
188
169
|
|
189
170
|
#ifndef SWIGUNUSEDPARM
|
190
171
|
# ifdef __cplusplus
|
191
172
|
# define SWIGUNUSEDPARM(p)
|
192
173
|
# else
|
193
|
-
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
174
|
+
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
194
175
|
# endif
|
195
176
|
#endif
|
196
177
|
|
@@ -205,11 +186,9 @@
|
|
205
186
|
#endif
|
206
187
|
|
207
188
|
/* exporting methods */
|
208
|
-
#if
|
209
|
-
#
|
210
|
-
#
|
211
|
-
# define GCC_HASCLASSVISIBILITY
|
212
|
-
# endif
|
189
|
+
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
190
|
+
# ifndef GCC_HASCLASSVISIBILITY
|
191
|
+
# define GCC_HASCLASSVISIBILITY
|
213
192
|
# endif
|
214
193
|
#endif
|
215
194
|
|
@@ -235,7 +214,7 @@
|
|
235
214
|
# define SWIGSTDCALL __stdcall
|
236
215
|
# else
|
237
216
|
# define SWIGSTDCALL
|
238
|
-
# endif
|
217
|
+
# endif
|
239
218
|
#endif
|
240
219
|
|
241
220
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
@@ -248,19 +227,6 @@
|
|
248
227
|
# define _SCL_SECURE_NO_DEPRECATE
|
249
228
|
#endif
|
250
229
|
|
251
|
-
/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
|
252
|
-
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
|
253
|
-
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
|
254
|
-
#endif
|
255
|
-
|
256
|
-
/* Intel's compiler complains if a variable which was never initialised is
|
257
|
-
* cast to void, which is a common idiom which we use to indicate that we
|
258
|
-
* are aware a variable isn't used. So we just silence that warning.
|
259
|
-
* See: https://github.com/swig/swig/issues/192 for more discussion.
|
260
|
-
*/
|
261
|
-
#ifdef __INTEL_COMPILER
|
262
|
-
# pragma warning disable 592
|
263
|
-
#endif
|
264
230
|
|
265
231
|
/* -----------------------------------------------------------------------------
|
266
232
|
* swigrun.swg
|
@@ -286,7 +252,7 @@
|
|
286
252
|
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
|
287
253
|
creating a static or dynamic library from the SWIG runtime code.
|
288
254
|
In 99.9% of the cases, SWIG just needs to declare them as 'static'.
|
289
|
-
|
255
|
+
|
290
256
|
But only do this if strictly necessary, ie, if you have problems
|
291
257
|
with your compiler or suchlike.
|
292
258
|
*/
|
@@ -312,16 +278,16 @@
|
|
312
278
|
#define SWIG_POINTER_OWN 0x1
|
313
279
|
|
314
280
|
|
315
|
-
/*
|
281
|
+
/*
|
316
282
|
Flags/methods for returning states.
|
317
|
-
|
318
|
-
The SWIG conversion methods, as ConvertPtr, return an integer
|
283
|
+
|
284
|
+
The SWIG conversion methods, as ConvertPtr, return an integer
|
319
285
|
that tells if the conversion was successful or not. And if not,
|
320
286
|
an error code can be returned (see swigerrors.swg for the codes).
|
321
|
-
|
287
|
+
|
322
288
|
Use the following macros/flags to set or process the returning
|
323
289
|
states.
|
324
|
-
|
290
|
+
|
325
291
|
In old versions of SWIG, code such as the following was usually written:
|
326
292
|
|
327
293
|
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
|
@@ -354,23 +320,23 @@
|
|
354
320
|
} else {
|
355
321
|
// fail code
|
356
322
|
}
|
357
|
-
|
323
|
+
|
358
324
|
I.e., now SWIG_ConvertPtr can return new objects and you can
|
359
325
|
identify the case and take care of the deallocation. Of course that
|
360
326
|
also requires SWIG_ConvertPtr to return new result values, such as
|
361
327
|
|
362
|
-
int SWIG_ConvertPtr(obj, ptr,...) {
|
363
|
-
if (<obj is ok>) {
|
364
|
-
if (<need new object>) {
|
365
|
-
*ptr = <ptr to new allocated object>;
|
366
|
-
return SWIG_NEWOBJ;
|
367
|
-
} else {
|
368
|
-
*ptr = <ptr to old object>;
|
369
|
-
return SWIG_OLDOBJ;
|
370
|
-
}
|
371
|
-
} else {
|
372
|
-
return SWIG_BADOBJ;
|
373
|
-
}
|
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
|
+
}
|
374
340
|
}
|
375
341
|
|
376
342
|
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
|
@@ -384,17 +350,17 @@
|
|
384
350
|
int fooi(int);
|
385
351
|
|
386
352
|
and you call
|
387
|
-
|
353
|
+
|
388
354
|
food(1) // cast rank '1' (1 -> 1.0)
|
389
355
|
fooi(1) // cast rank '0'
|
390
356
|
|
391
357
|
just use the SWIG_AddCast()/SWIG_CheckState()
|
392
358
|
*/
|
393
359
|
|
394
|
-
#define SWIG_OK (0)
|
360
|
+
#define SWIG_OK (0)
|
395
361
|
#define SWIG_ERROR (-1)
|
396
362
|
#define SWIG_IsOK(r) (r >= 0)
|
397
|
-
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
363
|
+
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
398
364
|
|
399
365
|
/* The CastRankLimit says how many bits are used for the cast rank */
|
400
366
|
#define SWIG_CASTRANKLIMIT (1 << 8)
|
@@ -425,11 +391,11 @@
|
|
425
391
|
# endif
|
426
392
|
# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
|
427
393
|
# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
|
428
|
-
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
394
|
+
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
429
395
|
return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
|
430
396
|
}
|
431
|
-
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
432
|
-
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
397
|
+
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
398
|
+
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
433
399
|
}
|
434
400
|
#else /* no cast-rank mode */
|
435
401
|
# define SWIG_AddCast(r) (r)
|
@@ -476,7 +442,7 @@ typedef struct swig_module_info {
|
|
476
442
|
void *clientdata; /* Language specific module data */
|
477
443
|
} swig_module_info;
|
478
444
|
|
479
|
-
/*
|
445
|
+
/*
|
480
446
|
Compare two type names skipping the space characters, therefore
|
481
447
|
"char*" == "char *" and "Class<int>" == "Class<int >", etc.
|
482
448
|
|
@@ -549,7 +515,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
|
|
549
515
|
return 0;
|
550
516
|
}
|
551
517
|
|
552
|
-
/*
|
518
|
+
/*
|
553
519
|
Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
|
554
520
|
*/
|
555
521
|
SWIGRUNTIME swig_cast_info *
|
@@ -584,7 +550,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
|
|
584
550
|
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
|
585
551
|
}
|
586
552
|
|
587
|
-
/*
|
553
|
+
/*
|
588
554
|
Dynamic pointer casting. Down an inheritance hierarchy
|
589
555
|
*/
|
590
556
|
SWIGRUNTIME swig_type_info *
|
@@ -628,7 +594,7 @@ SWIG_TypePrettyName(const swig_type_info *type) {
|
|
628
594
|
return type->name;
|
629
595
|
}
|
630
596
|
|
631
|
-
/*
|
597
|
+
/*
|
632
598
|
Set the clientdata field for a type
|
633
599
|
*/
|
634
600
|
SWIGRUNTIME void
|
@@ -636,14 +602,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
|
636
602
|
swig_cast_info *cast = ti->cast;
|
637
603
|
/* if (ti->clientdata == clientdata) return; */
|
638
604
|
ti->clientdata = clientdata;
|
639
|
-
|
605
|
+
|
640
606
|
while (cast) {
|
641
607
|
if (!cast->converter) {
|
642
608
|
swig_type_info *tc = cast->type;
|
643
609
|
if (!tc->clientdata) {
|
644
610
|
SWIG_TypeClientData(tc, clientdata);
|
645
611
|
}
|
646
|
-
}
|
612
|
+
}
|
647
613
|
cast = cast->next;
|
648
614
|
}
|
649
615
|
}
|
@@ -652,31 +618,31 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
|
|
652
618
|
SWIG_TypeClientData(ti, clientdata);
|
653
619
|
ti->owndata = 1;
|
654
620
|
}
|
655
|
-
|
621
|
+
|
656
622
|
/*
|
657
623
|
Search for a swig_type_info structure only by mangled name
|
658
624
|
Search is a O(log #types)
|
659
|
-
|
660
|
-
We start searching at module start, and finish searching when start == end.
|
625
|
+
|
626
|
+
We start searching at module start, and finish searching when start == end.
|
661
627
|
Note: if start == end at the beginning of the function, we go all the way around
|
662
628
|
the circular list.
|
663
629
|
*/
|
664
630
|
SWIGRUNTIME swig_type_info *
|
665
|
-
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
666
|
-
swig_module_info *end,
|
631
|
+
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
632
|
+
swig_module_info *end,
|
667
633
|
const char *name) {
|
668
634
|
swig_module_info *iter = start;
|
669
635
|
do {
|
670
636
|
if (iter->size) {
|
671
|
-
size_t l = 0;
|
672
|
-
size_t r = iter->size - 1;
|
637
|
+
register size_t l = 0;
|
638
|
+
register size_t r = iter->size - 1;
|
673
639
|
do {
|
674
640
|
/* since l+r >= 0, we can (>> 1) instead (/ 2) */
|
675
|
-
size_t i = (l + r) >> 1;
|
641
|
+
register size_t i = (l + r) >> 1;
|
676
642
|
const char *iname = iter->types[i]->name;
|
677
643
|
if (iname) {
|
678
|
-
int compare = strcmp(name, iname);
|
679
|
-
if (compare == 0) {
|
644
|
+
register int compare = strcmp(name, iname);
|
645
|
+
if (compare == 0) {
|
680
646
|
return iter->types[i];
|
681
647
|
} else if (compare < 0) {
|
682
648
|
if (i) {
|
@@ -701,14 +667,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
|
|
701
667
|
Search for a swig_type_info structure for either a mangled name or a human readable name.
|
702
668
|
It first searches the mangled names of the types, which is a O(log #types)
|
703
669
|
If a type is not found it then searches the human readable names, which is O(#types).
|
704
|
-
|
705
|
-
We start searching at module start, and finish searching when start == end.
|
670
|
+
|
671
|
+
We start searching at module start, and finish searching when start == end.
|
706
672
|
Note: if start == end at the beginning of the function, we go all the way around
|
707
673
|
the circular list.
|
708
674
|
*/
|
709
675
|
SWIGRUNTIME swig_type_info *
|
710
|
-
SWIG_TypeQueryModule(swig_module_info *start,
|
711
|
-
swig_module_info *end,
|
676
|
+
SWIG_TypeQueryModule(swig_module_info *start,
|
677
|
+
swig_module_info *end,
|
712
678
|
const char *name) {
|
713
679
|
/* STEP 1: Search the name field using binary search */
|
714
680
|
swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
|
@@ -719,7 +685,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
|
|
719
685
|
of the str field (the human readable name) */
|
720
686
|
swig_module_info *iter = start;
|
721
687
|
do {
|
722
|
-
size_t i = 0;
|
688
|
+
register size_t i = 0;
|
723
689
|
for (; i < iter->size; ++i) {
|
724
690
|
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
|
725
691
|
return iter->types[i];
|
@@ -727,56 +693,56 @@ SWIG_TypeQueryModule(swig_module_info *start,
|
|
727
693
|
iter = iter->next;
|
728
694
|
} while (iter != end);
|
729
695
|
}
|
730
|
-
|
696
|
+
|
731
697
|
/* neither found a match */
|
732
698
|
return 0;
|
733
699
|
}
|
734
700
|
|
735
|
-
/*
|
701
|
+
/*
|
736
702
|
Pack binary data into a string
|
737
703
|
*/
|
738
704
|
SWIGRUNTIME char *
|
739
705
|
SWIG_PackData(char *c, void *ptr, size_t sz) {
|
740
706
|
static const char hex[17] = "0123456789abcdef";
|
741
|
-
const unsigned char *u = (unsigned char *) ptr;
|
742
|
-
const unsigned char *eu = u + sz;
|
707
|
+
register const unsigned char *u = (unsigned char *) ptr;
|
708
|
+
register const unsigned char *eu = u + sz;
|
743
709
|
for (; u != eu; ++u) {
|
744
|
-
unsigned char uu = *u;
|
710
|
+
register unsigned char uu = *u;
|
745
711
|
*(c++) = hex[(uu & 0xf0) >> 4];
|
746
712
|
*(c++) = hex[uu & 0xf];
|
747
713
|
}
|
748
714
|
return c;
|
749
715
|
}
|
750
716
|
|
751
|
-
/*
|
717
|
+
/*
|
752
718
|
Unpack binary data from a string
|
753
719
|
*/
|
754
720
|
SWIGRUNTIME const char *
|
755
721
|
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
756
|
-
unsigned char *u = (unsigned char *) ptr;
|
757
|
-
const unsigned char *eu = u + sz;
|
722
|
+
register unsigned char *u = (unsigned char *) ptr;
|
723
|
+
register const unsigned char *eu = u + sz;
|
758
724
|
for (; u != eu; ++u) {
|
759
|
-
char d = *(c++);
|
760
|
-
unsigned char uu;
|
725
|
+
register char d = *(c++);
|
726
|
+
register unsigned char uu;
|
761
727
|
if ((d >= '0') && (d <= '9'))
|
762
|
-
uu = (
|
728
|
+
uu = ((d - '0') << 4);
|
763
729
|
else if ((d >= 'a') && (d <= 'f'))
|
764
|
-
uu = (
|
765
|
-
else
|
730
|
+
uu = ((d - ('a'-10)) << 4);
|
731
|
+
else
|
766
732
|
return (char *) 0;
|
767
733
|
d = *(c++);
|
768
734
|
if ((d >= '0') && (d <= '9'))
|
769
|
-
uu |= (
|
735
|
+
uu |= (d - '0');
|
770
736
|
else if ((d >= 'a') && (d <= 'f'))
|
771
|
-
uu |= (
|
772
|
-
else
|
737
|
+
uu |= (d - ('a'-10));
|
738
|
+
else
|
773
739
|
return (char *) 0;
|
774
740
|
*u = uu;
|
775
741
|
}
|
776
742
|
return c;
|
777
743
|
}
|
778
744
|
|
779
|
-
/*
|
745
|
+
/*
|
780
746
|
Pack 'void *' into a string buffer.
|
781
747
|
*/
|
782
748
|
SWIGRUNTIME char *
|
@@ -836,18 +802,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
836
802
|
#endif
|
837
803
|
|
838
804
|
/* Errors in SWIG */
|
839
|
-
#define SWIG_UnknownError -1
|
840
|
-
#define SWIG_IOError -2
|
841
|
-
#define SWIG_RuntimeError -3
|
842
|
-
#define SWIG_IndexError -4
|
843
|
-
#define SWIG_TypeError -5
|
844
|
-
#define SWIG_DivisionByZero -6
|
845
|
-
#define SWIG_OverflowError -7
|
846
|
-
#define SWIG_SyntaxError -8
|
847
|
-
#define SWIG_ValueError -9
|
805
|
+
#define SWIG_UnknownError -1
|
806
|
+
#define SWIG_IOError -2
|
807
|
+
#define SWIG_RuntimeError -3
|
808
|
+
#define SWIG_IndexError -4
|
809
|
+
#define SWIG_TypeError -5
|
810
|
+
#define SWIG_DivisionByZero -6
|
811
|
+
#define SWIG_OverflowError -7
|
812
|
+
#define SWIG_SyntaxError -8
|
813
|
+
#define SWIG_ValueError -9
|
848
814
|
#define SWIG_SystemError -10
|
849
815
|
#define SWIG_AttributeError -11
|
850
|
-
#define SWIG_MemoryError -12
|
816
|
+
#define SWIG_MemoryError -12
|
851
817
|
#define SWIG_NullReferenceError -13
|
852
818
|
|
853
819
|
|
@@ -1178,11 +1144,6 @@ void Ruby_Format_OverloadedError(
|
|
1178
1144
|
extern "C" {
|
1179
1145
|
#endif
|
1180
1146
|
|
1181
|
-
#if !defined(ST_DATA_T_DEFINED)
|
1182
|
-
/* Needs to be explicitly included for Ruby 1.8 and earlier */
|
1183
|
-
#include <st.h>
|
1184
|
-
#endif
|
1185
|
-
|
1186
1147
|
/* Ruby 1.8 actually assumes the first case. */
|
1187
1148
|
#if SIZEOF_VOIDP == SIZEOF_LONG
|
1188
1149
|
# define SWIG2NUM(v) LONG2NUM((unsigned long)v)
|
@@ -1194,19 +1155,19 @@ extern "C" {
|
|
1194
1155
|
# error sizeof(void*) is not the same as long or long long
|
1195
1156
|
#endif
|
1196
1157
|
|
1197
|
-
|
1158
|
+
|
1159
|
+
/* Global Ruby hash table to store Trackings from C/C++
|
1198
1160
|
structs to Ruby Objects.
|
1199
1161
|
*/
|
1200
|
-
static
|
1201
|
-
|
1202
|
-
static VALUE swig_ruby_trackings_count(ANYARGS) {
|
1203
|
-
return SWIG2NUM(swig_ruby_trackings->num_entries);
|
1204
|
-
}
|
1162
|
+
static VALUE swig_ruby_trackings = Qnil;
|
1205
1163
|
|
1164
|
+
/* Global variable that stores a reference to the ruby
|
1165
|
+
hash table delete function. */
|
1166
|
+
static ID swig_ruby_hash_delete;
|
1206
1167
|
|
1207
|
-
/* Setup a hash table to store Trackings */
|
1168
|
+
/* Setup a Ruby hash table to store Trackings */
|
1208
1169
|
SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
|
1209
|
-
/* Create a hash table to store Trackings from C++
|
1170
|
+
/* Create a ruby hash table to store Trackings from C++
|
1210
1171
|
objects to Ruby objects. */
|
1211
1172
|
|
1212
1173
|
/* Try to see if some other .so has already created a
|
@@ -1215,46 +1176,88 @@ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
|
|
1215
1176
|
This is done to allow multiple DSOs to share the same
|
1216
1177
|
tracking table.
|
1217
1178
|
*/
|
1218
|
-
|
1219
|
-
/* change the variable name so that we can mix modules
|
1220
|
-
compiled with older SWIG's - this used to be called "@__trackings__" */
|
1221
|
-
ID trackings_id = rb_intern( "@__safetrackings__" );
|
1179
|
+
ID trackings_id = rb_intern( "@__trackings__" );
|
1222
1180
|
VALUE verbose = rb_gv_get("VERBOSE");
|
1223
1181
|
rb_gv_set("VERBOSE", Qfalse);
|
1224
|
-
|
1182
|
+
swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
|
1225
1183
|
rb_gv_set("VERBOSE", verbose);
|
1226
1184
|
|
1227
|
-
/*
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
swig_ruby_trackings = st_init_numtable();
|
1234
|
-
rb_ivar_set( _mSWIG, trackings_id, SWIG2NUM(swig_ruby_trackings) );
|
1235
|
-
} else {
|
1236
|
-
swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value);
|
1237
|
-
}
|
1185
|
+
/* No, it hasn't. Create one ourselves */
|
1186
|
+
if ( swig_ruby_trackings == Qnil )
|
1187
|
+
{
|
1188
|
+
swig_ruby_trackings = rb_hash_new();
|
1189
|
+
rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
|
1190
|
+
}
|
1238
1191
|
|
1239
|
-
|
1192
|
+
/* Now store a reference to the hash table delete function
|
1193
|
+
so that we only have to look it up once.*/
|
1194
|
+
swig_ruby_hash_delete = rb_intern("delete");
|
1195
|
+
}
|
1196
|
+
|
1197
|
+
/* Get a Ruby number to reference a pointer */
|
1198
|
+
SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
|
1199
|
+
/* We cast the pointer to an unsigned long
|
1200
|
+
and then store a reference to it using
|
1201
|
+
a Ruby number object. */
|
1202
|
+
|
1203
|
+
/* Convert the pointer to a Ruby number */
|
1204
|
+
return SWIG2NUM(ptr);
|
1205
|
+
}
|
1206
|
+
|
1207
|
+
/* Get a Ruby number to reference an object */
|
1208
|
+
SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
|
1209
|
+
/* We cast the object to an unsigned long
|
1210
|
+
and then store a reference to it using
|
1211
|
+
a Ruby number object. */
|
1212
|
+
|
1213
|
+
/* Convert the Object to a Ruby number */
|
1214
|
+
return SWIG2NUM(object);
|
1215
|
+
}
|
1216
|
+
|
1217
|
+
/* Get a Ruby object from a previously stored reference */
|
1218
|
+
SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
|
1219
|
+
/* The provided Ruby number object is a reference
|
1220
|
+
to the Ruby object we want.*/
|
1221
|
+
|
1222
|
+
/* Convert the Ruby number to a Ruby object */
|
1223
|
+
return NUM2SWIG(reference);
|
1240
1224
|
}
|
1241
1225
|
|
1242
1226
|
/* Add a Tracking from a C/C++ struct to a Ruby object */
|
1243
1227
|
SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
|
1228
|
+
/* In a Ruby hash table we store the pointer and
|
1229
|
+
the associated Ruby object. The trick here is
|
1230
|
+
that we cannot store the Ruby object directly - if
|
1231
|
+
we do then it cannot be garbage collected. So
|
1232
|
+
instead we typecast it as a unsigned long and
|
1233
|
+
convert it to a Ruby number object.*/
|
1234
|
+
|
1235
|
+
/* Get a reference to the pointer as a Ruby number */
|
1236
|
+
VALUE key = SWIG_RubyPtrToReference(ptr);
|
1237
|
+
|
1238
|
+
/* Get a reference to the Ruby object as a Ruby number */
|
1239
|
+
VALUE value = SWIG_RubyObjectToReference(object);
|
1240
|
+
|
1244
1241
|
/* Store the mapping to the global hash table. */
|
1245
|
-
|
1242
|
+
rb_hash_aset(swig_ruby_trackings, key, value);
|
1246
1243
|
}
|
1247
1244
|
|
1248
1245
|
/* Get the Ruby object that owns the specified C/C++ struct */
|
1249
1246
|
SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
|
1250
|
-
/*
|
1251
|
-
VALUE
|
1247
|
+
/* Get a reference to the pointer as a Ruby number */
|
1248
|
+
VALUE key = SWIG_RubyPtrToReference(ptr);
|
1252
1249
|
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1250
|
+
/* Now lookup the value stored in the global hash table */
|
1251
|
+
VALUE value = rb_hash_aref(swig_ruby_trackings, key);
|
1252
|
+
|
1253
|
+
if (value == Qnil) {
|
1254
|
+
/* No object exists - return nil. */
|
1256
1255
|
return Qnil;
|
1257
1256
|
}
|
1257
|
+
else {
|
1258
|
+
/* Convert this value to Ruby object */
|
1259
|
+
return SWIG_RubyReferenceToObject(value);
|
1260
|
+
}
|
1258
1261
|
}
|
1259
1262
|
|
1260
1263
|
/* Remove a Tracking from a C/C++ struct to a Ruby object. It
|
@@ -1262,8 +1265,12 @@ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
|
|
1262
1265
|
since the same memory address may be reused later to create
|
1263
1266
|
a new object. */
|
1264
1267
|
SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
|
1265
|
-
/*
|
1266
|
-
|
1268
|
+
/* Get a reference to the pointer as a Ruby number */
|
1269
|
+
VALUE key = SWIG_RubyPtrToReference(ptr);
|
1270
|
+
|
1271
|
+
/* Delete the object from the hash table by calling Ruby's
|
1272
|
+
do this we need to call the Hash.delete method.*/
|
1273
|
+
rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
|
1267
1274
|
}
|
1268
1275
|
|
1269
1276
|
/* This is a helper method that unlinks a Ruby object from its
|
@@ -1273,25 +1280,10 @@ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
|
|
1273
1280
|
VALUE object = SWIG_RubyInstanceFor(ptr);
|
1274
1281
|
|
1275
1282
|
if (object != Qnil) {
|
1276
|
-
if (TYPE(object) != T_DATA)
|
1277
|
-
abort();
|
1278
1283
|
DATA_PTR(object) = 0;
|
1279
1284
|
}
|
1280
1285
|
}
|
1281
1286
|
|
1282
|
-
/* This is a helper method that iterates over all the trackings
|
1283
|
-
passing the C++ object pointer and its related Ruby object
|
1284
|
-
to the passed callback function. */
|
1285
|
-
|
1286
|
-
/* Proxy method to abstract the internal trackings datatype */
|
1287
|
-
static int swig_ruby_internal_iterate_callback(void* ptr, VALUE obj, void(*meth)(void* ptr, VALUE obj)) {
|
1288
|
-
(*meth)(ptr, obj);
|
1289
|
-
return ST_CONTINUE;
|
1290
|
-
}
|
1291
|
-
|
1292
|
-
SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) {
|
1293
|
-
st_foreach(swig_ruby_trackings, (int (*)(ANYARGS))&swig_ruby_internal_iterate_callback, (st_data_t)meth);
|
1294
|
-
}
|
1295
1287
|
|
1296
1288
|
#ifdef __cplusplus
|
1297
1289
|
}
|
@@ -1350,7 +1342,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1350
1342
|
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
|
1351
1343
|
#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
|
1352
1344
|
#define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
|
1353
|
-
#define swig_owntype
|
1345
|
+
#define swig_owntype ruby_owntype
|
1354
1346
|
|
1355
1347
|
/* for raw packed data */
|
1356
1348
|
#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
|
@@ -1487,13 +1479,14 @@ SWIG_Ruby_InitRuntime(void)
|
|
1487
1479
|
SWIGRUNTIME void
|
1488
1480
|
SWIG_Ruby_define_class(swig_type_info *type)
|
1489
1481
|
{
|
1482
|
+
VALUE klass;
|
1490
1483
|
char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
|
1491
1484
|
sprintf(klass_name, "TYPE%s", type->name);
|
1492
1485
|
if (NIL_P(_cSWIG_Pointer)) {
|
1493
1486
|
_cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
|
1494
1487
|
rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
|
1495
1488
|
}
|
1496
|
-
rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
|
1489
|
+
klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
|
1497
1490
|
free((void *) klass_name);
|
1498
1491
|
}
|
1499
1492
|
|
@@ -1574,24 +1567,22 @@ SWIG_Ruby_MangleStr(VALUE obj)
|
|
1574
1567
|
}
|
1575
1568
|
|
1576
1569
|
/* Acquire a pointer value */
|
1577
|
-
typedef
|
1578
|
-
void (*datafree)(void *);
|
1579
|
-
int own;
|
1580
|
-
} swig_ruby_owntype;
|
1570
|
+
typedef void (*ruby_owntype)(void*);
|
1581
1571
|
|
1582
|
-
SWIGRUNTIME
|
1583
|
-
SWIG_Ruby_AcquirePtr(VALUE obj,
|
1584
|
-
swig_ruby_owntype oldown = {0, 0};
|
1572
|
+
SWIGRUNTIME ruby_owntype
|
1573
|
+
SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
|
1585
1574
|
if (obj) {
|
1586
|
-
oldown
|
1587
|
-
RDATA(obj)->dfree = own
|
1575
|
+
ruby_owntype oldown = RDATA(obj)->dfree;
|
1576
|
+
RDATA(obj)->dfree = own;
|
1577
|
+
return oldown;
|
1578
|
+
} else {
|
1579
|
+
return 0;
|
1588
1580
|
}
|
1589
|
-
return oldown;
|
1590
1581
|
}
|
1591
1582
|
|
1592
1583
|
/* Convert a pointer value */
|
1593
1584
|
SWIGRUNTIME int
|
1594
|
-
SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
1585
|
+
SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
|
1595
1586
|
{
|
1596
1587
|
char *c;
|
1597
1588
|
swig_cast_info *tc;
|
@@ -1599,8 +1590,7 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1599
1590
|
|
1600
1591
|
/* Grab the pointer */
|
1601
1592
|
if (NIL_P(obj)) {
|
1602
|
-
|
1603
|
-
*ptr = 0;
|
1593
|
+
*ptr = 0;
|
1604
1594
|
return SWIG_OK;
|
1605
1595
|
} else {
|
1606
1596
|
if (TYPE(obj) != T_DATA) {
|
@@ -1609,10 +1599,7 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1609
1599
|
Data_Get_Struct(obj, void, vptr);
|
1610
1600
|
}
|
1611
1601
|
|
1612
|
-
if (own)
|
1613
|
-
own->datafree = RDATA(obj)->dfree;
|
1614
|
-
own->own = 0;
|
1615
|
-
}
|
1602
|
+
if (own) *own = RDATA(obj)->dfree;
|
1616
1603
|
|
1617
1604
|
/* Check to see if the input object is giving up ownership
|
1618
1605
|
of the underlying C struct or C++ object. If so then we
|
@@ -1647,6 +1634,8 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1647
1634
|
/* The object has already been deleted */
|
1648
1635
|
return SWIG_ObjectPreviouslyDeletedError;
|
1649
1636
|
}
|
1637
|
+
*ptr = vptr;
|
1638
|
+
return SWIG_OK;
|
1650
1639
|
}
|
1651
1640
|
}
|
1652
1641
|
if ((c = SWIG_MangleStr(obj)) == NULL) {
|
@@ -1656,23 +1645,12 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1656
1645
|
if (!tc) {
|
1657
1646
|
return SWIG_ERROR;
|
1658
1647
|
} else {
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
} else {
|
1663
|
-
int newmemory = 0;
|
1664
|
-
*ptr = SWIG_TypeCast(tc, vptr, &newmemory);
|
1665
|
-
if (newmemory == SWIG_CAST_NEW_MEMORY) {
|
1666
|
-
assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
|
1667
|
-
if (own)
|
1668
|
-
own->own = own->own | SWIG_CAST_NEW_MEMORY;
|
1669
|
-
}
|
1670
|
-
}
|
1671
|
-
}
|
1648
|
+
int newmemory = 0;
|
1649
|
+
*ptr = SWIG_TypeCast(tc, vptr, &newmemory);
|
1650
|
+
assert(!newmemory); /* newmemory handling not yet implemented */
|
1672
1651
|
}
|
1673
1652
|
} else {
|
1674
|
-
|
1675
|
-
*ptr = vptr;
|
1653
|
+
*ptr = vptr;
|
1676
1654
|
}
|
1677
1655
|
|
1678
1656
|
return SWIG_OK;
|
@@ -1886,7 +1864,7 @@ static VALUE mCproton;
|
|
1886
1864
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
1887
1865
|
|
1888
1866
|
|
1889
|
-
#define SWIGVERSION
|
1867
|
+
#define SWIGVERSION 0x020010
|
1890
1868
|
#define SWIG_VERSION SWIGVERSION
|
1891
1869
|
|
1892
1870
|
|
@@ -1921,7 +1899,7 @@ SWIG_ruby_failed(void)
|
|
1921
1899
|
}
|
1922
1900
|
|
1923
1901
|
|
1924
|
-
/*@SWIG:/usr/share/swig/
|
1902
|
+
/*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
1925
1903
|
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
|
1926
1904
|
{
|
1927
1905
|
VALUE obj = args[0];
|
@@ -1950,69 +1928,12 @@ SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
|
|
1950
1928
|
}
|
1951
1929
|
|
1952
1930
|
|
1953
|
-
#include <limits.h>
|
1954
|
-
#if !defined(SWIG_NO_LLONG_MAX)
|
1955
|
-
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
|
1956
|
-
# define LLONG_MAX __LONG_LONG_MAX__
|
1957
|
-
# define LLONG_MIN (-LLONG_MAX - 1LL)
|
1958
|
-
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
|
1959
|
-
# endif
|
1960
|
-
#endif
|
1961
|
-
|
1962
|
-
|
1963
|
-
#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
|
1964
|
-
# define SWIG_LONG_LONG_AVAILABLE
|
1965
|
-
#endif
|
1966
|
-
|
1967
|
-
|
1968
|
-
#ifdef SWIG_LONG_LONG_AVAILABLE
|
1969
|
-
/*@SWIG:/usr/share/swig/3.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
1970
|
-
SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE *args)
|
1971
|
-
{
|
1972
|
-
VALUE obj = args[0];
|
1973
|
-
VALUE type = TYPE(obj);
|
1974
|
-
long long *res = (long long *)(args[1]);
|
1975
|
-
*res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj);
|
1976
|
-
return obj;
|
1977
|
-
}
|
1978
|
-
/*@SWIG@*/
|
1979
|
-
|
1980
|
-
SWIGINTERN int
|
1981
|
-
SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val)
|
1982
|
-
{
|
1983
|
-
VALUE type = TYPE(obj);
|
1984
|
-
if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
|
1985
|
-
unsigned long long v;
|
1986
|
-
VALUE a[2];
|
1987
|
-
a[0] = obj;
|
1988
|
-
a[1] = (VALUE)(&v);
|
1989
|
-
if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
|
1990
|
-
if (val) *val = v;
|
1991
|
-
return SWIG_OK;
|
1992
|
-
}
|
1993
|
-
}
|
1994
|
-
return SWIG_TypeError;
|
1995
|
-
}
|
1996
|
-
#endif
|
1997
|
-
|
1998
|
-
|
1999
1931
|
SWIGINTERNINLINE int
|
2000
1932
|
SWIG_AsVal_size_t (VALUE obj, size_t *val)
|
2001
1933
|
{
|
2002
|
-
|
2003
|
-
|
2004
|
-
if (
|
2005
|
-
#endif
|
2006
|
-
unsigned long v;
|
2007
|
-
res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
|
2008
|
-
if (SWIG_IsOK(res) && val) *val = (size_t)(v);
|
2009
|
-
#ifdef SWIG_LONG_LONG_AVAILABLE
|
2010
|
-
} else if (sizeof(size_t) <= sizeof(unsigned long long)) {
|
2011
|
-
unsigned long long v;
|
2012
|
-
res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
|
2013
|
-
if (SWIG_IsOK(res) && val) *val = (size_t)(v);
|
2014
|
-
}
|
2015
|
-
#endif
|
1934
|
+
unsigned long v;
|
1935
|
+
int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
|
1936
|
+
if (SWIG_IsOK(res) && val) *val = (size_t)(v);
|
2016
1937
|
return res;
|
2017
1938
|
}
|
2018
1939
|
|
@@ -2039,7 +1960,7 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
|
|
2039
1960
|
if (cptr) {
|
2040
1961
|
if (alloc) {
|
2041
1962
|
if (*alloc == SWIG_NEWOBJ) {
|
2042
|
-
*cptr = (char *)memcpy(malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
|
1963
|
+
*cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
|
2043
1964
|
} else {
|
2044
1965
|
*cptr = cstr;
|
2045
1966
|
*alloc = SWIG_OLDOBJ;
|
@@ -2084,6 +2005,16 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
|
|
2084
2005
|
}
|
2085
2006
|
|
2086
2007
|
|
2008
|
+
#include <limits.h>
|
2009
|
+
#if !defined(SWIG_NO_LLONG_MAX)
|
2010
|
+
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
|
2011
|
+
# define LLONG_MAX __LONG_LONG_MAX__
|
2012
|
+
# define LLONG_MIN (-LLONG_MAX - 1LL)
|
2013
|
+
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
|
2014
|
+
# endif
|
2015
|
+
#endif
|
2016
|
+
|
2017
|
+
|
2087
2018
|
#define SWIG_From_long LONG2NUM
|
2088
2019
|
|
2089
2020
|
|
@@ -2296,7 +2227,7 @@ SWIG_From_bool (bool value)
|
|
2296
2227
|
|
2297
2228
|
|
2298
2229
|
|
2299
|
-
/*@SWIG:/usr/share/swig/
|
2230
|
+
/*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2300
2231
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
|
2301
2232
|
{
|
2302
2233
|
VALUE obj = args[0];
|
@@ -2529,28 +2460,10 @@ SWIG_From_unsigned_SS_long (unsigned long value)
|
|
2529
2460
|
}
|
2530
2461
|
|
2531
2462
|
|
2532
|
-
#ifdef SWIG_LONG_LONG_AVAILABLE
|
2533
|
-
SWIGINTERNINLINE VALUE
|
2534
|
-
SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
|
2535
|
-
{
|
2536
|
-
return ULL2NUM(value);
|
2537
|
-
}
|
2538
|
-
#endif
|
2539
|
-
|
2540
|
-
|
2541
2463
|
SWIGINTERNINLINE VALUE
|
2542
2464
|
SWIG_From_size_t (size_t value)
|
2543
2465
|
{
|
2544
|
-
|
2545
|
-
if (sizeof(size_t) <= sizeof(unsigned long)) {
|
2546
|
-
#endif
|
2547
|
-
return SWIG_From_unsigned_SS_long ((unsigned long)(value));
|
2548
|
-
#ifdef SWIG_LONG_LONG_AVAILABLE
|
2549
|
-
} else {
|
2550
|
-
/* assume sizeof(size_t) <= sizeof(unsigned long long) */
|
2551
|
-
return SWIG_From_unsigned_SS_long_SS_long ((unsigned long long)(value));
|
2552
|
-
}
|
2553
|
-
#endif
|
2466
|
+
return SWIG_From_unsigned_SS_long ((unsigned long)(value));
|
2554
2467
|
}
|
2555
2468
|
|
2556
2469
|
|
@@ -2561,57 +2474,30 @@ SWIG_From_unsigned_SS_int (unsigned int value)
|
|
2561
2474
|
}
|
2562
2475
|
|
2563
2476
|
|
2564
|
-
|
2565
|
-
|
2566
|
-
|
2567
|
-
|
2477
|
+
SWIGINTERNINLINE VALUE
|
2478
|
+
SWIG_From_long_SS_long (long long value)
|
2479
|
+
{
|
2480
|
+
return LL2NUM(value);
|
2481
|
+
}
|
2568
2482
|
|
2569
2483
|
|
2570
|
-
|
2571
|
-
|
2572
|
-
|
2573
|
-
|
2574
|
-
|
2575
|
-
# elif defined __cplusplus && __cplusplus >= 201103L
|
2576
|
-
/* Use a template so that this works whether isfinite() is std::isfinite() or
|
2577
|
-
* in the global namespace. The reality seems to vary between compiler
|
2578
|
-
* versions.
|
2579
|
-
*
|
2580
|
-
* Make sure namespace std exists to avoid compiler warnings.
|
2581
|
-
*
|
2582
|
-
* extern "C++" is required as this fragment can end up inside an extern "C" { } block
|
2583
|
-
*/
|
2584
|
-
namespace std { }
|
2585
|
-
extern "C++" template<typename T>
|
2586
|
-
inline int SWIG_isfinite_func(T x) {
|
2587
|
-
using namespace std;
|
2588
|
-
return isfinite(x);
|
2589
|
-
}
|
2590
|
-
# define SWIG_isfinite(X) (SWIG_isfinite_func(X))
|
2591
|
-
# elif defined(_MSC_VER)
|
2592
|
-
# define SWIG_isfinite(X) (_finite(X))
|
2593
|
-
# elif defined(__sun) && defined(__SVR4)
|
2594
|
-
# include <ieeefp.h>
|
2595
|
-
# define SWIG_isfinite(X) (finite(X))
|
2596
|
-
# endif
|
2597
|
-
#endif
|
2484
|
+
SWIGINTERNINLINE VALUE
|
2485
|
+
SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
|
2486
|
+
{
|
2487
|
+
return ULL2NUM(value);
|
2488
|
+
}
|
2598
2489
|
|
2599
2490
|
|
2600
|
-
|
2601
|
-
#ifdef SWIG_isfinite
|
2602
|
-
# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
|
2603
|
-
#else
|
2604
|
-
# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
|
2605
|
-
#endif
|
2491
|
+
#include <float.h>
|
2606
2492
|
|
2607
2493
|
|
2608
|
-
/*@SWIG:/usr/share/swig/
|
2494
|
+
/*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2609
2495
|
SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
|
2610
2496
|
{
|
2611
2497
|
VALUE obj = args[0];
|
2612
2498
|
VALUE type = TYPE(obj);
|
2613
2499
|
double *res = (double *)(args[1]);
|
2614
|
-
*res = NUM2DBL(obj);
|
2500
|
+
*res = NUM2DBL(obj);
|
2615
2501
|
return obj;
|
2616
2502
|
}
|
2617
2503
|
/*@SWIG@*/
|
@@ -2640,7 +2526,7 @@ SWIG_AsVal_float (VALUE obj, float *val)
|
|
2640
2526
|
double v;
|
2641
2527
|
int res = SWIG_AsVal_double (obj, &v);
|
2642
2528
|
if (SWIG_IsOK(res)) {
|
2643
|
-
if (
|
2529
|
+
if ((v < -FLT_MAX || v > FLT_MAX)) {
|
2644
2530
|
return SWIG_OverflowError;
|
2645
2531
|
} else {
|
2646
2532
|
if (val) *val = (float)(v);
|
@@ -2650,6 +2536,35 @@ SWIG_AsVal_float (VALUE obj, float *val)
|
|
2650
2536
|
}
|
2651
2537
|
|
2652
2538
|
|
2539
|
+
/*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2540
|
+
SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE *args)
|
2541
|
+
{
|
2542
|
+
VALUE obj = args[0];
|
2543
|
+
VALUE type = TYPE(obj);
|
2544
|
+
long long *res = (long long *)(args[1]);
|
2545
|
+
*res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj);
|
2546
|
+
return obj;
|
2547
|
+
}
|
2548
|
+
/*@SWIG@*/
|
2549
|
+
|
2550
|
+
SWIGINTERN int
|
2551
|
+
SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val)
|
2552
|
+
{
|
2553
|
+
VALUE type = TYPE(obj);
|
2554
|
+
if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
|
2555
|
+
unsigned long long v;
|
2556
|
+
VALUE a[2];
|
2557
|
+
a[0] = obj;
|
2558
|
+
a[1] = (VALUE)(&v);
|
2559
|
+
if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
|
2560
|
+
if (val) *val = v;
|
2561
|
+
return SWIG_OK;
|
2562
|
+
}
|
2563
|
+
}
|
2564
|
+
return SWIG_TypeError;
|
2565
|
+
}
|
2566
|
+
|
2567
|
+
|
2653
2568
|
SWIGINTERN int
|
2654
2569
|
SWIG_AsVal_bool (VALUE obj, bool *val)
|
2655
2570
|
{
|
@@ -2693,8 +2608,7 @@ SWIG_AsVal_unsigned_SS_short (VALUE obj, unsigned short *val)
|
|
2693
2608
|
}
|
2694
2609
|
|
2695
2610
|
|
2696
|
-
|
2697
|
-
/*@SWIG:/usr/share/swig/3.0.12/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2611
|
+
/*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2698
2612
|
SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE *args)
|
2699
2613
|
{
|
2700
2614
|
VALUE obj = args[0];
|
@@ -2721,16 +2635,6 @@ SWIG_AsVal_long_SS_long (VALUE obj, long long *val)
|
|
2721
2635
|
}
|
2722
2636
|
return SWIG_TypeError;
|
2723
2637
|
}
|
2724
|
-
#endif
|
2725
|
-
|
2726
|
-
|
2727
|
-
#ifdef SWIG_LONG_LONG_AVAILABLE
|
2728
|
-
SWIGINTERNINLINE VALUE
|
2729
|
-
SWIG_From_long_SS_long (long long value)
|
2730
|
-
{
|
2731
|
-
return LL2NUM(value);
|
2732
|
-
}
|
2733
|
-
#endif
|
2734
2638
|
|
2735
2639
|
|
2736
2640
|
/* assume the binding does the incref in the wrapper */
|
@@ -2851,7 +2755,7 @@ _wrap_pn_message_encode(int argc, VALUE *argv, VALUE self) {
|
|
2851
2755
|
if (!SWIG_IsOK(res2)) {
|
2852
2756
|
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","pn_message_encode", 2, argv[1] ));
|
2853
2757
|
}
|
2854
|
-
buff2= (char *)
|
2758
|
+
buff2= (char *)malloc((n2+1)*sizeof(char));
|
2855
2759
|
arg2 = (char *)(buff2);
|
2856
2760
|
size2 = (size_t)(n2);
|
2857
2761
|
arg3 = &size2;
|
@@ -2930,7 +2834,7 @@ _wrap_pn_link_recv(int argc, VALUE *argv, VALUE self) {
|
|
2930
2834
|
if (!SWIG_IsOK(res2)) {
|
2931
2835
|
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","wrap_pn_link_recv", 2, argv[1] ));
|
2932
2836
|
}
|
2933
|
-
buff2= (char *)
|
2837
|
+
buff2= (char *)malloc((n2+1)*sizeof(char));
|
2934
2838
|
arg2 = (char *)(buff2);
|
2935
2839
|
size2 = (size_t)(n2);
|
2936
2840
|
arg3 = &size2;
|
@@ -3009,7 +2913,7 @@ _wrap_pn_transport_output(int argc, VALUE *argv, VALUE self) {
|
|
3009
2913
|
if (!SWIG_IsOK(res2)) {
|
3010
2914
|
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","wrap_pn_transport_output", 2, argv[1] ));
|
3011
2915
|
}
|
3012
|
-
buff2= (char *)
|
2916
|
+
buff2= (char *)malloc((n2+1)*sizeof(char));
|
3013
2917
|
arg2 = (char *)(buff2);
|
3014
2918
|
size2 = (size_t)(n2);
|
3015
2919
|
arg3 = &size2;
|
@@ -3050,7 +2954,7 @@ _wrap_pn_transport_peek(int argc, VALUE *argv, VALUE self) {
|
|
3050
2954
|
if (!SWIG_IsOK(res2)) {
|
3051
2955
|
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","wrap_pn_transport_peek", 2, argv[1] ));
|
3052
2956
|
}
|
3053
|
-
buff2= (char *)
|
2957
|
+
buff2= (char *)malloc((n2+1)*sizeof(char));
|
3054
2958
|
arg2 = (char *)(buff2);
|
3055
2959
|
size2 = (size_t)(n2);
|
3056
2960
|
arg3 = &size2;
|
@@ -3159,7 +3063,7 @@ _wrap_pn_ssl_get_cipher_name(int argc, VALUE *argv, VALUE self) {
|
|
3159
3063
|
if (!SWIG_IsOK(res2)) {
|
3160
3064
|
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t MAX_OUTPUT_SIZE)","pn_ssl_get_cipher_name", 2, argv[1] ));
|
3161
3065
|
}
|
3162
|
-
buff2= (char *)
|
3066
|
+
buff2= (char *)malloc((size2+1)*sizeof(char));
|
3163
3067
|
arg3 = (size_t)(size2);
|
3164
3068
|
arg2 = (char *)(buff2);
|
3165
3069
|
result = (bool)pn_ssl_get_cipher_name(arg1,arg2,arg3);
|
@@ -3198,7 +3102,7 @@ _wrap_pn_ssl_get_protocol_name(int argc, VALUE *argv, VALUE self) {
|
|
3198
3102
|
if (!SWIG_IsOK(res2)) {
|
3199
3103
|
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t MAX_OUTPUT_SIZE)","pn_ssl_get_protocol_name", 2, argv[1] ));
|
3200
3104
|
}
|
3201
|
-
buff2= (char *)
|
3105
|
+
buff2= (char *)malloc((size2+1)*sizeof(char));
|
3202
3106
|
arg3 = (size_t)(size2);
|
3203
3107
|
arg2 = (char *)(buff2);
|
3204
3108
|
result = (bool)pn_ssl_get_protocol_name(arg1,arg2,arg3);
|
@@ -3613,7 +3517,7 @@ _wrap_pn_ssl_get_peer_hostname(int argc, VALUE *argv, VALUE self) {
|
|
3613
3517
|
if (!SWIG_IsOK(res2)) {
|
3614
3518
|
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","pn_ssl_get_peer_hostname", 2, argv[1] ));
|
3615
3519
|
}
|
3616
|
-
buff2= (char *)
|
3520
|
+
buff2= (char *)malloc((n2+1)*sizeof(char));
|
3617
3521
|
arg2 = (char *)(buff2);
|
3618
3522
|
size2 = (size_t)(n2);
|
3619
3523
|
arg3 = &size2;
|
@@ -3743,20 +3647,22 @@ fail:
|
|
3743
3647
|
}
|
3744
3648
|
|
3745
3649
|
|
3746
|
-
SWIGINTERN VALUE
|
3747
3650
|
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
3748
|
-
|
3651
|
+
SWIGINTERN VALUE
|
3652
|
+
_wrap_Pni_rbhandler_t_allocate(VALUE self) {
|
3749
3653
|
#else
|
3750
|
-
|
3654
|
+
SWIGINTERN VALUE
|
3655
|
+
_wrap_Pni_rbhandler_t_allocate(int argc, VALUE *argv, VALUE self) {
|
3751
3656
|
#endif
|
3752
|
-
|
3753
|
-
|
3657
|
+
|
3658
|
+
|
3659
|
+
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Pni_rbhandler_t);
|
3754
3660
|
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
3755
|
-
|
3661
|
+
rb_obj_call_init(vresult, argc, argv);
|
3756
3662
|
#endif
|
3757
|
-
|
3758
|
-
}
|
3759
|
-
|
3663
|
+
return vresult;
|
3664
|
+
}
|
3665
|
+
|
3760
3666
|
|
3761
3667
|
SWIGINTERN VALUE
|
3762
3668
|
_wrap_new_Pni_rbhandler_t(int argc, VALUE *argv, VALUE self) {
|
@@ -3774,8 +3680,7 @@ fail:
|
|
3774
3680
|
|
3775
3681
|
|
3776
3682
|
SWIGINTERN void
|
3777
|
-
free_Pni_rbhandler_t(
|
3778
|
-
Pni_rbhandler_t *arg1 = (Pni_rbhandler_t *)self;
|
3683
|
+
free_Pni_rbhandler_t(Pni_rbhandler_t *arg1) {
|
3779
3684
|
free((char *) arg1);
|
3780
3685
|
}
|
3781
3686
|
|
@@ -4101,7 +4006,7 @@ _wrap_pn_rwbytes(int argc, VALUE *argv, VALUE self) {
|
|
4101
4006
|
}
|
4102
4007
|
arg2 = (char *)(buf2);
|
4103
4008
|
result = pn_rwbytes(arg1,arg2);
|
4104
|
-
vresult = SWIG_NewPointerObj((pn_rwbytes_t *)memcpy((pn_rwbytes_t *)
|
4009
|
+
vresult = SWIG_NewPointerObj((pn_rwbytes_t *)memcpy((pn_rwbytes_t *)malloc(sizeof(pn_rwbytes_t)),&result,sizeof(pn_rwbytes_t)), SWIGTYPE_p_pn_rwbytes_t, SWIG_POINTER_OWN | 0 );
|
4105
4010
|
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
4106
4011
|
return vresult;
|
4107
4012
|
fail:
|
@@ -4432,7 +4337,7 @@ _wrap_pn_class_compare(int argc, VALUE *argv, VALUE self) {
|
|
4432
4337
|
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","pn_class_compare", 3, argv[2] ));
|
4433
4338
|
}
|
4434
4339
|
result = pn_class_compare((struct pn_class_t const *)arg1,arg2,arg3);
|
4435
|
-
vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)
|
4340
|
+
vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)malloc(sizeof(intptr_t)),&result,sizeof(intptr_t)), SWIGTYPE_p_intptr_t, SWIG_POINTER_OWN | 0 );
|
4436
4341
|
return vresult;
|
4437
4342
|
fail:
|
4438
4343
|
return Qnil;
|
@@ -4648,7 +4553,7 @@ _wrap_pn_void_compare(int argc, VALUE *argv, VALUE self) {
|
|
4648
4553
|
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","pn_void_compare", 2, argv[1] ));
|
4649
4554
|
}
|
4650
4555
|
result = pn_void_compare(arg1,arg2);
|
4651
|
-
vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)
|
4556
|
+
vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)malloc(sizeof(intptr_t)),&result,sizeof(intptr_t)), SWIGTYPE_p_intptr_t, SWIG_POINTER_OWN | 0 );
|
4652
4557
|
return vresult;
|
4653
4558
|
fail:
|
4654
4559
|
return Qnil;
|
@@ -4968,7 +4873,7 @@ _wrap_pn_compare(int argc, VALUE *argv, VALUE self) {
|
|
4968
4873
|
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","pn_compare", 2, argv[1] ));
|
4969
4874
|
}
|
4970
4875
|
result = pn_compare(arg1,arg2);
|
4971
|
-
vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)
|
4876
|
+
vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)malloc(sizeof(intptr_t)),&result,sizeof(intptr_t)), SWIGTYPE_p_intptr_t, SWIG_POINTER_OWN | 0 );
|
4972
4877
|
return vresult;
|
4973
4878
|
fail:
|
4974
4879
|
return Qnil;
|
@@ -7769,6 +7674,38 @@ fail:
|
|
7769
7674
|
}
|
7770
7675
|
|
7771
7676
|
|
7677
|
+
SWIGINTERN VALUE
|
7678
|
+
_wrap_pn_connection_set_authorization(int argc, VALUE *argv, VALUE self) {
|
7679
|
+
pn_connection_t *arg1 = (pn_connection_t *) 0 ;
|
7680
|
+
char *arg2 = (char *) 0 ;
|
7681
|
+
void *argp1 = 0 ;
|
7682
|
+
int res1 = 0 ;
|
7683
|
+
int res2 ;
|
7684
|
+
char *buf2 = 0 ;
|
7685
|
+
int alloc2 = 0 ;
|
7686
|
+
|
7687
|
+
if ((argc < 2) || (argc > 2)) {
|
7688
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
7689
|
+
}
|
7690
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_connection_t, 0 | 0 );
|
7691
|
+
if (!SWIG_IsOK(res1)) {
|
7692
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_connection_t *","pn_connection_set_authorization", 1, argv[0] ));
|
7693
|
+
}
|
7694
|
+
arg1 = (pn_connection_t *)(argp1);
|
7695
|
+
res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
|
7696
|
+
if (!SWIG_IsOK(res2)) {
|
7697
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","pn_connection_set_authorization", 2, argv[1] ));
|
7698
|
+
}
|
7699
|
+
arg2 = (char *)(buf2);
|
7700
|
+
pn_connection_set_authorization(arg1,(char const *)arg2);
|
7701
|
+
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
7702
|
+
return Qnil;
|
7703
|
+
fail:
|
7704
|
+
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
7705
|
+
return Qnil;
|
7706
|
+
}
|
7707
|
+
|
7708
|
+
|
7772
7709
|
SWIGINTERN VALUE
|
7773
7710
|
_wrap_pn_connection_get_user(int argc, VALUE *argv, VALUE self) {
|
7774
7711
|
pn_connection_t *arg1 = (pn_connection_t *) 0 ;
|
@@ -7793,6 +7730,30 @@ fail:
|
|
7793
7730
|
}
|
7794
7731
|
|
7795
7732
|
|
7733
|
+
SWIGINTERN VALUE
|
7734
|
+
_wrap_pn_connection_get_authorization(int argc, VALUE *argv, VALUE self) {
|
7735
|
+
pn_connection_t *arg1 = (pn_connection_t *) 0 ;
|
7736
|
+
void *argp1 = 0 ;
|
7737
|
+
int res1 = 0 ;
|
7738
|
+
char *result = 0 ;
|
7739
|
+
VALUE vresult = Qnil;
|
7740
|
+
|
7741
|
+
if ((argc < 1) || (argc > 1)) {
|
7742
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
7743
|
+
}
|
7744
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_connection_t, 0 | 0 );
|
7745
|
+
if (!SWIG_IsOK(res1)) {
|
7746
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_connection_t *","pn_connection_get_authorization", 1, argv[0] ));
|
7747
|
+
}
|
7748
|
+
arg1 = (pn_connection_t *)(argp1);
|
7749
|
+
result = (char *)pn_connection_get_authorization(arg1);
|
7750
|
+
vresult = SWIG_FromCharPtr((const char *)result);
|
7751
|
+
return vresult;
|
7752
|
+
fail:
|
7753
|
+
return Qnil;
|
7754
|
+
}
|
7755
|
+
|
7756
|
+
|
7796
7757
|
SWIGINTERN VALUE
|
7797
7758
|
_wrap_pn_connection_get_hostname(int argc, VALUE *argv, VALUE self) {
|
7798
7759
|
pn_connection_t *arg1 = (pn_connection_t *) 0 ;
|
@@ -13684,7 +13645,7 @@ _wrap_pn_message_get_id(int argc, VALUE *argv, VALUE self) {
|
|
13684
13645
|
pn_message_t *arg1 = (pn_message_t *) 0 ;
|
13685
13646
|
void *argp1 = 0 ;
|
13686
13647
|
int res1 = 0 ;
|
13687
|
-
|
13648
|
+
pn_msgid_t result;
|
13688
13649
|
VALUE vresult = Qnil;
|
13689
13650
|
|
13690
13651
|
if ((argc < 1) || (argc > 1)) {
|
@@ -13766,7 +13727,7 @@ fail:
|
|
13766
13727
|
SWIGINTERN VALUE
|
13767
13728
|
_wrap_pn_message_set_id(int argc, VALUE *argv, VALUE self) {
|
13768
13729
|
pn_message_t *arg1 = (pn_message_t *) 0 ;
|
13769
|
-
|
13730
|
+
pn_msgid_t arg2 ;
|
13770
13731
|
void *argp1 = 0 ;
|
13771
13732
|
int res1 = 0 ;
|
13772
13733
|
int result;
|
@@ -13830,8 +13791,6 @@ _wrap_pn_message_set_id(int argc, VALUE *argv, VALUE self) {
|
|
13830
13791
|
}
|
13831
13792
|
}
|
13832
13793
|
}
|
13833
|
-
SWIG_contract_assert((arg1!=NULL), "Contract violation: require: (arg1!=NULL)");
|
13834
|
-
|
13835
13794
|
result = (int)pn_message_set_id(arg1,arg2);
|
13836
13795
|
vresult = SWIG_From_int((int)(result));
|
13837
13796
|
return vresult;
|
@@ -14125,7 +14084,7 @@ _wrap_pn_message_get_correlation_id(int argc, VALUE *argv, VALUE self) {
|
|
14125
14084
|
pn_message_t *arg1 = (pn_message_t *) 0 ;
|
14126
14085
|
void *argp1 = 0 ;
|
14127
14086
|
int res1 = 0 ;
|
14128
|
-
|
14087
|
+
pn_msgid_t result;
|
14129
14088
|
VALUE vresult = Qnil;
|
14130
14089
|
|
14131
14090
|
if ((argc < 1) || (argc > 1)) {
|
@@ -14207,7 +14166,7 @@ fail:
|
|
14207
14166
|
SWIGINTERN VALUE
|
14208
14167
|
_wrap_pn_message_set_correlation_id(int argc, VALUE *argv, VALUE self) {
|
14209
14168
|
pn_message_t *arg1 = (pn_message_t *) 0 ;
|
14210
|
-
|
14169
|
+
pn_msgid_t arg2 ;
|
14211
14170
|
void *argp1 = 0 ;
|
14212
14171
|
int res1 = 0 ;
|
14213
14172
|
int result;
|
@@ -14271,8 +14230,6 @@ _wrap_pn_message_set_correlation_id(int argc, VALUE *argv, VALUE self) {
|
|
14271
14230
|
}
|
14272
14231
|
}
|
14273
14232
|
}
|
14274
|
-
SWIG_contract_assert((arg1!=NULL), "Contract violation: require: (arg1!=NULL)");
|
14275
|
-
|
14276
14233
|
result = (int)pn_message_set_correlation_id(arg1,arg2);
|
14277
14234
|
vresult = SWIG_From_int((int)(result));
|
14278
14235
|
return vresult;
|
@@ -15081,6 +15038,30 @@ fail:
|
|
15081
15038
|
}
|
15082
15039
|
|
15083
15040
|
|
15041
|
+
SWIGINTERN VALUE
|
15042
|
+
_wrap_pn_sasl_get_authorization(int argc, VALUE *argv, VALUE self) {
|
15043
|
+
pn_sasl_t *arg1 = (pn_sasl_t *) 0 ;
|
15044
|
+
void *argp1 = 0 ;
|
15045
|
+
int res1 = 0 ;
|
15046
|
+
char *result = 0 ;
|
15047
|
+
VALUE vresult = Qnil;
|
15048
|
+
|
15049
|
+
if ((argc < 1) || (argc > 1)) {
|
15050
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
15051
|
+
}
|
15052
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_sasl_t, 0 | 0 );
|
15053
|
+
if (!SWIG_IsOK(res1)) {
|
15054
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_sasl_t *","pn_sasl_get_authorization", 1, argv[0] ));
|
15055
|
+
}
|
15056
|
+
arg1 = (pn_sasl_t *)(argp1);
|
15057
|
+
result = (char *)pn_sasl_get_authorization(arg1);
|
15058
|
+
vresult = SWIG_FromCharPtr((const char *)result);
|
15059
|
+
return vresult;
|
15060
|
+
fail:
|
15061
|
+
return Qnil;
|
15062
|
+
}
|
15063
|
+
|
15064
|
+
|
15084
15065
|
SWIGINTERN VALUE
|
15085
15066
|
_wrap_pn_sasl_get_mech(int argc, VALUE *argv, VALUE self) {
|
15086
15067
|
pn_sasl_t *arg1 = (pn_sasl_t *) 0 ;
|
@@ -18336,7 +18317,7 @@ _wrap_pn_connection_driver_read_buffer(int argc, VALUE *argv, VALUE self) {
|
|
18336
18317
|
}
|
18337
18318
|
arg1 = (pn_connection_driver_t *)(argp1);
|
18338
18319
|
result = pn_connection_driver_read_buffer(arg1);
|
18339
|
-
vresult = SWIG_NewPointerObj((pn_rwbytes_t *)memcpy((pn_rwbytes_t *)
|
18320
|
+
vresult = SWIG_NewPointerObj((pn_rwbytes_t *)memcpy((pn_rwbytes_t *)malloc(sizeof(pn_rwbytes_t)),&result,sizeof(pn_rwbytes_t)), SWIGTYPE_p_pn_rwbytes_t, SWIG_POINTER_OWN | 0 );
|
18340
18321
|
return vresult;
|
18341
18322
|
fail:
|
18342
18323
|
return Qnil;
|
@@ -18451,6 +18432,8 @@ _wrap_pn_connection_driver_write_done(int argc, VALUE *argv, VALUE self) {
|
|
18451
18432
|
int res1 = 0 ;
|
18452
18433
|
size_t val2 ;
|
18453
18434
|
int ecode2 = 0 ;
|
18435
|
+
pn_bytes_t result;
|
18436
|
+
VALUE vresult = Qnil;
|
18454
18437
|
|
18455
18438
|
if ((argc < 2) || (argc > 2)) {
|
18456
18439
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
@@ -18465,8 +18448,11 @@ _wrap_pn_connection_driver_write_done(int argc, VALUE *argv, VALUE self) {
|
|
18465
18448
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","pn_connection_driver_write_done", 2, argv[1] ));
|
18466
18449
|
}
|
18467
18450
|
arg2 = (size_t)(val2);
|
18468
|
-
pn_connection_driver_write_done(arg1,arg2);
|
18469
|
-
|
18451
|
+
result = pn_connection_driver_write_done(arg1,arg2);
|
18452
|
+
{
|
18453
|
+
vresult = rb_str_new((&result)->start, (&result)->size);
|
18454
|
+
}
|
18455
|
+
return vresult;
|
18470
18456
|
fail:
|
18471
18457
|
return Qnil;
|
18472
18458
|
}
|
@@ -19169,7 +19155,7 @@ static swig_type_info _swigt__p_long = {"_p_long", "int32_t *|long *", 0, 0, (vo
|
|
19169
19155
|
static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|long long *|pn_timestamp_t *", 0, 0, (void*)0, 0};
|
19170
19156
|
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
|
19171
19157
|
static swig_type_info _swigt__p_p_pn_connection_driver_t = {"_p_p_pn_connection_driver_t", "struct pn_connection_driver_t **|pn_connection_driver_t **", 0, 0, (void*)0, 0};
|
19172
|
-
static swig_type_info _swigt__p_pn_atom_t = {"_p_pn_atom_t", "pn_atom_t *", 0, 0, (void*)0, 0};
|
19158
|
+
static swig_type_info _swigt__p_pn_atom_t = {"_p_pn_atom_t", "pn_atom_t *|pn_msgid_t *", 0, 0, (void*)0, 0};
|
19173
19159
|
static swig_type_info _swigt__p_pn_bytes_t = {"_p_pn_bytes_t", "struct pn_bytes_t *|pn_bytes_t *", 0, 0, (void*)0, 0};
|
19174
19160
|
static swig_type_info _swigt__p_pn_cid_t = {"_p_pn_cid_t", "enum pn_cid_t *|pn_cid_t *", 0, 0, (void*)0, 0};
|
19175
19161
|
static swig_type_info _swigt__p_pn_class_t = {"_p_pn_class_t", "struct pn_class_t *|pn_class_t *", 0, 0, (void*)0, 0};
|
@@ -19451,18 +19437,18 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
19451
19437
|
|
19452
19438
|
/* -----------------------------------------------------------------------------
|
19453
19439
|
* Type initialization:
|
19454
|
-
* This problem is tough by the requirement that no dynamic
|
19455
|
-
* memory is used. Also, since swig_type_info structures store pointers to
|
19440
|
+
* This problem is tough by the requirement that no dynamic
|
19441
|
+
* memory is used. Also, since swig_type_info structures store pointers to
|
19456
19442
|
* swig_cast_info structures and swig_cast_info structures store pointers back
|
19457
|
-
* to swig_type_info structures, we need some lookup code at initialization.
|
19458
|
-
* The idea is that swig generates all the structures that are needed.
|
19459
|
-
* The runtime then collects these partially filled structures.
|
19460
|
-
* The SWIG_InitializeModule function takes these initial arrays out of
|
19443
|
+
* to swig_type_info structures, we need some lookup code at initialization.
|
19444
|
+
* The idea is that swig generates all the structures that are needed.
|
19445
|
+
* The runtime then collects these partially filled structures.
|
19446
|
+
* The SWIG_InitializeModule function takes these initial arrays out of
|
19461
19447
|
* swig_module, and does all the lookup, filling in the swig_module.types
|
19462
19448
|
* array with the correct data and linking the correct swig_cast_info
|
19463
19449
|
* structures together.
|
19464
19450
|
*
|
19465
|
-
* The generated swig_type_info structures are assigned
|
19451
|
+
* The generated swig_type_info structures are assigned staticly to an initial
|
19466
19452
|
* array. We just loop through that array, and handle each type individually.
|
19467
19453
|
* First we lookup if this type has been already loaded, and if so, use the
|
19468
19454
|
* loaded structure instead of the generated one. Then we have to fill in the
|
@@ -19472,17 +19458,17 @@ static swig_cast_info *swig_cast_initial[] = {
|
|
19472
19458
|
* a column is one of the swig_cast_info structures for that type.
|
19473
19459
|
* The cast_initial array is actually an array of arrays, because each row has
|
19474
19460
|
* a variable number of columns. So to actually build the cast linked list,
|
19475
|
-
* we find the array of casts associated with the type, and loop through it
|
19461
|
+
* we find the array of casts associated with the type, and loop through it
|
19476
19462
|
* adding the casts to the list. The one last trick we need to do is making
|
19477
19463
|
* sure the type pointer in the swig_cast_info struct is correct.
|
19478
19464
|
*
|
19479
|
-
* First off, we lookup the cast->type name to see if it is already loaded.
|
19465
|
+
* First off, we lookup the cast->type name to see if it is already loaded.
|
19480
19466
|
* There are three cases to handle:
|
19481
19467
|
* 1) If the cast->type has already been loaded AND the type we are adding
|
19482
19468
|
* casting info to has not been loaded (it is in this module), THEN we
|
19483
19469
|
* replace the cast->type pointer with the type pointer that has already
|
19484
19470
|
* been loaded.
|
19485
|
-
* 2) If BOTH types (the one we are adding casting info to, and the
|
19471
|
+
* 2) If BOTH types (the one we are adding casting info to, and the
|
19486
19472
|
* cast->type) are loaded, THEN the cast info has already been loaded by
|
19487
19473
|
* the previous module so we just ignore it.
|
19488
19474
|
* 3) Finally, if cast->type has not already been loaded, then we add that
|
@@ -19506,7 +19492,7 @@ SWIGRUNTIME void
|
|
19506
19492
|
SWIG_InitializeModule(void *clientdata) {
|
19507
19493
|
size_t i;
|
19508
19494
|
swig_module_info *module_head, *iter;
|
19509
|
-
int init;
|
19495
|
+
int found, init;
|
19510
19496
|
|
19511
19497
|
/* check to see if the circular list has been setup, if not, set it up */
|
19512
19498
|
if (swig_module.next==0) {
|
@@ -19525,23 +19511,27 @@ SWIG_InitializeModule(void *clientdata) {
|
|
19525
19511
|
/* This is the first module loaded for this interpreter */
|
19526
19512
|
/* so set the swig module into the interpreter */
|
19527
19513
|
SWIG_SetModule(clientdata, &swig_module);
|
19514
|
+
module_head = &swig_module;
|
19528
19515
|
} else {
|
19529
19516
|
/* the interpreter has loaded a SWIG module, but has it loaded this one? */
|
19517
|
+
found=0;
|
19530
19518
|
iter=module_head;
|
19531
19519
|
do {
|
19532
19520
|
if (iter==&swig_module) {
|
19533
|
-
|
19534
|
-
|
19521
|
+
found=1;
|
19522
|
+
break;
|
19535
19523
|
}
|
19536
19524
|
iter=iter->next;
|
19537
19525
|
} while (iter!= module_head);
|
19538
19526
|
|
19539
|
-
/*
|
19527
|
+
/* if the is found in the list, then all is done and we may leave */
|
19528
|
+
if (found) return;
|
19529
|
+
/* otherwise we must add out module into the list */
|
19540
19530
|
swig_module.next = module_head->next;
|
19541
19531
|
module_head->next = &swig_module;
|
19542
19532
|
}
|
19543
19533
|
|
19544
|
-
/* When multiple
|
19534
|
+
/* When multiple interpeters are used, a module could have already been initialized in
|
19545
19535
|
a different interpreter, but not yet have a pointer in this interpreter.
|
19546
19536
|
In this case, we do not want to continue adding types... everything should be
|
19547
19537
|
set up already */
|
@@ -19555,7 +19545,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
19555
19545
|
swig_type_info *type = 0;
|
19556
19546
|
swig_type_info *ret;
|
19557
19547
|
swig_cast_info *cast;
|
19558
|
-
|
19548
|
+
|
19559
19549
|
#ifdef SWIGRUNTIME_DEBUG
|
19560
19550
|
printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
|
19561
19551
|
#endif
|
@@ -19582,7 +19572,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
19582
19572
|
/* Insert casting types */
|
19583
19573
|
cast = swig_module.cast_initial[i];
|
19584
19574
|
while (cast->type) {
|
19585
|
-
|
19575
|
+
|
19586
19576
|
/* Don't need to add information already in the list */
|
19587
19577
|
ret = 0;
|
19588
19578
|
#ifdef SWIGRUNTIME_DEBUG
|
@@ -19750,7 +19740,7 @@ SWIGEXPORT void Init_cproton(void) {
|
|
19750
19740
|
rb_define_module_function(mCproton, "pni_connection_driver", _wrap_pni_connection_driver, -1);
|
19751
19741
|
rb_define_const(mCproton, "PROTON_IMPORT_EXPORT_H", SWIG_From_int((int)(1)));
|
19752
19742
|
rb_define_const(mCproton, "PN_VERSION_MAJOR", SWIG_From_int((int)(0)));
|
19753
|
-
rb_define_const(mCproton, "PN_VERSION_MINOR", SWIG_From_int((int)(
|
19743
|
+
rb_define_const(mCproton, "PN_VERSION_MINOR", SWIG_From_int((int)(36)));
|
19754
19744
|
rb_define_const(mCproton, "PN_VERSION_POINT", SWIG_From_int((int)(0)));
|
19755
19745
|
rb_define_const(mCproton, "PROTON_TYPES_H", SWIG_From_int((int)(1)));
|
19756
19746
|
rb_define_const(mCproton, "PN_MILLIS_MAX", SWIG_From_unsigned_SS_int((unsigned int)((~0U))));
|
@@ -19917,7 +19907,9 @@ SWIGEXPORT void Init_cproton(void) {
|
|
19917
19907
|
rb_define_module_function(mCproton, "pn_connection_set_container", _wrap_pn_connection_set_container, -1);
|
19918
19908
|
rb_define_module_function(mCproton, "pn_connection_set_user", _wrap_pn_connection_set_user, -1);
|
19919
19909
|
rb_define_module_function(mCproton, "pn_connection_set_password", _wrap_pn_connection_set_password, -1);
|
19910
|
+
rb_define_module_function(mCproton, "pn_connection_set_authorization", _wrap_pn_connection_set_authorization, -1);
|
19920
19911
|
rb_define_module_function(mCproton, "pn_connection_get_user", _wrap_pn_connection_get_user, -1);
|
19912
|
+
rb_define_module_function(mCproton, "pn_connection_get_authorization", _wrap_pn_connection_get_authorization, -1);
|
19921
19913
|
rb_define_module_function(mCproton, "pn_connection_get_hostname", _wrap_pn_connection_get_hostname, -1);
|
19922
19914
|
rb_define_module_function(mCproton, "pn_connection_set_hostname", _wrap_pn_connection_set_hostname, -1);
|
19923
19915
|
rb_define_module_function(mCproton, "pn_connection_remote_container", _wrap_pn_connection_remote_container, -1);
|
@@ -20198,6 +20190,7 @@ SWIGEXPORT void Init_cproton(void) {
|
|
20198
20190
|
rb_define_const(mCproton, "PN_RAW_CONNECTION_READ", SWIG_From_int((int)(PN_RAW_CONNECTION_READ)));
|
20199
20191
|
rb_define_const(mCproton, "PN_RAW_CONNECTION_WRITTEN", SWIG_From_int((int)(PN_RAW_CONNECTION_WRITTEN)));
|
20200
20192
|
rb_define_const(mCproton, "PN_RAW_CONNECTION_WAKE", SWIG_From_int((int)(PN_RAW_CONNECTION_WAKE)));
|
20193
|
+
rb_define_const(mCproton, "PN_RAW_CONNECTION_DRAIN_BUFFERS", SWIG_From_int((int)(PN_RAW_CONNECTION_DRAIN_BUFFERS)));
|
20201
20194
|
rb_define_module_function(mCproton, "pn_event_type_name", _wrap_pn_event_type_name, -1);
|
20202
20195
|
rb_define_module_function(mCproton, "pn_collector", _wrap_pn_collector, -1);
|
20203
20196
|
rb_define_module_function(mCproton, "pn_collector_free", _wrap_pn_collector_free, -1);
|
@@ -20287,6 +20280,7 @@ SWIGEXPORT void Init_cproton(void) {
|
|
20287
20280
|
rb_define_module_function(mCproton, "pn_sasl_done", _wrap_pn_sasl_done, -1);
|
20288
20281
|
rb_define_module_function(mCproton, "pn_sasl_outcome", _wrap_pn_sasl_outcome, -1);
|
20289
20282
|
rb_define_module_function(mCproton, "pn_sasl_get_user", _wrap_pn_sasl_get_user, -1);
|
20283
|
+
rb_define_module_function(mCproton, "pn_sasl_get_authorization", _wrap_pn_sasl_get_authorization, -1);
|
20290
20284
|
rb_define_module_function(mCproton, "pn_sasl_get_mech", _wrap_pn_sasl_get_mech, -1);
|
20291
20285
|
rb_define_module_function(mCproton, "pn_sasl_allowed_mechs", _wrap_pn_sasl_allowed_mechs, -1);
|
20292
20286
|
rb_define_module_function(mCproton, "pn_sasl_set_allow_insecure_mechs", _wrap_pn_sasl_set_allow_insecure_mechs, -1);
|