qpid_proton 0.34.0 → 0.35.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 9ac8b96488f863160e534736c193e468534c965ded7eb04085cef605efea58e6
4
- data.tar.gz: 7e0cbc90e431c318f9bceb6d4052c2f7db3da3b5bf929346ab5d12f50161f1ff
2
+ SHA1:
3
+ metadata.gz: 308c4568bcdc95c98ad5d933842ef1f75d789aa9
4
+ data.tar.gz: 23a4ffad7ea320ccbd333ca49638cb0a5d4f7e5c
5
5
  SHA512:
6
- metadata.gz: '08e63bc86504b15270cd9286eb74d6990629533ce7e2b3a63285f58da62dde4ddf18f1488f86cdb2a4f2999f2b73161ca9736f3df679b5d992e7ad4878cdc47d'
7
- data.tar.gz: d95b09e8a5eef4e2eb2dd44979f622635bae45fb3110d37d8e8d62d605fa74460c78e5bb4c8256ddfe7242fa0ffc4643b2a899c3a7fce44cdf30c026bb4617b8
6
+ metadata.gz: 8db2f719bbebaef0b19415a253b1cadd68e6be96580bd65eda0565ccfb13e73a42714bf30670bdc1db71a6a5539f1d0061a7e950c51268efea7a62a6ef3772be
7
+ data.tar.gz: 17935f4526a5a2976ed4761b51502c11346f9de989664aefeda61ebda328ffe59b27826532dc7477c96eaa5ed94befba98856f7c07be4435513a36073e90b8fe
data/examples/ssl_send.rb CHANGED
@@ -32,8 +32,9 @@ class SimpleSend < Qpid::Proton::MessagingHandler
32
32
  end
33
33
 
34
34
  def on_container_start(container)
35
- # Use a default client SSL domain
35
+ # Use anonymous client SSL domain
36
36
  ssl_domain = Qpid::Proton::SSLDomain.new(Qpid::Proton::SSLDomain::MODE_CLIENT)
37
+ ssl_domain.peer_authentication(Qpid::Proton::SSLDomain::ANONYMOUS_PEER)
37
38
  c = container.connect(@url, { :ssl_domain => ssl_domain })
38
39
  c.open_sender(@address)
39
40
  end
@@ -1,18 +1,14 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 4.0.1
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 defined(__GNUC__)
85
- # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
86
- # ifndef GCC_HASCLASSVISIBILITY
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 defined(__GNUC__)
209
- # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
210
- # ifndef GCC_HASCLASSVISIBILITY
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
  */
@@ -307,22 +273,21 @@
307
273
  /* Flags for pointer conversions */
308
274
  #define SWIG_POINTER_DISOWN 0x1
309
275
  #define SWIG_CAST_NEW_MEMORY 0x2
310
- #define SWIG_POINTER_NO_NULL 0x4
311
276
 
312
277
  /* Flags for new pointer objects */
313
278
  #define SWIG_POINTER_OWN 0x1
314
279
 
315
280
 
316
- /*
281
+ /*
317
282
  Flags/methods for returning states.
318
-
319
- The SWIG conversion methods, as ConvertPtr, return an integer
283
+
284
+ The SWIG conversion methods, as ConvertPtr, return an integer
320
285
  that tells if the conversion was successful or not. And if not,
321
286
  an error code can be returned (see swigerrors.swg for the codes).
322
-
287
+
323
288
  Use the following macros/flags to set or process the returning
324
289
  states.
325
-
290
+
326
291
  In old versions of SWIG, code such as the following was usually written:
327
292
 
328
293
  if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
@@ -355,23 +320,23 @@
355
320
  } else {
356
321
  // fail code
357
322
  }
358
-
323
+
359
324
  I.e., now SWIG_ConvertPtr can return new objects and you can
360
325
  identify the case and take care of the deallocation. Of course that
361
326
  also requires SWIG_ConvertPtr to return new result values, such as
362
327
 
363
- int SWIG_ConvertPtr(obj, ptr,...) {
364
- if (<obj is ok>) {
365
- if (<need new object>) {
366
- *ptr = <ptr to new allocated object>;
367
- return SWIG_NEWOBJ;
368
- } else {
369
- *ptr = <ptr to old object>;
370
- return SWIG_OLDOBJ;
371
- }
372
- } else {
373
- return SWIG_BADOBJ;
374
- }
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
+ }
375
340
  }
376
341
 
377
342
  Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
@@ -385,17 +350,17 @@
385
350
  int fooi(int);
386
351
 
387
352
  and you call
388
-
353
+
389
354
  food(1) // cast rank '1' (1 -> 1.0)
390
355
  fooi(1) // cast rank '0'
391
356
 
392
357
  just use the SWIG_AddCast()/SWIG_CheckState()
393
358
  */
394
359
 
395
- #define SWIG_OK (0)
360
+ #define SWIG_OK (0)
396
361
  #define SWIG_ERROR (-1)
397
362
  #define SWIG_IsOK(r) (r >= 0)
398
- #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
363
+ #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
399
364
 
400
365
  /* The CastRankLimit says how many bits are used for the cast rank */
401
366
  #define SWIG_CASTRANKLIMIT (1 << 8)
@@ -426,11 +391,11 @@
426
391
  # endif
427
392
  # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
428
393
  # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
429
- SWIGINTERNINLINE int SWIG_AddCast(int r) {
394
+ SWIGINTERNINLINE int SWIG_AddCast(int r) {
430
395
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
431
396
  }
432
- SWIGINTERNINLINE int SWIG_CheckState(int r) {
433
- 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;
434
399
  }
435
400
  #else /* no cast-rank mode */
436
401
  # define SWIG_AddCast(r) (r)
@@ -477,7 +442,7 @@ typedef struct swig_module_info {
477
442
  void *clientdata; /* Language specific module data */
478
443
  } swig_module_info;
479
444
 
480
- /*
445
+ /*
481
446
  Compare two type names skipping the space characters, therefore
482
447
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
483
448
 
@@ -550,7 +515,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
550
515
  return 0;
551
516
  }
552
517
 
553
- /*
518
+ /*
554
519
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
555
520
  */
556
521
  SWIGRUNTIME swig_cast_info *
@@ -585,7 +550,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
585
550
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
586
551
  }
587
552
 
588
- /*
553
+ /*
589
554
  Dynamic pointer casting. Down an inheritance hierarchy
590
555
  */
591
556
  SWIGRUNTIME swig_type_info *
@@ -629,7 +594,7 @@ SWIG_TypePrettyName(const swig_type_info *type) {
629
594
  return type->name;
630
595
  }
631
596
 
632
- /*
597
+ /*
633
598
  Set the clientdata field for a type
634
599
  */
635
600
  SWIGRUNTIME void
@@ -637,14 +602,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
637
602
  swig_cast_info *cast = ti->cast;
638
603
  /* if (ti->clientdata == clientdata) return; */
639
604
  ti->clientdata = clientdata;
640
-
605
+
641
606
  while (cast) {
642
607
  if (!cast->converter) {
643
608
  swig_type_info *tc = cast->type;
644
609
  if (!tc->clientdata) {
645
610
  SWIG_TypeClientData(tc, clientdata);
646
611
  }
647
- }
612
+ }
648
613
  cast = cast->next;
649
614
  }
650
615
  }
@@ -653,31 +618,31 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
653
618
  SWIG_TypeClientData(ti, clientdata);
654
619
  ti->owndata = 1;
655
620
  }
656
-
621
+
657
622
  /*
658
623
  Search for a swig_type_info structure only by mangled name
659
624
  Search is a O(log #types)
660
-
661
- 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.
662
627
  Note: if start == end at the beginning of the function, we go all the way around
663
628
  the circular list.
664
629
  */
665
630
  SWIGRUNTIME swig_type_info *
666
- SWIG_MangledTypeQueryModule(swig_module_info *start,
667
- swig_module_info *end,
631
+ SWIG_MangledTypeQueryModule(swig_module_info *start,
632
+ swig_module_info *end,
668
633
  const char *name) {
669
634
  swig_module_info *iter = start;
670
635
  do {
671
636
  if (iter->size) {
672
- size_t l = 0;
673
- size_t r = iter->size - 1;
637
+ register size_t l = 0;
638
+ register size_t r = iter->size - 1;
674
639
  do {
675
640
  /* since l+r >= 0, we can (>> 1) instead (/ 2) */
676
- size_t i = (l + r) >> 1;
641
+ register size_t i = (l + r) >> 1;
677
642
  const char *iname = iter->types[i]->name;
678
643
  if (iname) {
679
- int compare = strcmp(name, iname);
680
- if (compare == 0) {
644
+ register int compare = strcmp(name, iname);
645
+ if (compare == 0) {
681
646
  return iter->types[i];
682
647
  } else if (compare < 0) {
683
648
  if (i) {
@@ -702,14 +667,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
702
667
  Search for a swig_type_info structure for either a mangled name or a human readable name.
703
668
  It first searches the mangled names of the types, which is a O(log #types)
704
669
  If a type is not found it then searches the human readable names, which is O(#types).
705
-
706
- 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.
707
672
  Note: if start == end at the beginning of the function, we go all the way around
708
673
  the circular list.
709
674
  */
710
675
  SWIGRUNTIME swig_type_info *
711
- SWIG_TypeQueryModule(swig_module_info *start,
712
- swig_module_info *end,
676
+ SWIG_TypeQueryModule(swig_module_info *start,
677
+ swig_module_info *end,
713
678
  const char *name) {
714
679
  /* STEP 1: Search the name field using binary search */
715
680
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
@@ -720,7 +685,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
720
685
  of the str field (the human readable name) */
721
686
  swig_module_info *iter = start;
722
687
  do {
723
- size_t i = 0;
688
+ register size_t i = 0;
724
689
  for (; i < iter->size; ++i) {
725
690
  if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
726
691
  return iter->types[i];
@@ -728,56 +693,56 @@ SWIG_TypeQueryModule(swig_module_info *start,
728
693
  iter = iter->next;
729
694
  } while (iter != end);
730
695
  }
731
-
696
+
732
697
  /* neither found a match */
733
698
  return 0;
734
699
  }
735
700
 
736
- /*
701
+ /*
737
702
  Pack binary data into a string
738
703
  */
739
704
  SWIGRUNTIME char *
740
705
  SWIG_PackData(char *c, void *ptr, size_t sz) {
741
706
  static const char hex[17] = "0123456789abcdef";
742
- const unsigned char *u = (unsigned char *) ptr;
743
- const unsigned char *eu = u + sz;
707
+ register const unsigned char *u = (unsigned char *) ptr;
708
+ register const unsigned char *eu = u + sz;
744
709
  for (; u != eu; ++u) {
745
- unsigned char uu = *u;
710
+ register unsigned char uu = *u;
746
711
  *(c++) = hex[(uu & 0xf0) >> 4];
747
712
  *(c++) = hex[uu & 0xf];
748
713
  }
749
714
  return c;
750
715
  }
751
716
 
752
- /*
717
+ /*
753
718
  Unpack binary data from a string
754
719
  */
755
720
  SWIGRUNTIME const char *
756
721
  SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
757
- unsigned char *u = (unsigned char *) ptr;
758
- const unsigned char *eu = u + sz;
722
+ register unsigned char *u = (unsigned char *) ptr;
723
+ register const unsigned char *eu = u + sz;
759
724
  for (; u != eu; ++u) {
760
- char d = *(c++);
761
- unsigned char uu;
725
+ register char d = *(c++);
726
+ register unsigned char uu;
762
727
  if ((d >= '0') && (d <= '9'))
763
- uu = (unsigned char)((d - '0') << 4);
728
+ uu = ((d - '0') << 4);
764
729
  else if ((d >= 'a') && (d <= 'f'))
765
- uu = (unsigned char)((d - ('a'-10)) << 4);
766
- else
730
+ uu = ((d - ('a'-10)) << 4);
731
+ else
767
732
  return (char *) 0;
768
733
  d = *(c++);
769
734
  if ((d >= '0') && (d <= '9'))
770
- uu |= (unsigned char)(d - '0');
735
+ uu |= (d - '0');
771
736
  else if ((d >= 'a') && (d <= 'f'))
772
- uu |= (unsigned char)(d - ('a'-10));
773
- else
737
+ uu |= (d - ('a'-10));
738
+ else
774
739
  return (char *) 0;
775
740
  *u = uu;
776
741
  }
777
742
  return c;
778
743
  }
779
744
 
780
- /*
745
+ /*
781
746
  Pack 'void *' into a string buffer.
782
747
  */
783
748
  SWIGRUNTIME char *
@@ -837,18 +802,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
837
802
  #endif
838
803
 
839
804
  /* Errors in SWIG */
840
- #define SWIG_UnknownError -1
841
- #define SWIG_IOError -2
842
- #define SWIG_RuntimeError -3
843
- #define SWIG_IndexError -4
844
- #define SWIG_TypeError -5
845
- #define SWIG_DivisionByZero -6
846
- #define SWIG_OverflowError -7
847
- #define SWIG_SyntaxError -8
848
- #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
849
814
  #define SWIG_SystemError -10
850
815
  #define SWIG_AttributeError -11
851
- #define SWIG_MemoryError -12
816
+ #define SWIG_MemoryError -12
852
817
  #define SWIG_NullReferenceError -13
853
818
 
854
819
 
@@ -946,9 +911,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
946
911
  #ifndef RSTRUCT_PTR
947
912
  # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
948
913
  #endif
949
- #ifndef RTYPEDDATA_P
950
- # define RTYPEDDATA_P(x) (TYPE(x) != T_DATA)
951
- #endif
952
914
 
953
915
 
954
916
 
@@ -965,18 +927,26 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
965
927
  * can be passed as an argument to API functions like Data_Wrap_Struct()
966
928
  * and Data_Make_Struct().
967
929
  */
968
- #if defined(__cplusplus) && !defined(RB_METHOD_DEFINITION_DECL)
969
- # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
970
- # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
971
- # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
972
- # define VOID_ANYARGS_FUNC(f) ((void (*)(ANYARGS))(f))
973
- # define INT_ANYARGS_FUNC(f) ((int (*)(ANYARGS))(f))
930
+
931
+ #ifdef __cplusplus
932
+ # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
933
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
934
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
935
+ # define VOIDFUNC(f) ((void (*)()) f)
936
+ # else
937
+ # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
938
+ # define PROTECTFUNC(f) ((VALUE (*)()) f)
939
+ # define VALUEFUNC(f) ((VALUE (*)()) f)
940
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
941
+ # else /* These definitions should work for Ruby 1.7+ */
942
+ # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
943
+ # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
944
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
945
+ # endif
946
+ # endif
974
947
  #else
975
- # define PROTECTFUNC(f) (f)
976
948
  # define VALUEFUNC(f) (f)
977
949
  # define VOIDFUNC(f) (f)
978
- # define VOID_ANYARGS_FUNC(f) (f)
979
- # define INT_ANYARGS_FUNC(f) (f)
980
950
  #endif
981
951
 
982
952
  /* Don't use for expressions have side effect */
@@ -1164,7 +1134,7 @@ void Ruby_Format_OverloadedError(
1164
1134
  /* -----------------------------------------------------------------------------
1165
1135
  * rubytracking.swg
1166
1136
  *
1167
- * This file contains support for tracking mappings from
1137
+ * This file contains support for tracking mappings from
1168
1138
  * Ruby objects to C++ objects. This functionality is needed
1169
1139
  * to implement mark functions for Ruby's mark and sweep
1170
1140
  * garbage collector.
@@ -1174,11 +1144,6 @@ void Ruby_Format_OverloadedError(
1174
1144
  extern "C" {
1175
1145
  #endif
1176
1146
 
1177
- #if !defined(ST_DATA_T_DEFINED)
1178
- /* Needs to be explicitly included for Ruby 1.8 and earlier */
1179
- #include <st.h>
1180
- #endif
1181
-
1182
1147
  /* Ruby 1.8 actually assumes the first case. */
1183
1148
  #if SIZEOF_VOIDP == SIZEOF_LONG
1184
1149
  # define SWIG2NUM(v) LONG2NUM((unsigned long)v)
@@ -1190,67 +1155,109 @@ extern "C" {
1190
1155
  # error sizeof(void*) is not the same as long or long long
1191
1156
  #endif
1192
1157
 
1193
- /* Global hash table to store Trackings from C/C++
1194
- structs to Ruby Objects.
1195
- */
1196
- static st_table* swig_ruby_trackings = NULL;
1197
1158
 
1198
- static VALUE swig_ruby_trackings_count(ID id, VALUE *var) {
1199
- return SWIG2NUM(swig_ruby_trackings->num_entries);
1200
- }
1159
+ /* Global Ruby hash table to store Trackings from C/C++
1160
+ structs to Ruby Objects.
1161
+ */
1162
+ static VALUE swig_ruby_trackings = Qnil;
1201
1163
 
1164
+ /* Global variable that stores a reference to the ruby
1165
+ hash table delete function. */
1166
+ static ID swig_ruby_hash_delete;
1202
1167
 
1203
- /* Setup a hash table to store Trackings */
1168
+ /* Setup a Ruby hash table to store Trackings */
1204
1169
  SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1205
- /* Create a hash table to store Trackings from C++
1170
+ /* Create a ruby hash table to store Trackings from C++
1206
1171
  objects to Ruby objects. */
1207
1172
 
1208
- /* Try to see if some other .so has already created a
1173
+ /* Try to see if some other .so has already created a
1209
1174
  tracking hash table, which we keep hidden in an instance var
1210
1175
  in the SWIG module.
1211
1176
  This is done to allow multiple DSOs to share the same
1212
1177
  tracking table.
1213
1178
  */
1214
- VALUE trackings_value = Qnil;
1215
- /* change the variable name so that we can mix modules
1216
- compiled with older SWIG's - this used to be called "@__trackings__" */
1217
- ID trackings_id = rb_intern( "@__safetrackings__" );
1179
+ ID trackings_id = rb_intern( "@__trackings__" );
1218
1180
  VALUE verbose = rb_gv_get("VERBOSE");
1219
1181
  rb_gv_set("VERBOSE", Qfalse);
1220
- trackings_value = rb_ivar_get( _mSWIG, trackings_id );
1182
+ swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
1221
1183
  rb_gv_set("VERBOSE", verbose);
1222
1184
 
1223
- /* The trick here is that we have to store the hash table
1224
- pointer in a Ruby variable. We do not want Ruby's GC to
1225
- treat this pointer as a Ruby object, so we convert it to
1226
- a Ruby numeric value. */
1227
- if (trackings_value == Qnil) {
1228
- /* No, it hasn't. Create one ourselves */
1229
- swig_ruby_trackings = st_init_numtable();
1230
- rb_ivar_set( _mSWIG, trackings_id, SWIG2NUM(swig_ruby_trackings) );
1231
- } else {
1232
- swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value);
1233
- }
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
+ }
1234
1191
 
1235
- rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", VALUEFUNC(swig_ruby_trackings_count), VOID_ANYARGS_FUNC((rb_gvar_setter_t*)NULL));
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);
1236
1224
  }
1237
1225
 
1238
1226
  /* Add a Tracking from a C/C++ struct to a Ruby object */
1239
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
+
1240
1241
  /* Store the mapping to the global hash table. */
1241
- st_insert(swig_ruby_trackings, (st_data_t)ptr, object);
1242
+ rb_hash_aset(swig_ruby_trackings, key, value);
1242
1243
  }
1243
1244
 
1244
1245
  /* Get the Ruby object that owns the specified C/C++ struct */
1245
1246
  SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1246
- /* Now lookup the value stored in the global hash table */
1247
- VALUE value;
1247
+ /* Get a reference to the pointer as a Ruby number */
1248
+ VALUE key = SWIG_RubyPtrToReference(ptr);
1248
1249
 
1249
- if (st_lookup(swig_ruby_trackings, (st_data_t)ptr, &value)) {
1250
- return value;
1251
- } else {
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. */
1252
1255
  return Qnil;
1253
1256
  }
1257
+ else {
1258
+ /* Convert this value to Ruby object */
1259
+ return SWIG_RubyReferenceToObject(value);
1260
+ }
1254
1261
  }
1255
1262
 
1256
1263
  /* Remove a Tracking from a C/C++ struct to a Ruby object. It
@@ -1258,37 +1265,25 @@ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1258
1265
  since the same memory address may be reused later to create
1259
1266
  a new object. */
1260
1267
  SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
1261
- /* Delete the object from the hash table */
1262
- st_delete(swig_ruby_trackings, (st_data_t *)&ptr, NULL);
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);
1263
1274
  }
1264
1275
 
1265
1276
  /* This is a helper method that unlinks a Ruby object from its
1266
1277
  underlying C++ object. This is needed if the lifetime of the
1267
- Ruby object is longer than the C++ object. */
1278
+ Ruby object is longer than the C++ object */
1268
1279
  SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1269
1280
  VALUE object = SWIG_RubyInstanceFor(ptr);
1270
1281
 
1271
1282
  if (object != Qnil) {
1272
- // object might have the T_ZOMBIE type, but that's just
1273
- // because the GC has flagged it as such for a deferred
1274
- // destruction. Until then, it's still a T_DATA object.
1275
1283
  DATA_PTR(object) = 0;
1276
1284
  }
1277
1285
  }
1278
1286
 
1279
- /* This is a helper method that iterates over all the trackings
1280
- passing the C++ object pointer and its related Ruby object
1281
- to the passed callback function. */
1282
-
1283
- /* Proxy method to abstract the internal trackings datatype */
1284
- static int swig_ruby_internal_iterate_callback(st_data_t ptr, st_data_t obj, st_data_t meth) {
1285
- ((void (*) (void *, VALUE))meth)((void *)ptr, (VALUE)obj);
1286
- return ST_CONTINUE;
1287
- }
1288
-
1289
- SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) {
1290
- st_foreach(swig_ruby_trackings, INT_ANYARGS_FUNC(swig_ruby_internal_iterate_callback), (st_data_t)meth);
1291
- }
1292
1287
 
1293
1288
  #ifdef __cplusplus
1294
1289
  }
@@ -1347,7 +1342,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1347
1342
  #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1348
1343
  #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
1349
1344
  #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
1350
- #define swig_owntype swig_ruby_owntype
1345
+ #define swig_owntype ruby_owntype
1351
1346
 
1352
1347
  /* for raw packed data */
1353
1348
  #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
@@ -1484,13 +1479,14 @@ SWIG_Ruby_InitRuntime(void)
1484
1479
  SWIGRUNTIME void
1485
1480
  SWIG_Ruby_define_class(swig_type_info *type)
1486
1481
  {
1482
+ VALUE klass;
1487
1483
  char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1488
1484
  sprintf(klass_name, "TYPE%s", type->name);
1489
1485
  if (NIL_P(_cSWIG_Pointer)) {
1490
1486
  _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1491
1487
  rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1492
1488
  }
1493
- rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1489
+ klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1494
1490
  free((void *) klass_name);
1495
1491
  }
1496
1492
 
@@ -1504,11 +1500,10 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1504
1500
  swig_class *sklass;
1505
1501
  VALUE klass;
1506
1502
  VALUE obj;
1507
-
1503
+
1508
1504
  if (!ptr)
1509
1505
  return Qnil;
1510
-
1511
- assert(type);
1506
+
1512
1507
  if (type->clientdata) {
1513
1508
  sklass = (swig_class *) type->clientdata;
1514
1509
 
@@ -1516,7 +1511,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1516
1511
  track = sklass->trackObjects;
1517
1512
  if (track) {
1518
1513
  obj = SWIG_RubyInstanceFor(ptr);
1519
-
1514
+
1520
1515
  /* Check the object's type and make sure it has the correct type.
1521
1516
  It might not in cases where methods do things like
1522
1517
  downcast methods. */
@@ -1548,7 +1543,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1548
1543
  obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1549
1544
  }
1550
1545
  rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1551
-
1546
+
1552
1547
  return obj;
1553
1548
  }
1554
1549
 
@@ -1572,24 +1567,22 @@ SWIG_Ruby_MangleStr(VALUE obj)
1572
1567
  }
1573
1568
 
1574
1569
  /* Acquire a pointer value */
1575
- typedef struct {
1576
- void (*datafree)(void *);
1577
- int own;
1578
- } swig_ruby_owntype;
1579
-
1580
- SWIGRUNTIME swig_ruby_owntype
1581
- SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) {
1582
- swig_ruby_owntype oldown = {0, 0};
1583
- if (TYPE(obj) == T_DATA && !RTYPEDDATA_P(obj)) {
1584
- oldown.datafree = RDATA(obj)->dfree;
1585
- RDATA(obj)->dfree = own.datafree;
1570
+ typedef void (*ruby_owntype)(void*);
1571
+
1572
+ SWIGRUNTIME ruby_owntype
1573
+ SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
1574
+ if (obj) {
1575
+ ruby_owntype oldown = RDATA(obj)->dfree;
1576
+ RDATA(obj)->dfree = own;
1577
+ return oldown;
1578
+ } else {
1579
+ return 0;
1586
1580
  }
1587
- return oldown;
1588
1581
  }
1589
1582
 
1590
1583
  /* Convert a pointer value */
1591
1584
  SWIGRUNTIME int
1592
- SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, swig_ruby_owntype *own)
1585
+ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
1593
1586
  {
1594
1587
  char *c;
1595
1588
  swig_cast_info *tc;
@@ -1597,20 +1590,16 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1597
1590
 
1598
1591
  /* Grab the pointer */
1599
1592
  if (NIL_P(obj)) {
1600
- if (ptr)
1601
- *ptr = 0;
1602
- return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
1593
+ *ptr = 0;
1594
+ return SWIG_OK;
1603
1595
  } else {
1604
- if (TYPE(obj) != T_DATA || (TYPE(obj) == T_DATA && RTYPEDDATA_P(obj))) {
1596
+ if (TYPE(obj) != T_DATA) {
1605
1597
  return SWIG_ERROR;
1606
1598
  }
1607
1599
  Data_Get_Struct(obj, void, vptr);
1608
1600
  }
1609
1601
 
1610
- if (own) {
1611
- own->datafree = RDATA(obj)->dfree;
1612
- own->own = 0;
1613
- }
1602
+ if (own) *own = RDATA(obj)->dfree;
1614
1603
 
1615
1604
  /* Check to see if the input object is giving up ownership
1616
1605
  of the underlying C struct or C++ object. If so then we
@@ -1645,6 +1634,8 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1645
1634
  /* The object has already been deleted */
1646
1635
  return SWIG_ObjectPreviouslyDeletedError;
1647
1636
  }
1637
+ *ptr = vptr;
1638
+ return SWIG_OK;
1648
1639
  }
1649
1640
  }
1650
1641
  if ((c = SWIG_MangleStr(obj)) == NULL) {
@@ -1654,23 +1645,12 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1654
1645
  if (!tc) {
1655
1646
  return SWIG_ERROR;
1656
1647
  } else {
1657
- if (ptr) {
1658
- if (tc->type == ty) {
1659
- *ptr = vptr;
1660
- } else {
1661
- int newmemory = 0;
1662
- *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
1663
- if (newmemory == SWIG_CAST_NEW_MEMORY) {
1664
- assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
1665
- if (own)
1666
- own->own = own->own | SWIG_CAST_NEW_MEMORY;
1667
- }
1668
- }
1669
- }
1648
+ int newmemory = 0;
1649
+ *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
1650
+ assert(!newmemory); /* newmemory handling not yet implemented */
1670
1651
  }
1671
1652
  } else {
1672
- if (ptr)
1673
- *ptr = vptr;
1653
+ *ptr = vptr;
1674
1654
  }
1675
1655
 
1676
1656
  return SWIG_OK;
@@ -1696,7 +1676,7 @@ SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1696
1676
  return rb_str_new2(result);
1697
1677
  }
1698
1678
 
1699
- /* Convert a packed pointer value */
1679
+ /* Convert a packed value value */
1700
1680
  SWIGRUNTIME int
1701
1681
  SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1702
1682
  swig_cast_info *tc;
@@ -1884,7 +1864,7 @@ static VALUE mCproton;
1884
1864
  #define SWIG_RUBY_THREAD_END_BLOCK
1885
1865
 
1886
1866
 
1887
- #define SWIGVERSION 0x040001
1867
+ #define SWIGVERSION 0x020010
1888
1868
  #define SWIG_VERSION SWIGVERSION
1889
1869
 
1890
1870
 
@@ -1913,16 +1893,15 @@ static VALUE mCproton;
1913
1893
 
1914
1894
 
1915
1895
  SWIGINTERN VALUE
1916
- SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
1896
+ SWIG_ruby_failed(void)
1917
1897
  {
1918
1898
  return Qnil;
1919
1899
  }
1920
1900
 
1921
1901
 
1922
- /*@SWIG:/usr/share/swig/4.0.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1923
- SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE arg)
1902
+ /*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1903
+ SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
1924
1904
  {
1925
- VALUE *args = (VALUE *)arg;
1926
1905
  VALUE obj = args[0];
1927
1906
  VALUE type = TYPE(obj);
1928
1907
  unsigned long *res = (unsigned long *)(args[1]);
@@ -1940,79 +1919,21 @@ SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
1940
1919
  VALUE a[2];
1941
1920
  a[0] = obj;
1942
1921
  a[1] = (VALUE)(&v);
1943
- if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
1944
- if (val) *val = v;
1945
- return SWIG_OK;
1946
- }
1947
- }
1948
- return SWIG_TypeError;
1949
- }
1950
-
1951
-
1952
- #include <limits.h>
1953
- #if !defined(SWIG_NO_LLONG_MAX)
1954
- # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1955
- # define LLONG_MAX __LONG_LONG_MAX__
1956
- # define LLONG_MIN (-LLONG_MAX - 1LL)
1957
- # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1958
- # endif
1959
- #endif
1960
-
1961
-
1962
- #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
1963
- # define SWIG_LONG_LONG_AVAILABLE
1964
- #endif
1965
-
1966
-
1967
- #ifdef SWIG_LONG_LONG_AVAILABLE
1968
- /*@SWIG:/usr/share/swig/4.0.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1969
- SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE arg)
1970
- {
1971
- VALUE *args = (VALUE *)arg;
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(VALUEFUNC(SWIG_AUX_NUM2ULL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
1922
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
1990
1923
  if (val) *val = v;
1991
1924
  return SWIG_OK;
1992
1925
  }
1993
1926
  }
1994
1927
  return SWIG_TypeError;
1995
1928
  }
1996
- #endif
1997
1929
 
1998
1930
 
1999
1931
  SWIGINTERNINLINE int
2000
1932
  SWIG_AsVal_size_t (VALUE obj, size_t *val)
2001
1933
  {
2002
- int res = SWIG_TypeError;
2003
- #ifdef SWIG_LONG_LONG_AVAILABLE
2004
- if (sizeof(size_t) <= sizeof(unsigned long)) {
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,10 +2227,9 @@ SWIG_From_bool (bool value)
2296
2227
 
2297
2228
 
2298
2229
 
2299
- /*@SWIG:/usr/share/swig/4.0.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2300
- SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
2230
+ /*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2231
+ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
2301
2232
  {
2302
- VALUE *args = (VALUE *)arg;
2303
2233
  VALUE obj = args[0];
2304
2234
  VALUE type = TYPE(obj);
2305
2235
  long *res = (long *)(args[1]);
@@ -2317,7 +2247,7 @@ SWIG_AsVal_long (VALUE obj, long* val)
2317
2247
  VALUE a[2];
2318
2248
  a[0] = obj;
2319
2249
  a[1] = (VALUE)(&v);
2320
- if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
2250
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2321
2251
  if (val) *val = v;
2322
2252
  return SWIG_OK;
2323
2253
  }
@@ -2530,28 +2460,10 @@ SWIG_From_unsigned_SS_long (unsigned long value)
2530
2460
  }
2531
2461
 
2532
2462
 
2533
- #ifdef SWIG_LONG_LONG_AVAILABLE
2534
- SWIGINTERNINLINE VALUE
2535
- SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
2536
- {
2537
- return ULL2NUM(value);
2538
- }
2539
- #endif
2540
-
2541
-
2542
2463
  SWIGINTERNINLINE VALUE
2543
2464
  SWIG_From_size_t (size_t value)
2544
2465
  {
2545
- #ifdef SWIG_LONG_LONG_AVAILABLE
2546
- if (sizeof(size_t) <= sizeof(unsigned long)) {
2547
- #endif
2548
- return SWIG_From_unsigned_SS_long ((unsigned long)(value));
2549
- #ifdef SWIG_LONG_LONG_AVAILABLE
2550
- } else {
2551
- /* assume sizeof(size_t) <= sizeof(unsigned long long) */
2552
- return SWIG_From_unsigned_SS_long_SS_long ((unsigned long long)(value));
2553
- }
2554
- #endif
2466
+ return SWIG_From_unsigned_SS_long ((unsigned long)(value));
2555
2467
  }
2556
2468
 
2557
2469
 
@@ -2562,64 +2474,30 @@ SWIG_From_unsigned_SS_int (unsigned int value)
2562
2474
  }
2563
2475
 
2564
2476
 
2565
- #include <float.h>
2566
-
2567
-
2568
- #include <math.h>
2477
+ SWIGINTERNINLINE VALUE
2478
+ SWIG_From_long_SS_long (long long value)
2479
+ {
2480
+ return LL2NUM(value);
2481
+ }
2569
2482
 
2570
2483
 
2571
- /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
2572
- #ifndef SWIG_isfinite
2573
- /* isfinite() is a macro for C99 */
2574
- # if defined(isfinite)
2575
- # define SWIG_isfinite(X) (isfinite(X))
2576
- # elif defined(__cplusplus) && __cplusplus >= 201103L
2577
- /* Use a template so that this works whether isfinite() is std::isfinite() or
2578
- * in the global namespace. The reality seems to vary between compiler
2579
- * versions.
2580
- *
2581
- * Make sure namespace std exists to avoid compiler warnings.
2582
- *
2583
- * extern "C++" is required as this fragment can end up inside an extern "C" { } block
2584
- */
2585
- namespace std { }
2586
- extern "C++" template<typename T>
2587
- inline int SWIG_isfinite_func(T x) {
2588
- using namespace std;
2589
- return isfinite(x);
2590
- }
2591
- # define SWIG_isfinite(X) (SWIG_isfinite_func(X))
2592
- # elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
2593
- # define SWIG_isfinite(X) (__builtin_isfinite(X))
2594
- # elif defined(__clang__) && defined(__has_builtin)
2595
- # if __has_builtin(__builtin_isfinite)
2596
- # define SWIG_isfinite(X) (__builtin_isfinite(X))
2597
- # endif
2598
- # elif defined(_MSC_VER)
2599
- # define SWIG_isfinite(X) (_finite(X))
2600
- # elif defined(__sun) && defined(__SVR4)
2601
- # include <ieeefp.h>
2602
- # define SWIG_isfinite(X) (finite(X))
2603
- # endif
2604
- #endif
2484
+ SWIGINTERNINLINE VALUE
2485
+ SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
2486
+ {
2487
+ return ULL2NUM(value);
2488
+ }
2605
2489
 
2606
2490
 
2607
- /* Accept infinite as a valid float value unless we are unable to check if a value is finite */
2608
- #ifdef SWIG_isfinite
2609
- # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
2610
- #else
2611
- # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
2612
- #endif
2491
+ #include <float.h>
2613
2492
 
2614
2493
 
2615
- /*@SWIG:/usr/share/swig/4.0.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2616
- SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE arg)
2494
+ /*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2495
+ SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
2617
2496
  {
2618
- VALUE *args = (VALUE *)arg;
2619
2497
  VALUE obj = args[0];
2620
2498
  VALUE type = TYPE(obj);
2621
2499
  double *res = (double *)(args[1]);
2622
- *res = NUM2DBL(obj); (void)type;
2500
+ *res = NUM2DBL(obj);
2623
2501
  return obj;
2624
2502
  }
2625
2503
  /*@SWIG@*/
@@ -2633,7 +2511,7 @@ SWIG_AsVal_double (VALUE obj, double *val)
2633
2511
  VALUE a[2];
2634
2512
  a[0] = obj;
2635
2513
  a[1] = (VALUE)(&v);
2636
- if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2DBL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
2514
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2DBL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2637
2515
  if (val) *val = v;
2638
2516
  return SWIG_OK;
2639
2517
  }
@@ -2648,7 +2526,7 @@ SWIG_AsVal_float (VALUE obj, float *val)
2648
2526
  double v;
2649
2527
  int res = SWIG_AsVal_double (obj, &v);
2650
2528
  if (SWIG_IsOK(res)) {
2651
- if (SWIG_Float_Overflow_Check(v)) {
2529
+ if ((v < -FLT_MAX || v > FLT_MAX)) {
2652
2530
  return SWIG_OverflowError;
2653
2531
  } else {
2654
2532
  if (val) *val = (float)(v);
@@ -2658,6 +2536,35 @@ SWIG_AsVal_float (VALUE obj, float *val)
2658
2536
  }
2659
2537
 
2660
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
+
2661
2568
  SWIGINTERN int
2662
2569
  SWIG_AsVal_bool (VALUE obj, bool *val)
2663
2570
  {
@@ -2701,11 +2608,9 @@ SWIG_AsVal_unsigned_SS_short (VALUE obj, unsigned short *val)
2701
2608
  }
2702
2609
 
2703
2610
 
2704
- #ifdef SWIG_LONG_LONG_AVAILABLE
2705
- /*@SWIG:/usr/share/swig/4.0.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2706
- SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE arg)
2611
+ /*@SWIG:/usr/share/swig/2.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2612
+ SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE *args)
2707
2613
  {
2708
- VALUE *args = (VALUE *)arg;
2709
2614
  VALUE obj = args[0];
2710
2615
  VALUE type = TYPE(obj);
2711
2616
  long long *res = (long long *)(args[1]);
@@ -2723,23 +2628,13 @@ SWIG_AsVal_long_SS_long (VALUE obj, long long *val)
2723
2628
  VALUE a[2];
2724
2629
  a[0] = obj;
2725
2630
  a[1] = (VALUE)(&v);
2726
- if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
2631
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2727
2632
  if (val) *val = v;
2728
2633
  return SWIG_OK;
2729
2634
  }
2730
2635
  }
2731
2636
  return SWIG_TypeError;
2732
2637
  }
2733
- #endif
2734
-
2735
-
2736
- #ifdef SWIG_LONG_LONG_AVAILABLE
2737
- SWIGINTERNINLINE VALUE
2738
- SWIG_From_long_SS_long (long long value)
2739
- {
2740
- return LL2NUM(value);
2741
- }
2742
- #endif
2743
2638
 
2744
2639
 
2745
2640
  /* assume the binding does the incref in the wrapper */
@@ -2860,7 +2755,7 @@ _wrap_pn_message_encode(int argc, VALUE *argv, VALUE self) {
2860
2755
  if (!SWIG_IsOK(res2)) {
2861
2756
  SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","pn_message_encode", 2, argv[1] ));
2862
2757
  }
2863
- buff2= (char *)calloc(n2+1, sizeof(char));
2758
+ buff2= (char *)malloc((n2+1)*sizeof(char));
2864
2759
  arg2 = (char *)(buff2);
2865
2760
  size2 = (size_t)(n2);
2866
2761
  arg3 = &size2;
@@ -2939,7 +2834,7 @@ _wrap_pn_link_recv(int argc, VALUE *argv, VALUE self) {
2939
2834
  if (!SWIG_IsOK(res2)) {
2940
2835
  SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","wrap_pn_link_recv", 2, argv[1] ));
2941
2836
  }
2942
- buff2= (char *)calloc(n2+1, sizeof(char));
2837
+ buff2= (char *)malloc((n2+1)*sizeof(char));
2943
2838
  arg2 = (char *)(buff2);
2944
2839
  size2 = (size_t)(n2);
2945
2840
  arg3 = &size2;
@@ -3018,7 +2913,7 @@ _wrap_pn_transport_output(int argc, VALUE *argv, VALUE self) {
3018
2913
  if (!SWIG_IsOK(res2)) {
3019
2914
  SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","wrap_pn_transport_output", 2, argv[1] ));
3020
2915
  }
3021
- buff2= (char *)calloc(n2+1, sizeof(char));
2916
+ buff2= (char *)malloc((n2+1)*sizeof(char));
3022
2917
  arg2 = (char *)(buff2);
3023
2918
  size2 = (size_t)(n2);
3024
2919
  arg3 = &size2;
@@ -3059,7 +2954,7 @@ _wrap_pn_transport_peek(int argc, VALUE *argv, VALUE self) {
3059
2954
  if (!SWIG_IsOK(res2)) {
3060
2955
  SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","wrap_pn_transport_peek", 2, argv[1] ));
3061
2956
  }
3062
- buff2= (char *)calloc(n2+1, sizeof(char));
2957
+ buff2= (char *)malloc((n2+1)*sizeof(char));
3063
2958
  arg2 = (char *)(buff2);
3064
2959
  size2 = (size_t)(n2);
3065
2960
  arg3 = &size2;
@@ -3168,7 +3063,7 @@ _wrap_pn_ssl_get_cipher_name(int argc, VALUE *argv, VALUE self) {
3168
3063
  if (!SWIG_IsOK(res2)) {
3169
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] ));
3170
3065
  }
3171
- buff2= (char *)calloc(size2+1, sizeof(char));
3066
+ buff2= (char *)malloc((size2+1)*sizeof(char));
3172
3067
  arg3 = (size_t)(size2);
3173
3068
  arg2 = (char *)(buff2);
3174
3069
  result = (bool)pn_ssl_get_cipher_name(arg1,arg2,arg3);
@@ -3207,7 +3102,7 @@ _wrap_pn_ssl_get_protocol_name(int argc, VALUE *argv, VALUE self) {
3207
3102
  if (!SWIG_IsOK(res2)) {
3208
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] ));
3209
3104
  }
3210
- buff2= (char *)calloc(size2+1, sizeof(char));
3105
+ buff2= (char *)malloc((size2+1)*sizeof(char));
3211
3106
  arg3 = (size_t)(size2);
3212
3107
  arg2 = (char *)(buff2);
3213
3108
  result = (bool)pn_ssl_get_protocol_name(arg1,arg2,arg3);
@@ -3622,7 +3517,7 @@ _wrap_pn_ssl_get_peer_hostname(int argc, VALUE *argv, VALUE self) {
3622
3517
  if (!SWIG_IsOK(res2)) {
3623
3518
  SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "(char *OUTPUT, size_t *OUTPUT_SIZE)","pn_ssl_get_peer_hostname", 2, argv[1] ));
3624
3519
  }
3625
- buff2= (char *)calloc(n2+1, sizeof(char));
3520
+ buff2= (char *)malloc((n2+1)*sizeof(char));
3626
3521
  arg2 = (char *)(buff2);
3627
3522
  size2 = (size_t)(n2);
3628
3523
  arg3 = &size2;
@@ -3752,20 +3647,22 @@ fail:
3752
3647
  }
3753
3648
 
3754
3649
 
3755
- SWIGINTERN VALUE
3756
3650
  #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
3757
- _wrap_Pni_rbhandler_t_allocate(VALUE self)
3651
+ SWIGINTERN VALUE
3652
+ _wrap_Pni_rbhandler_t_allocate(VALUE self) {
3758
3653
  #else
3759
- _wrap_Pni_rbhandler_t_allocate(int argc, VALUE *argv, VALUE self)
3654
+ SWIGINTERN VALUE
3655
+ _wrap_Pni_rbhandler_t_allocate(int argc, VALUE *argv, VALUE self) {
3760
3656
  #endif
3761
- {
3762
- VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Pni_rbhandler_t);
3657
+
3658
+
3659
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Pni_rbhandler_t);
3763
3660
  #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
3764
- rb_obj_call_init(vresult, argc, argv);
3661
+ rb_obj_call_init(vresult, argc, argv);
3765
3662
  #endif
3766
- return vresult;
3767
- }
3768
-
3663
+ return vresult;
3664
+ }
3665
+
3769
3666
 
3770
3667
  SWIGINTERN VALUE
3771
3668
  _wrap_new_Pni_rbhandler_t(int argc, VALUE *argv, VALUE self) {
@@ -3783,8 +3680,7 @@ fail:
3783
3680
 
3784
3681
 
3785
3682
  SWIGINTERN void
3786
- free_Pni_rbhandler_t(void *self) {
3787
- Pni_rbhandler_t *arg1 = (Pni_rbhandler_t *)self;
3683
+ free_Pni_rbhandler_t(Pni_rbhandler_t *arg1) {
3788
3684
  free((char *) arg1);
3789
3685
  }
3790
3686
 
@@ -4110,7 +4006,7 @@ _wrap_pn_rwbytes(int argc, VALUE *argv, VALUE self) {
4110
4006
  }
4111
4007
  arg2 = (char *)(buf2);
4112
4008
  result = pn_rwbytes(arg1,arg2);
4113
- vresult = SWIG_NewPointerObj((pn_rwbytes_t *)memcpy((pn_rwbytes_t *)calloc(1,sizeof(pn_rwbytes_t)),&result,sizeof(pn_rwbytes_t)), SWIGTYPE_p_pn_rwbytes_t, SWIG_POINTER_OWN | 0 );
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 );
4114
4010
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4115
4011
  return vresult;
4116
4012
  fail:
@@ -4441,7 +4337,7 @@ _wrap_pn_class_compare(int argc, VALUE *argv, VALUE self) {
4441
4337
  SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","pn_class_compare", 3, argv[2] ));
4442
4338
  }
4443
4339
  result = pn_class_compare((struct pn_class_t const *)arg1,arg2,arg3);
4444
- vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)calloc(1,sizeof(intptr_t)),&result,sizeof(intptr_t)), SWIGTYPE_p_intptr_t, SWIG_POINTER_OWN | 0 );
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 );
4445
4341
  return vresult;
4446
4342
  fail:
4447
4343
  return Qnil;
@@ -4657,7 +4553,7 @@ _wrap_pn_void_compare(int argc, VALUE *argv, VALUE self) {
4657
4553
  SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","pn_void_compare", 2, argv[1] ));
4658
4554
  }
4659
4555
  result = pn_void_compare(arg1,arg2);
4660
- vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)calloc(1,sizeof(intptr_t)),&result,sizeof(intptr_t)), SWIGTYPE_p_intptr_t, SWIG_POINTER_OWN | 0 );
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 );
4661
4557
  return vresult;
4662
4558
  fail:
4663
4559
  return Qnil;
@@ -4977,7 +4873,7 @@ _wrap_pn_compare(int argc, VALUE *argv, VALUE self) {
4977
4873
  SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","pn_compare", 2, argv[1] ));
4978
4874
  }
4979
4875
  result = pn_compare(arg1,arg2);
4980
- vresult = SWIG_NewPointerObj((intptr_t *)memcpy((intptr_t *)calloc(1,sizeof(intptr_t)),&result,sizeof(intptr_t)), SWIGTYPE_p_intptr_t, SWIG_POINTER_OWN | 0 );
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 );
4981
4877
  return vresult;
4982
4878
  fail:
4983
4879
  return Qnil;
@@ -18425,7 +18321,7 @@ _wrap_pn_connection_driver_read_buffer(int argc, VALUE *argv, VALUE self) {
18425
18321
  }
18426
18322
  arg1 = (pn_connection_driver_t *)(argp1);
18427
18323
  result = pn_connection_driver_read_buffer(arg1);
18428
- vresult = SWIG_NewPointerObj((pn_rwbytes_t *)memcpy((pn_rwbytes_t *)calloc(1,sizeof(pn_rwbytes_t)),&result,sizeof(pn_rwbytes_t)), SWIGTYPE_p_pn_rwbytes_t, SWIG_POINTER_OWN | 0 );
18324
+ 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 );
18429
18325
  return vresult;
18430
18326
  fail:
18431
18327
  return Qnil;
@@ -18540,6 +18436,8 @@ _wrap_pn_connection_driver_write_done(int argc, VALUE *argv, VALUE self) {
18540
18436
  int res1 = 0 ;
18541
18437
  size_t val2 ;
18542
18438
  int ecode2 = 0 ;
18439
+ pn_bytes_t result;
18440
+ VALUE vresult = Qnil;
18543
18441
 
18544
18442
  if ((argc < 2) || (argc > 2)) {
18545
18443
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
@@ -18554,8 +18452,11 @@ _wrap_pn_connection_driver_write_done(int argc, VALUE *argv, VALUE self) {
18554
18452
  SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","pn_connection_driver_write_done", 2, argv[1] ));
18555
18453
  }
18556
18454
  arg2 = (size_t)(val2);
18557
- pn_connection_driver_write_done(arg1,arg2);
18558
- return Qnil;
18455
+ result = pn_connection_driver_write_done(arg1,arg2);
18456
+ {
18457
+ vresult = rb_str_new((&result)->start, (&result)->size);
18458
+ }
18459
+ return vresult;
18559
18460
  fail:
18560
18461
  return Qnil;
18561
18462
  }
@@ -19540,18 +19441,18 @@ static swig_cast_info *swig_cast_initial[] = {
19540
19441
 
19541
19442
  /* -----------------------------------------------------------------------------
19542
19443
  * Type initialization:
19543
- * This problem is tough by the requirement that no dynamic
19544
- * memory is used. Also, since swig_type_info structures store pointers to
19444
+ * This problem is tough by the requirement that no dynamic
19445
+ * memory is used. Also, since swig_type_info structures store pointers to
19545
19446
  * swig_cast_info structures and swig_cast_info structures store pointers back
19546
- * to swig_type_info structures, we need some lookup code at initialization.
19547
- * The idea is that swig generates all the structures that are needed.
19548
- * The runtime then collects these partially filled structures.
19549
- * The SWIG_InitializeModule function takes these initial arrays out of
19447
+ * to swig_type_info structures, we need some lookup code at initialization.
19448
+ * The idea is that swig generates all the structures that are needed.
19449
+ * The runtime then collects these partially filled structures.
19450
+ * The SWIG_InitializeModule function takes these initial arrays out of
19550
19451
  * swig_module, and does all the lookup, filling in the swig_module.types
19551
19452
  * array with the correct data and linking the correct swig_cast_info
19552
19453
  * structures together.
19553
19454
  *
19554
- * The generated swig_type_info structures are assigned statically to an initial
19455
+ * The generated swig_type_info structures are assigned staticly to an initial
19555
19456
  * array. We just loop through that array, and handle each type individually.
19556
19457
  * First we lookup if this type has been already loaded, and if so, use the
19557
19458
  * loaded structure instead of the generated one. Then we have to fill in the
@@ -19561,17 +19462,17 @@ static swig_cast_info *swig_cast_initial[] = {
19561
19462
  * a column is one of the swig_cast_info structures for that type.
19562
19463
  * The cast_initial array is actually an array of arrays, because each row has
19563
19464
  * a variable number of columns. So to actually build the cast linked list,
19564
- * we find the array of casts associated with the type, and loop through it
19465
+ * we find the array of casts associated with the type, and loop through it
19565
19466
  * adding the casts to the list. The one last trick we need to do is making
19566
19467
  * sure the type pointer in the swig_cast_info struct is correct.
19567
19468
  *
19568
- * First off, we lookup the cast->type name to see if it is already loaded.
19469
+ * First off, we lookup the cast->type name to see if it is already loaded.
19569
19470
  * There are three cases to handle:
19570
19471
  * 1) If the cast->type has already been loaded AND the type we are adding
19571
19472
  * casting info to has not been loaded (it is in this module), THEN we
19572
19473
  * replace the cast->type pointer with the type pointer that has already
19573
19474
  * been loaded.
19574
- * 2) If BOTH types (the one we are adding casting info to, and the
19475
+ * 2) If BOTH types (the one we are adding casting info to, and the
19575
19476
  * cast->type) are loaded, THEN the cast info has already been loaded by
19576
19477
  * the previous module so we just ignore it.
19577
19478
  * 3) Finally, if cast->type has not already been loaded, then we add that
@@ -19595,7 +19496,7 @@ SWIGRUNTIME void
19595
19496
  SWIG_InitializeModule(void *clientdata) {
19596
19497
  size_t i;
19597
19498
  swig_module_info *module_head, *iter;
19598
- int init;
19499
+ int found, init;
19599
19500
 
19600
19501
  /* check to see if the circular list has been setup, if not, set it up */
19601
19502
  if (swig_module.next==0) {
@@ -19614,23 +19515,27 @@ SWIG_InitializeModule(void *clientdata) {
19614
19515
  /* This is the first module loaded for this interpreter */
19615
19516
  /* so set the swig module into the interpreter */
19616
19517
  SWIG_SetModule(clientdata, &swig_module);
19518
+ module_head = &swig_module;
19617
19519
  } else {
19618
19520
  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
19521
+ found=0;
19619
19522
  iter=module_head;
19620
19523
  do {
19621
19524
  if (iter==&swig_module) {
19622
- /* Our module is already in the list, so there's nothing more to do. */
19623
- return;
19525
+ found=1;
19526
+ break;
19624
19527
  }
19625
19528
  iter=iter->next;
19626
19529
  } while (iter!= module_head);
19627
19530
 
19628
- /* otherwise we must add our module into the list */
19531
+ /* if the is found in the list, then all is done and we may leave */
19532
+ if (found) return;
19533
+ /* otherwise we must add out module into the list */
19629
19534
  swig_module.next = module_head->next;
19630
19535
  module_head->next = &swig_module;
19631
19536
  }
19632
19537
 
19633
- /* When multiple interpreters are used, a module could have already been initialized in
19538
+ /* When multiple interpeters are used, a module could have already been initialized in
19634
19539
  a different interpreter, but not yet have a pointer in this interpreter.
19635
19540
  In this case, we do not want to continue adding types... everything should be
19636
19541
  set up already */
@@ -19638,15 +19543,15 @@ SWIG_InitializeModule(void *clientdata) {
19638
19543
 
19639
19544
  /* Now work on filling in swig_module.types */
19640
19545
  #ifdef SWIGRUNTIME_DEBUG
19641
- printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
19546
+ printf("SWIG_InitializeModule: size %d\n", swig_module.size);
19642
19547
  #endif
19643
19548
  for (i = 0; i < swig_module.size; ++i) {
19644
19549
  swig_type_info *type = 0;
19645
19550
  swig_type_info *ret;
19646
19551
  swig_cast_info *cast;
19647
-
19552
+
19648
19553
  #ifdef SWIGRUNTIME_DEBUG
19649
- printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
19554
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
19650
19555
  #endif
19651
19556
 
19652
19557
  /* if there is another module already loaded */
@@ -19671,7 +19576,7 @@ SWIG_InitializeModule(void *clientdata) {
19671
19576
  /* Insert casting types */
19672
19577
  cast = swig_module.cast_initial[i];
19673
19578
  while (cast->type) {
19674
-
19579
+
19675
19580
  /* Don't need to add information already in the list */
19676
19581
  ret = 0;
19677
19582
  #ifdef SWIGRUNTIME_DEBUG
@@ -19722,7 +19627,7 @@ SWIG_InitializeModule(void *clientdata) {
19722
19627
  for (i = 0; i < swig_module.size; ++i) {
19723
19628
  int j = 0;
19724
19629
  swig_cast_info *cast = swig_module.cast_initial[i];
19725
- printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
19630
+ printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
19726
19631
  while (cast->type) {
19727
19632
  printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
19728
19633
  cast++;
@@ -19839,7 +19744,7 @@ SWIGEXPORT void Init_cproton(void) {
19839
19744
  rb_define_module_function(mCproton, "pni_connection_driver", _wrap_pni_connection_driver, -1);
19840
19745
  rb_define_const(mCproton, "PROTON_IMPORT_EXPORT_H", SWIG_From_int((int)(1)));
19841
19746
  rb_define_const(mCproton, "PN_VERSION_MAJOR", SWIG_From_int((int)(0)));
19842
- rb_define_const(mCproton, "PN_VERSION_MINOR", SWIG_From_int((int)(34)));
19747
+ rb_define_const(mCproton, "PN_VERSION_MINOR", SWIG_From_int((int)(35)));
19843
19748
  rb_define_const(mCproton, "PN_VERSION_POINT", SWIG_From_int((int)(0)));
19844
19749
  rb_define_const(mCproton, "PROTON_TYPES_H", SWIG_From_int((int)(1)));
19845
19750
  rb_define_const(mCproton, "PN_MILLIS_MAX", SWIG_From_unsigned_SS_int((unsigned int)((~0U))));