ext/cproton/cproton.c in qpid_proton-0.13.0 vs ext/cproton/cproton.c in qpid_proton-0.13.0.1
- old
+ new
@@ -1,17 +1,21 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.40
- *
- * This file is not intended to be easily readable and contains a number of
+ * Version 3.0.10
+ *
+ * This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
- * changes to this file unless you know what you are doing--modify the SWIG
- * interface file instead.
+ * changes to this file unless you know what you are doing--modify the SWIG
+ * interface file instead.
* ----------------------------------------------------------------------------- */
+
+#ifndef SWIGRUBY
#define SWIGRUBY
+#endif
+
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
* ----------------------------------------------------------------------------- */
@@ -39,32 +43,32 @@
/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-# define SWIGUNUSED __attribute__ ((__unused__))
+# define SWIGUNUSED __attribute__ ((__unused__))
# else
# define SWIGUNUSED
# endif
# elif defined(__ICC)
-# define SWIGUNUSED __attribute__ ((__unused__))
+# define SWIGUNUSED __attribute__ ((__unused__))
# else
-# define SWIGUNUSED
+# define SWIGUNUSED
# endif
#endif
#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
-# endif
+# endif
#endif
#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
# define SWIGUNUSEDPARM(p)
# else
-# define SWIGUNUSEDPARM(p) p SWIGUNUSED
+# define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif
/* internal SWIG method */
#ifndef SWIGINTERN
@@ -75,13 +79,15 @@
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif
/* exporting methods */
-#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-# ifndef GCC_HASCLASSVISIBILITY
-# define GCC_HASCLASSVISIBILITY
+#if defined(__GNUC__)
+# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+# ifndef GCC_HASCLASSVISIBILITY
+# define GCC_HASCLASSVISIBILITY
+# endif
# endif
#endif
#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
@@ -103,11 +109,11 @@
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# define SWIGSTDCALL __stdcall
# else
# define SWIGSTDCALL
-# endif
+# endif
#endif
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
@@ -116,11 +122,24 @@
/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif
+/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
+#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
+# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
+#endif
+/* Intel's compiler complains if a variable which was never initialised is
+ * cast to void, which is a common idiom which we use to indicate that we
+ * are aware a variable isn't used. So we just silence that warning.
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
+ */
+#ifdef __INTEL_COMPILER
+# pragma warning disable 592
+#endif
+
/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
* ----------------------------------------------------------------------------- */
@@ -148,32 +167,32 @@
/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-# define SWIGUNUSED __attribute__ ((__unused__))
+# define SWIGUNUSED __attribute__ ((__unused__))
# else
# define SWIGUNUSED
# endif
# elif defined(__ICC)
-# define SWIGUNUSED __attribute__ ((__unused__))
+# define SWIGUNUSED __attribute__ ((__unused__))
# else
-# define SWIGUNUSED
+# define SWIGUNUSED
# endif
#endif
#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
-# endif
+# endif
#endif
#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
# define SWIGUNUSEDPARM(p)
# else
-# define SWIGUNUSEDPARM(p) p SWIGUNUSED
+# define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif
/* internal SWIG method */
#ifndef SWIGINTERN
@@ -184,13 +203,15 @@
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif
/* exporting methods */
-#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-# ifndef GCC_HASCLASSVISIBILITY
-# define GCC_HASCLASSVISIBILITY
+#if defined(__GNUC__)
+# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+# ifndef GCC_HASCLASSVISIBILITY
+# define GCC_HASCLASSVISIBILITY
+# endif
# endif
#endif
#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
@@ -212,11 +233,11 @@
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# define SWIGSTDCALL __stdcall
# else
# define SWIGSTDCALL
-# endif
+# endif
#endif
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
@@ -225,11 +246,24 @@
/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif
+/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
+#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
+# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
+#endif
+/* Intel's compiler complains if a variable which was never initialised is
+ * cast to void, which is a common idiom which we use to indicate that we
+ * are aware a variable isn't used. So we just silence that warning.
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
+ */
+#ifdef __INTEL_COMPILER
+# pragma warning disable 592
+#endif
+
/* -----------------------------------------------------------------------------
* swigrun.swg
*
* This file contains generic C API SWIG runtime support for pointer
* type checking.
@@ -250,11 +284,11 @@
/*
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
creating a static or dynamic library from the SWIG runtime code.
In 99.9% of the cases, SWIG just needs to declare them as 'static'.
-
+
But only do this if strictly necessary, ie, if you have problems
with your compiler or suchlike.
*/
#ifndef SWIGRUNTIME
@@ -276,20 +310,20 @@
/* Flags for new pointer objects */
#define SWIG_POINTER_OWN 0x1
-/*
+/*
Flags/methods for returning states.
-
- The SWIG conversion methods, as ConvertPtr, return and integer
+
+ The SWIG conversion methods, as ConvertPtr, return an integer
that tells if the conversion was successful or not. And if not,
an error code can be returned (see swigerrors.swg for the codes).
-
+
Use the following macros/flags to set or process the returning
states.
-
+
In old versions of SWIG, code such as the following was usually written:
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
// success code
} else {
@@ -318,27 +352,27 @@
...
}
} else {
// fail code
}
-
+
I.e., now SWIG_ConvertPtr can return new objects and you can
identify the case and take care of the deallocation. Of course that
also requires SWIG_ConvertPtr to return new result values, such as
- int SWIG_ConvertPtr(obj, ptr,...) {
- if (<obj is ok>) {
- if (<need new object>) {
- *ptr = <ptr to new allocated object>;
- return SWIG_NEWOBJ;
- } else {
- *ptr = <ptr to old object>;
- return SWIG_OLDOBJ;
- }
- } else {
- return SWIG_BADOBJ;
- }
+ int SWIG_ConvertPtr(obj, ptr,...) {
+ if (<obj is ok>) {
+ if (<need new object>) {
+ *ptr = <ptr to new allocated object>;
+ return SWIG_NEWOBJ;
+ } else {
+ *ptr = <ptr to old object>;
+ return SWIG_OLDOBJ;
+ }
+ } else {
+ return SWIG_BADOBJ;
+ }
}
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
SWIG errors code.
@@ -348,21 +382,21 @@
int food(double)
int fooi(int);
and you call
-
+
food(1) // cast rank '1' (1 -> 1.0)
fooi(1) // cast rank '0'
just use the SWIG_AddCast()/SWIG_CheckState()
*/
-#define SWIG_OK (0)
+#define SWIG_OK (0)
#define SWIG_ERROR (-1)
#define SWIG_IsOK(r) (r >= 0)
-#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
+#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
/* The CastRankLimit says how many bits are used for the cast rank */
#define SWIG_CASTRANKLIMIT (1 << 8)
/* The NewMask denotes the object was created (using new/malloc) */
#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
@@ -389,18 +423,18 @@
# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
# define SWIG_MAXCASTRANK (2)
# endif
# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
-SWIGINTERNINLINE int SWIG_AddCast(int r) {
+SWIGINTERNINLINE int SWIG_AddCast(int r) {
return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
-SWIGINTERNINLINE int SWIG_CheckState(int r) {
- return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
+SWIGINTERNINLINE int SWIG_CheckState(int r) {
+ return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
-# define SWIG_AddCast
+# define SWIG_AddCast(r) (r)
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif
#include <string.h>
@@ -440,11 +474,11 @@
swig_type_info **type_initial; /* Array of initially generated type structures */
swig_cast_info **cast_initial; /* Array of initially generated casting structures */
void *clientdata; /* Language specific module data */
} swig_module_info;
-/*
+/*
Compare two type names skipping the space characters, therefore
"char*" == "char *" and "Class<int>" == "Class<int >", etc.
Return 0 when the two name types are equivalent, as in
strncmp, but skipping ' '.
@@ -460,47 +494,36 @@
return (int)((l1 - f1) - (l2 - f2));
}
/*
Check type equivalence in a name list like <name1>|<name2>|...
- Return 0 if not equal, 1 if equal
+ Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
-SWIG_TypeEquiv(const char *nb, const char *tb) {
- int equiv = 0;
+SWIG_TypeCmp(const char *nb, const char *tb) {
+ int equiv = 1;
const char* te = tb + strlen(tb);
const char* ne = nb;
- while (!equiv && *ne) {
+ while (equiv != 0 && *ne) {
for (nb = ne; *ne; ++ne) {
if (*ne == '|') break;
}
- equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
+ equiv = SWIG_TypeNameComp(nb, ne, tb, te);
if (*ne) ++ne;
}
return equiv;
}
/*
Check type equivalence in a name list like <name1>|<name2>|...
- Return 0 if equal, -1 if nb < tb, 1 if nb > tb
+ Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
-SWIG_TypeCompare(const char *nb, const char *tb) {
- int equiv = 0;
- const char* te = tb + strlen(tb);
- const char* ne = nb;
- while (!equiv && *ne) {
- for (nb = ne; *ne; ++ne) {
- if (*ne == '|') break;
- }
- equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
- if (*ne) ++ne;
- }
- return equiv;
+SWIG_TypeEquiv(const char *nb, const char *tb) {
+ return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}
-
/*
Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
@@ -524,11 +547,11 @@
}
}
return 0;
}
-/*
+/*
Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
if (ty) {
@@ -559,11 +582,11 @@
SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}
-/*
+/*
Dynamic pointer casting. Down an inheritance hierarchy
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
swig_type_info *lastty = ty;
@@ -603,59 +626,59 @@
}
else
return type->name;
}
-/*
+/*
Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
swig_cast_info *cast = ti->cast;
/* if (ti->clientdata == clientdata) return; */
ti->clientdata = clientdata;
-
+
while (cast) {
if (!cast->converter) {
swig_type_info *tc = cast->type;
if (!tc->clientdata) {
SWIG_TypeClientData(tc, clientdata);
}
- }
+ }
cast = cast->next;
}
}
SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
SWIG_TypeClientData(ti, clientdata);
ti->owndata = 1;
}
-
+
/*
Search for a swig_type_info structure only by mangled name
Search is a O(log #types)
-
- We start searching at module start, and finish searching when start == end.
+
+ We start searching at module start, and finish searching when start == end.
Note: if start == end at the beginning of the function, we go all the way around
the circular list.
*/
SWIGRUNTIME swig_type_info *
-SWIG_MangledTypeQueryModule(swig_module_info *start,
- swig_module_info *end,
+SWIG_MangledTypeQueryModule(swig_module_info *start,
+ swig_module_info *end,
const char *name) {
swig_module_info *iter = start;
do {
if (iter->size) {
- register size_t l = 0;
- register size_t r = iter->size - 1;
+ size_t l = 0;
+ size_t r = iter->size - 1;
do {
/* since l+r >= 0, we can (>> 1) instead (/ 2) */
- register size_t i = (l + r) >> 1;
+ size_t i = (l + r) >> 1;
const char *iname = iter->types[i]->name;
if (iname) {
- register int compare = strcmp(name, iname);
- if (compare == 0) {
+ int compare = strcmp(name, iname);
+ if (compare == 0) {
return iter->types[i];
} else if (compare < 0) {
if (i) {
r = i - 1;
} else {
@@ -676,86 +699,86 @@
/*
Search for a swig_type_info structure for either a mangled name or a human readable name.
It first searches the mangled names of the types, which is a O(log #types)
If a type is not found it then searches the human readable names, which is O(#types).
-
- We start searching at module start, and finish searching when start == end.
+
+ We start searching at module start, and finish searching when start == end.
Note: if start == end at the beginning of the function, we go all the way around
the circular list.
*/
SWIGRUNTIME swig_type_info *
-SWIG_TypeQueryModule(swig_module_info *start,
- swig_module_info *end,
+SWIG_TypeQueryModule(swig_module_info *start,
+ swig_module_info *end,
const char *name) {
/* STEP 1: Search the name field using binary search */
swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
if (ret) {
return ret;
} else {
/* STEP 2: If the type hasn't been found, do a complete search
of the str field (the human readable name) */
swig_module_info *iter = start;
do {
- register size_t i = 0;
+ size_t i = 0;
for (; i < iter->size; ++i) {
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
return iter->types[i];
}
iter = iter->next;
} while (iter != end);
}
-
+
/* neither found a match */
return 0;
}
-/*
+/*
Pack binary data into a string
*/
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef";
- register const unsigned char *u = (unsigned char *) ptr;
- register const unsigned char *eu = u + sz;
+ const unsigned char *u = (unsigned char *) ptr;
+ const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
- register unsigned char uu = *u;
+ unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf];
}
return c;
}
-/*
+/*
Unpack binary data from a string
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
- register unsigned char *u = (unsigned char *) ptr;
- register const unsigned char *eu = u + sz;
+ unsigned char *u = (unsigned char *) ptr;
+ const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
- register char d = *(c++);
- register unsigned char uu;
+ char d = *(c++);
+ unsigned char uu;
if ((d >= '0') && (d <= '9'))
- uu = ((d - '0') << 4);
+ uu = (unsigned char)((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f'))
- uu = ((d - ('a'-10)) << 4);
- else
+ uu = (unsigned char)((d - ('a'-10)) << 4);
+ else
return (char *) 0;
d = *(c++);
if ((d >= '0') && (d <= '9'))
- uu |= (d - '0');
+ uu |= (unsigned char)(d - '0');
else if ((d >= 'a') && (d <= 'f'))
- uu |= (d - ('a'-10));
- else
+ uu |= (unsigned char)(d - ('a'-10));
+ else
return (char *) 0;
*u = uu;
}
return c;
}
-/*
+/*
Pack 'void *' into a string buffer.
*/
SWIGRUNTIME char *
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
char *r = buff;
@@ -811,28 +834,37 @@
#ifdef __cplusplus
}
#endif
/* Errors in SWIG */
-#define SWIG_UnknownError -1
-#define SWIG_IOError -2
-#define SWIG_RuntimeError -3
-#define SWIG_IndexError -4
-#define SWIG_TypeError -5
-#define SWIG_DivisionByZero -6
-#define SWIG_OverflowError -7
-#define SWIG_SyntaxError -8
-#define SWIG_ValueError -9
+#define SWIG_UnknownError -1
+#define SWIG_IOError -2
+#define SWIG_RuntimeError -3
+#define SWIG_IndexError -4
+#define SWIG_TypeError -5
+#define SWIG_DivisionByZero -6
+#define SWIG_OverflowError -7
+#define SWIG_SyntaxError -8
+#define SWIG_ValueError -9
#define SWIG_SystemError -10
#define SWIG_AttributeError -11
-#define SWIG_MemoryError -12
+#define SWIG_MemoryError -12
#define SWIG_NullReferenceError -13
#include <ruby.h>
+/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
+ * breaks using rb_intern as an lvalue, as SWIG does. We work around this
+ * issue for now by disabling this.
+ * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
+ */
+#ifdef rb_intern
+# undef rb_intern
+#endif
+
/* Remove global macros defined in Ruby's win32.h */
#ifdef write
# undef write
#endif
#ifdef read
@@ -987,11 +1019,11 @@
#define SWIG_ObjectPreviouslyDeletedError -100
/* Define custom exceptions for errors that do not map to existing Ruby
exceptions. Note this only works for C++ since a global cannot be
- initialized by a funtion in C. For C, fallback to rb_eRuntimeError.*/
+ initialized by a function in C. For C, fallback to rb_eRuntimeError.*/
SWIGINTERN VALUE
getNullReferenceError(void) {
static int init = 0;
static VALUE rb_eNullReferenceError ;
@@ -1132,13 +1164,10 @@
"Possible C/C++ prototypes are:\n%s",
msg, method, prototypes);
}
/* -----------------------------------------------------------------------------
- * See the LICENSE file for information on copyright, usage and redistribution
- * of SWIG, and the README file for authors - http://www.swig.org/release.html.
- *
* rubytracking.swg
*
* This file contains support for tracking mappings from
* Ruby objects to C++ objects. This functionality is needed
* to implement mark functions for Ruby's mark and sweep
@@ -1147,10 +1176,15 @@
#ifdef __cplusplus
extern "C" {
#endif
+#if !defined(ST_DATA_T_DEFINED)
+/* Needs to be explicitly included for Ruby 1.8 and earlier */
+#include <st.h>
+#endif
+
/* Ruby 1.8 actually assumes the first case. */
#if SIZEOF_VOIDP == SIZEOF_LONG
# define SWIG2NUM(v) LONG2NUM((unsigned long)v)
# define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
#elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
@@ -1158,140 +1192,109 @@
# define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
#else
# error sizeof(void*) is not the same as long or long long
#endif
-
-/* Global Ruby hash table to store Trackings from C/C++
+/* Global hash table to store Trackings from C/C++
structs to Ruby Objects.
*/
-static VALUE swig_ruby_trackings = Qnil;
+static st_table* swig_ruby_trackings = NULL;
-/* Global variable that stores a reference to the ruby
- hash table delete function. */
-static ID swig_ruby_hash_delete;
+static VALUE swig_ruby_trackings_count(ANYARGS) {
+ return SWIG2NUM(swig_ruby_trackings->num_entries);
+}
-/* Setup a Ruby hash table to store Trackings */
+
+/* Setup a hash table to store Trackings */
SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
- /* Create a ruby hash table to store Trackings from C++
+ /* Create a hash table to store Trackings from C++
objects to Ruby objects. */
/* Try to see if some other .so has already created a
tracking hash table, which we keep hidden in an instance var
in the SWIG module.
This is done to allow multiple DSOs to share the same
tracking table.
*/
- ID trackings_id = rb_intern( "@__trackings__" );
+ VALUE trackings_value = Qnil;
+ /* change the variable name so that we can mix modules
+ compiled with older SWIG's - this used to be called "@__trackings__" */
+ ID trackings_id = rb_intern( "@__safetrackings__" );
VALUE verbose = rb_gv_get("VERBOSE");
rb_gv_set("VERBOSE", Qfalse);
- swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
+ trackings_value = rb_ivar_get( _mSWIG, trackings_id );
rb_gv_set("VERBOSE", verbose);
- /* No, it hasn't. Create one ourselves */
- if ( swig_ruby_trackings == Qnil )
- {
- swig_ruby_trackings = rb_hash_new();
- rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
- }
+ /* The trick here is that we have to store the hash table
+ pointer in a Ruby variable. We do not want Ruby's GC to
+ treat this pointer as a Ruby object, so we convert it to
+ a Ruby numeric value. */
+ if (trackings_value == Qnil) {
+ /* No, it hasn't. Create one ourselves */
+ swig_ruby_trackings = st_init_numtable();
+ rb_ivar_set( _mSWIG, trackings_id, SWIG2NUM(swig_ruby_trackings) );
+ } else {
+ swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value);
+ }
- /* Now store a reference to the hash table delete function
- so that we only have to look it up once.*/
- swig_ruby_hash_delete = rb_intern("delete");
+ rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", swig_ruby_trackings_count, NULL);
}
-/* Get a Ruby number to reference a pointer */
-SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
- /* We cast the pointer to an unsigned long
- and then store a reference to it using
- a Ruby number object. */
-
- /* Convert the pointer to a Ruby number */
- return SWIG2NUM(ptr);
-}
-
-/* Get a Ruby number to reference an object */
-SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
- /* We cast the object to an unsigned long
- and then store a reference to it using
- a Ruby number object. */
-
- /* Convert the Object to a Ruby number */
- return SWIG2NUM(object);
-}
-
-/* Get a Ruby object from a previously stored reference */
-SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
- /* The provided Ruby number object is a reference
- to the Ruby object we want.*/
-
- /* Convert the Ruby number to a Ruby object */
- return NUM2SWIG(reference);
-}
-
/* Add a Tracking from a C/C++ struct to a Ruby object */
SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
- /* In a Ruby hash table we store the pointer and
- the associated Ruby object. The trick here is
- that we cannot store the Ruby object directly - if
- we do then it cannot be garbage collected. So
- instead we typecast it as a unsigned long and
- convert it to a Ruby number object.*/
-
- /* Get a reference to the pointer as a Ruby number */
- VALUE key = SWIG_RubyPtrToReference(ptr);
-
- /* Get a reference to the Ruby object as a Ruby number */
- VALUE value = SWIG_RubyObjectToReference(object);
-
/* Store the mapping to the global hash table. */
- rb_hash_aset(swig_ruby_trackings, key, value);
+ st_insert(swig_ruby_trackings, (st_data_t)ptr, object);
}
/* Get the Ruby object that owns the specified C/C++ struct */
SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
- /* Get a reference to the pointer as a Ruby number */
- VALUE key = SWIG_RubyPtrToReference(ptr);
-
/* Now lookup the value stored in the global hash table */
- VALUE value = rb_hash_aref(swig_ruby_trackings, key);
-
- if (value == Qnil) {
- /* No object exists - return nil. */
+ VALUE value;
+
+ if (st_lookup(swig_ruby_trackings, (st_data_t)ptr, &value)) {
+ return value;
+ } else {
return Qnil;
}
- else {
- /* Convert this value to Ruby object */
- return SWIG_RubyReferenceToObject(value);
- }
}
/* Remove a Tracking from a C/C++ struct to a Ruby object. It
is very important to remove objects once they are destroyed
since the same memory address may be reused later to create
a new object. */
SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
- /* Get a reference to the pointer as a Ruby number */
- VALUE key = SWIG_RubyPtrToReference(ptr);
-
- /* Delete the object from the hash table by calling Ruby's
- do this we need to call the Hash.delete method.*/
- rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
+ /* Delete the object from the hash table */
+ st_delete(swig_ruby_trackings, (st_data_t *)&ptr, NULL);
}
/* This is a helper method that unlinks a Ruby object from its
underlying C++ object. This is needed if the lifetime of the
Ruby object is longer than the C++ object */
SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
VALUE object = SWIG_RubyInstanceFor(ptr);
if (object != Qnil) {
+ if (TYPE(object) != T_DATA)
+ abort();
DATA_PTR(object) = 0;
}
}
+/* This is a helper method that iterates over all the trackings
+ passing the C++ object pointer and its related Ruby object
+ to the passed callback function. */
+/* Proxy method to abstract the internal trackings datatype */
+static int swig_ruby_internal_iterate_callback(void* ptr, VALUE obj, void(*meth)(void* ptr, VALUE obj)) {
+ (*meth)(ptr, obj);
+ return ST_CONTINUE;
+}
+
+SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) {
+ st_foreach(swig_ruby_trackings, (int (*)(ANYARGS))&swig_ruby_internal_iterate_callback, (st_data_t)meth);
+}
+
#ifdef __cplusplus
}
#endif
/* -----------------------------------------------------------------------------
@@ -1330,13 +1333,10 @@
}
#endif
/* -----------------------------------------------------------------------------
- * See the LICENSE file for information on copyright, usage and redistribution
- * of SWIG, and the README file for authors - http://www.swig.org/release.html.
- *
* rubyrun.swg
*
* This file contains the runtime support for Ruby modules
* and includes code for managing global variables and pointer
* type checking.
@@ -1348,11 +1348,11 @@
/* for raw pointers */
#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
#define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
-#define swig_owntype ruby_owntype
+#define swig_owntype swig_ruby_owntype
/* for raw packed data */
#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
@@ -1369,18 +1369,18 @@
#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type)
/* Runtime API */
-#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule()
+#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
/* Error manipulation */
#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
-#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg)
+#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
#define SWIG_fail goto fail
/* Ruby-specific SWIG API */
@@ -1431,11 +1431,11 @@
# define SWIG_INIT_STACK \
if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
++swig_virtual_calls;
# define SWIG_RELEASE_STACK --swig_virtual_calls;
# define Ruby_DirectorTypeMismatchException(x) \
- rb_raise( rb_eTypeError, x ); return c_result;
+ rb_raise( rb_eTypeError, "%s", x ); return c_result;
static unsigned int swig_virtual_calls = 0;
#else /* normal non-embedded extension */
@@ -1485,18 +1485,17 @@
/* Define Ruby class for C type */
SWIGRUNTIME void
SWIG_Ruby_define_class(swig_type_info *type)
{
- VALUE klass;
char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
sprintf(klass_name, "TYPE%s", type->name);
if (NIL_P(_cSWIG_Pointer)) {
_cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
}
- klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
+ rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
free((void *) klass_name);
}
/* Create a new pointer object */
SWIGRUNTIME VALUE
@@ -1523,11 +1522,11 @@
/* Check the object's type and make sure it has the correct type.
It might not in cases where methods do things like
downcast methods. */
if (obj != Qnil) {
VALUE value = rb_iv_get(obj, "@__swigtype__");
- char* type_name = RSTRING_PTR(value);
+ const char* type_name = RSTRING_PTR(value);
if (strcmp(type->name, type_name) == 0) {
return obj;
}
}
@@ -1573,43 +1572,49 @@
VALUE stype = rb_iv_get(obj, "@__swigtype__");
return StringValuePtr(stype);
}
/* Acquire a pointer value */
-typedef void (*ruby_owntype)(void*);
+typedef struct {
+ void (*datafree)(void *);
+ int own;
+} swig_ruby_owntype;
-SWIGRUNTIME ruby_owntype
-SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
+SWIGRUNTIME swig_ruby_owntype
+SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) {
+ swig_ruby_owntype oldown = {0, 0};
if (obj) {
- ruby_owntype oldown = RDATA(obj)->dfree;
- RDATA(obj)->dfree = own;
- return oldown;
- } else {
- return 0;
+ oldown.datafree = RDATA(obj)->dfree;
+ RDATA(obj)->dfree = own.datafree;
}
+ return oldown;
}
/* Convert a pointer value */
SWIGRUNTIME int
-SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
+SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, swig_ruby_owntype *own)
{
char *c;
swig_cast_info *tc;
void *vptr = 0;
/* Grab the pointer */
if (NIL_P(obj)) {
- *ptr = 0;
+ if (ptr)
+ *ptr = 0;
return SWIG_OK;
} else {
if (TYPE(obj) != T_DATA) {
return SWIG_ERROR;
}
Data_Get_Struct(obj, void, vptr);
}
- if (own) *own = RDATA(obj)->dfree;
+ if (own) {
+ own->datafree = RDATA(obj)->dfree;
+ own->own = 0;
+ }
/* Check to see if the input object is giving up ownership
of the underlying C struct or C++ object. If so then we
need to reset the destructor since the Ruby object no
longer owns the underlying C++ object.*/
@@ -1640,27 +1645,36 @@
if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
if (vptr == 0) {
/* The object has already been deleted */
return SWIG_ObjectPreviouslyDeletedError;
}
- *ptr = vptr;
- return SWIG_OK;
}
}
if ((c = SWIG_MangleStr(obj)) == NULL) {
return SWIG_ERROR;
}
tc = SWIG_TypeCheck(c, ty);
if (!tc) {
return SWIG_ERROR;
} else {
- int newmemory = 0;
- *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
- assert(!newmemory); /* newmemory handling not yet implemented */
+ if (ptr) {
+ if (tc->type == ty) {
+ *ptr = vptr;
+ } else {
+ int newmemory = 0;
+ *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
+ if (newmemory == SWIG_CAST_NEW_MEMORY) {
+ assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
+ if (own)
+ own->own = own->own | SWIG_CAST_NEW_MEMORY;
+ }
+ }
+ }
}
} else {
- *ptr = vptr;
+ if (ptr)
+ *ptr = vptr;
}
return SWIG_OK;
}
@@ -1705,11 +1719,11 @@
type_error:
return SWIG_ERROR;
}
SWIGRUNTIME swig_module_info *
-SWIG_Ruby_GetModule(void)
+SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata))
{
VALUE pointer;
swig_module_info *ret = 0;
VALUE verbose = rb_gv_get("VERBOSE");
@@ -1745,11 +1759,11 @@
}
*/
SWIGINTERN
int SWIG_Ruby_isCallable( VALUE proc )
{
- if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
+ if ( rb_respond_to( proc, swig_call_id ) )
return 1;
return 0;
}
/* This function can be used to check the arity (number of arguments)
@@ -1758,11 +1772,11 @@
which indicate a variable number of parameters at the end.
*/
SWIGINTERN
int SWIG_Ruby_arity( VALUE proc, int minimal )
{
- if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
+ if ( rb_respond_to( proc, swig_arity_id ) )
{
VALUE num = rb_funcall( proc, swig_arity_id, 0 );
int arity = NUM2INT(num);
if ( arity < 0 && (arity+1) < -minimal ) return 1;
if ( arity == minimal ) return 1;
@@ -1875,11 +1889,11 @@
#define SWIG_RUBY_THREAD_BEGIN_BLOCK
#define SWIG_RUBY_THREAD_END_BLOCK
-#define SWIGVERSION 0x010340
+#define SWIGVERSION 0x030010
#define SWIG_VERSION SWIGVERSION
#define SWIG_as_voidptr(a) (void *)((const void *)(a))
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
@@ -1907,11 +1921,11 @@
{
return Qnil;
}
-/*@SWIG:/usr/share/swig/1.3.40/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
+/*@SWIG:/usr/share/swig/3.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
{
VALUE obj = args[0];
VALUE type = TYPE(obj);
unsigned long *res = (unsigned long *)(args[1]);
@@ -1936,16 +1950,73 @@
}
return SWIG_TypeError;
}
+#include <limits.h>
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+# define LLONG_MAX __LONG_LONG_MAX__
+# define LLONG_MIN (-LLONG_MAX - 1LL)
+# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
+#endif
+
+
+#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
+# define SWIG_LONG_LONG_AVAILABLE
+#endif
+
+
+#ifdef SWIG_LONG_LONG_AVAILABLE
+/*@SWIG:/usr/share/swig/3.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
+SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE *args)
+{
+ VALUE obj = args[0];
+ VALUE type = TYPE(obj);
+ long long *res = (long long *)(args[1]);
+ *res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj);
+ return obj;
+}
+/*@SWIG@*/
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val)
+{
+ VALUE type = TYPE(obj);
+ if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
+ unsigned long long v;
+ VALUE a[2];
+ a[0] = obj;
+ a[1] = (VALUE)(&v);
+ if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
+ if (val) *val = v;
+ return SWIG_OK;
+ }
+ }
+ return SWIG_TypeError;
+}
+#endif
+
+
SWIGINTERNINLINE int
SWIG_AsVal_size_t (VALUE obj, size_t *val)
{
- unsigned long v;
- int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
- if (SWIG_IsOK(res) && val) *val = (size_t)(v);
+ int res = SWIG_TypeError;
+#ifdef SWIG_LONG_LONG_AVAILABLE
+ if (sizeof(size_t) <= sizeof(unsigned long)) {
+#endif
+ unsigned long v;
+ res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
+ if (SWIG_IsOK(res) && val) *val = (size_t)(v);
+#ifdef SWIG_LONG_LONG_AVAILABLE
+ } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
+ unsigned long long v;
+ res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
+ if (SWIG_IsOK(res) && val) *val = (size_t)(v);
+ }
+#endif
return res;
}
SWIGINTERN swig_type_info*
@@ -1963,15 +2034,11 @@
SWIGINTERN int
SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
{
if (TYPE(obj) == T_STRING) {
- #if defined(StringValuePtr)
char *cstr = StringValuePtr(obj);
- #else
- char *cstr = STR2CSTR(obj);
- #endif
size_t size = RSTRING_LEN(obj) + 1;
if (cptr) {
if (alloc) {
if (*alloc == SWIG_NEWOBJ) {
*cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
@@ -2017,20 +2084,10 @@
return Qnil;
}
}
-#include <limits.h>
-#if !defined(SWIG_NO_LLONG_MAX)
-# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
-# define LLONG_MAX __LONG_LONG_MAX__
-# define LLONG_MIN (-LLONG_MAX - 1LL)
-# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
-# endif
-#endif
-
-
#define SWIG_From_long LONG2NUM
SWIGINTERNINLINE VALUE
SWIG_From_int (int value)
@@ -2238,11 +2295,11 @@
return result;
}
-/*@SWIG:/usr/share/swig/1.3.40/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
+/*@SWIG:/usr/share/swig/3.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
{
VALUE obj = args[0];
VALUE type = TYPE(obj);
long *res = (long *)(args[1]);
@@ -2442,27 +2499,81 @@
{
return SWIG_From_unsigned_SS_long (value);
}
+#ifdef SWIG_LONG_LONG_AVAILABLE
+SWIGINTERNINLINE VALUE
+SWIG_From_long_SS_long (long long value)
+{
+ return LL2NUM(value);
+}
+#endif
+
+
+#ifdef SWIG_LONG_LONG_AVAILABLE
+SWIGINTERNINLINE VALUE
+SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
+{
+ return ULL2NUM(value);
+}
+#endif
+
+
SWIGINTERNINLINE VALUE
SWIG_From_size_t (size_t value)
{
- return SWIG_From_unsigned_SS_long ((unsigned long)(value));
+#ifdef SWIG_LONG_LONG_AVAILABLE
+ if (sizeof(size_t) <= sizeof(unsigned long)) {
+#endif
+ return SWIG_From_unsigned_SS_long ((unsigned long)(value));
+#ifdef SWIG_LONG_LONG_AVAILABLE
+ } else {
+ /* assume sizeof(size_t) <= sizeof(unsigned long long) */
+ return SWIG_From_unsigned_SS_long_SS_long ((unsigned long long)(value));
+ }
+#endif
}
#include <float.h>
-/*@SWIG:/usr/share/swig/1.3.40/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
+#include <math.h>
+
+
+/* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
+#ifndef SWIG_isfinite
+/* isfinite() is a macro for C99, but a function in namespace std for C++11. */
+# if defined(isfinite)
+# define SWIG_isfinite(X) (isfinite(X))
+# elif defined __cplusplus && __cplusplus >= 201103L
+# define SWIG_isfinite(X) (std::isfinite(X))
+# elif defined(_MSC_VER)
+# define SWIG_isfinite(X) (_finite(X))
+# elif defined(__sun) && defined(__SVR4)
+# include <ieeefp.h>
+# define SWIG_isfinite(X) (finite(X))
+# endif
+#endif
+
+
+/* Accept infinite as a valid float value unless we are unable to check if a value is finite */
+#ifdef SWIG_isfinite
+# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
+#else
+# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
+#endif
+
+
+/*@SWIG:/usr/share/swig/3.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
{
VALUE obj = args[0];
VALUE type = TYPE(obj);
double *res = (double *)(args[1]);
- *res = NUM2DBL(obj);
+ *res = NUM2DBL(obj); (void)type;
return obj;
}
/*@SWIG@*/
SWIGINTERN int
@@ -2487,11 +2598,11 @@
SWIG_AsVal_float (VALUE obj, float *val)
{
double v;
int res = SWIG_AsVal_double (obj, &v);
if (SWIG_IsOK(res)) {
- if ((v < -FLT_MAX || v > FLT_MAX)) {
+ if (SWIG_Float_Overflow_Check(v)) {
return SWIG_OverflowError;
} else {
if (val) *val = (float)(v);
}
}
@@ -2517,53 +2628,10 @@
}
return SWIG_TypeError;
}
-SWIGINTERNINLINE VALUE
-SWIG_From_long_SS_long (long long value)
-{
- return LL2NUM(value);
-}
-
-
-SWIGINTERNINLINE VALUE
-SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
-{
- return ULL2NUM(value);
-}
-
-
-/*@SWIG:/usr/share/swig/1.3.40/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
-SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE *args)
-{
- VALUE obj = args[0];
- VALUE type = TYPE(obj);
- long long *res = (long long *)(args[1]);
- *res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj);
- return obj;
-}
-/*@SWIG@*/
-
-SWIGINTERN int
-SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val)
-{
- VALUE type = TYPE(obj);
- if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
- unsigned long long v;
- VALUE a[2];
- a[0] = obj;
- a[1] = (VALUE)(&v);
- if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
- if (val) *val = v;
- return SWIG_OK;
- }
- }
- return SWIG_TypeError;
-}
-
-
SWIGINTERNINLINE VALUE
SWIG_From_unsigned_SS_short (unsigned short value)
{
return SWIG_From_unsigned_SS_long (value);
}
@@ -2583,11 +2651,12 @@
}
return res;
}
-/*@SWIG:/usr/share/swig/1.3.40/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
+#ifdef SWIG_LONG_LONG_AVAILABLE
+/*@SWIG:/usr/share/swig/3.0.10/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIGINTERN VALUE SWIG_AUX_NUM2LL(VALUE *args)
{
VALUE obj = args[0];
VALUE type = TYPE(obj);
long long *res = (long long *)(args[1]);
@@ -2610,10 +2679,11 @@
return SWIG_OK;
}
}
return SWIG_TypeError;
}
+#endif
/* assume the binding does the incref in the wrapper */
pn_event_t* pn_event_copy(pn_event_t *evt) { return evt; }
@@ -3573,11 +3643,11 @@
fail:
return Qnil;
}
-swig_class SwigClassPni_rbhandler_t;
+static swig_class SwigClassPni_rbhandler_t;
SWIGINTERN VALUE
_wrap_Pni_rbhandler_t_handler_key_set(int argc, VALUE *argv, VALUE self) {
Pni_rbhandler_t *arg1 = (Pni_rbhandler_t *) 0 ;
VALUE arg2 = (VALUE) 0 ;
@@ -3622,27 +3692,25 @@
fail:
return Qnil;
}
-#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
SWIGINTERN VALUE
-_wrap_Pni_rbhandler_t_allocate(VALUE self) {
+#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
+_wrap_Pni_rbhandler_t_allocate(VALUE self)
#else
- SWIGINTERN VALUE
- _wrap_Pni_rbhandler_t_allocate(int argc, VALUE *argv, VALUE self) {
+_wrap_Pni_rbhandler_t_allocate(int argc, VALUE *argv, VALUE self)
#endif
-
-
- VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Pni_rbhandler_t);
+{
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_Pni_rbhandler_t);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
- rb_obj_call_init(vresult, argc, argv);
+ rb_obj_call_init(vresult, argc, argv);
#endif
- return vresult;
- }
-
+ return vresult;
+}
+
SWIGINTERN VALUE
_wrap_new_Pni_rbhandler_t(int argc, VALUE *argv, VALUE self) {
Pni_rbhandler_t *result = 0 ;
if ((argc < 0) || (argc > 0)) {
@@ -3655,11 +3723,12 @@
return Qnil;
}
SWIGINTERN void
-free_Pni_rbhandler_t(Pni_rbhandler_t *arg1) {
+free_Pni_rbhandler_t(void *self) {
+ Pni_rbhandler_t *arg1 = (Pni_rbhandler_t *)self;
free((char *) arg1);
}
SWIGINTERN VALUE
_wrap_pni_rbhandler(int argc, VALUE *argv, VALUE self) {
@@ -3760,10 +3829,26 @@
return Qnil;
}
SWIGINTERN VALUE
+_wrap_pn_timestamp_now(int argc, VALUE *argv, VALUE self) {
+ pn_timestamp_t result;
+ VALUE vresult = Qnil;
+
+ if ((argc < 0) || (argc > 0)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
+ }
+ result = (pn_timestamp_t)pn_timestamp_now();
+ vresult = SWIG_From_long_SS_long((long long)(result));
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
_wrap_pn_bytes(int argc, VALUE *argv, VALUE self) {
size_t arg1 ;
char *arg2 = (char *) 0 ;
size_t val1 ;
int ecode1 = 0 ;
@@ -5185,11 +5270,11 @@
SWIGINTERN VALUE
_wrap_pn_map_next(int argc, VALUE *argv, VALUE self) {
pn_map_t *arg1 = (pn_map_t *) 0 ;
- pn_handle_t arg2 ;
+ pn_handle_t arg2 = (pn_handle_t) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned long val2 ;
int ecode2 = 0 ;
pn_handle_t result;
@@ -5217,11 +5302,11 @@
SWIGINTERN VALUE
_wrap_pn_map_key(int argc, VALUE *argv, VALUE self) {
pn_map_t *arg1 = (pn_map_t *) 0 ;
- pn_handle_t arg2 ;
+ pn_handle_t arg2 = (pn_handle_t) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned long val2 ;
int ecode2 = 0 ;
void *result = 0 ;
@@ -5249,11 +5334,11 @@
SWIGINTERN VALUE
_wrap_pn_map_value(int argc, VALUE *argv, VALUE self) {
pn_map_t *arg1 = (pn_map_t *) 0 ;
- pn_handle_t arg2 ;
+ pn_handle_t arg2 = (pn_handle_t) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned long val2 ;
int ecode2 = 0 ;
void *result = 0 ;
@@ -5468,11 +5553,11 @@
SWIGINTERN VALUE
_wrap_pn_hash_next(int argc, VALUE *argv, VALUE self) {
pn_hash_t *arg1 = (pn_hash_t *) 0 ;
- pn_handle_t arg2 ;
+ pn_handle_t arg2 = (pn_handle_t) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned long val2 ;
int ecode2 = 0 ;
pn_handle_t result;
@@ -5500,11 +5585,11 @@
SWIGINTERN VALUE
_wrap_pn_hash_key(int argc, VALUE *argv, VALUE self) {
pn_hash_t *arg1 = (pn_hash_t *) 0 ;
- pn_handle_t arg2 ;
+ pn_handle_t arg2 = (pn_handle_t) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned long val2 ;
int ecode2 = 0 ;
uintptr_t result;
@@ -5532,11 +5617,11 @@
SWIGINTERN VALUE
_wrap_pn_hash_value(int argc, VALUE *argv, VALUE self) {
pn_hash_t *arg1 = (pn_hash_t *) 0 ;
- pn_handle_t arg2 ;
+ pn_handle_t arg2 = (pn_handle_t) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned long val2 ;
int ecode2 = 0 ;
void *result = 0 ;
@@ -6119,11 +6204,11 @@
SWIGINTERN VALUE
_wrap_pn_record_def(int argc, VALUE *argv, VALUE self) {
pn_record_t *arg1 = (pn_record_t *) 0 ;
- pn_handle_t arg2 ;
+ pn_handle_t arg2 = (pn_handle_t) 0 ;
pn_class_t *arg3 = (pn_class_t *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned long val2 ;
int ecode2 = 0 ;
@@ -6156,11 +6241,11 @@
SWIGINTERN VALUE
_wrap_pn_record_has(int argc, VALUE *argv, VALUE self) {
pn_record_t *arg1 = (pn_record_t *) 0 ;
- pn_handle_t arg2 ;
+ pn_handle_t arg2 = (pn_handle_t) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned long val2 ;
int ecode2 = 0 ;
bool result;
@@ -6188,11 +6273,11 @@
SWIGINTERN VALUE
_wrap_pn_record_get(int argc, VALUE *argv, VALUE self) {
pn_record_t *arg1 = (pn_record_t *) 0 ;
- pn_handle_t arg2 ;
+ pn_handle_t arg2 = (pn_handle_t) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned long val2 ;
int ecode2 = 0 ;
void *result = 0 ;
@@ -6220,11 +6305,11 @@
SWIGINTERN VALUE
_wrap_pn_record_set(int argc, VALUE *argv, VALUE self) {
pn_record_t *arg1 = (pn_record_t *) 0 ;
- pn_handle_t arg2 ;
+ pn_handle_t arg2 = (pn_handle_t) 0 ;
void *arg3 = (void *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned long val2 ;
int ecode2 = 0 ;
@@ -9804,10 +9889,47 @@
return Qnil;
}
SWIGINTERN VALUE
+_wrap_pn_dtag(int argc, VALUE *argv, VALUE self) {
+ char *arg1 = (char *) 0 ;
+ size_t arg2 ;
+ int res1 ;
+ char *buf1 = 0 ;
+ int alloc1 = 0 ;
+ size_t val2 ;
+ int ecode2 = 0 ;
+ pn_delivery_tag_t result;
+ VALUE vresult = Qnil;
+
+ if ((argc < 2) || (argc > 2)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+ }
+ res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","pn_dtag", 1, argv[0] ));
+ }
+ arg1 = (char *)(buf1);
+ ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","pn_dtag", 2, argv[1] ));
+ }
+ arg2 = (size_t)(val2);
+ result = pn_dtag((char const *)arg1,arg2);
+ {
+ vresult = rb_str_new((&result)->start, (&result)->size);
+ }
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+ return vresult;
+fail:
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
_wrap_pn_delivery_get_context(int argc, VALUE *argv, VALUE self) {
pn_delivery_t *arg1 = (pn_delivery_t *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *result = 0 ;
@@ -13938,11 +14060,11 @@
ecode3 = SWIG_AsVal_size_t(argv[2], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","pn_message_decode", 3, argv[2] ));
}
arg3 = (size_t)(val3);
- SWIG_contract_assert((arg1!=NULL)&&(arg3>=0), "Contract violation: require: (arg1!=NULL)&&(arg3>=0)");
+ SWIG_contract_assert((arg1!=NULL), "Contract violation: require: (arg1!=NULL)");
result = (int)pn_message_decode(arg1,(char const *)arg2,arg3);
vresult = SWIG_From_int((int)(result));
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
return vresult;
@@ -14298,12 +14420,10 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","pn_messenger", 1, argv[0] ));
}
arg1 = (char *)(buf1);
result = (pn_messenger_t *)pn_messenger((char const *)arg1);
- SWIG_contract_assert((pn_message!=NULL), "Contract violation: ensure: (pn_message!=NULL)");
-
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_messenger_t, 0 | 0 );
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
return vresult;
fail:
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
@@ -20008,11 +20128,11 @@
SWIGINTERN VALUE
_wrap_pn_data_restore(int argc, VALUE *argv, VALUE self) {
pn_data_t *arg1 = (pn_data_t *) 0 ;
- pn_handle_t arg2 ;
+ pn_handle_t arg2 = (pn_handle_t) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned long val2 ;
int ecode2 = 0 ;
bool result;
@@ -21341,10 +21461,64 @@
return Qnil;
}
SWIGINTERN VALUE
+_wrap_pn_reactor_connection_to_host(int argc, VALUE *argv, VALUE self) {
+ pn_reactor_t *arg1 = (pn_reactor_t *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ pn_handler_t *arg4 = (pn_handler_t *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ void *argp4 = 0 ;
+ int res4 = 0 ;
+ pn_connection_t *result = 0 ;
+ VALUE vresult = Qnil;
+
+ if ((argc < 4) || (argc > 4)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_reactor_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_reactor_t *","pn_reactor_connection_to_host", 1, argv[0] ));
+ }
+ arg1 = (pn_reactor_t *)(argp1);
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","pn_reactor_connection_to_host", 2, argv[1] ));
+ }
+ arg2 = (char *)(buf2);
+ res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","pn_reactor_connection_to_host", 3, argv[2] ));
+ }
+ arg3 = (char *)(buf3);
+ res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_pn_handler_t, 0 | 0 );
+ if (!SWIG_IsOK(res4)) {
+ SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "pn_handler_t *","pn_reactor_connection_to_host", 4, argv[3] ));
+ }
+ arg4 = (pn_handler_t *)(argp4);
+ result = (pn_connection_t *)pn_reactor_connection_to_host(arg1,(char const *)arg2,(char const *)arg3,arg4);
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_connection_t, 0 | 0 );
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+ return vresult;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
_wrap_pn_reactor_connection(int argc, VALUE *argv, VALUE self) {
pn_reactor_t *arg1 = (pn_reactor_t *) 0 ;
pn_handler_t *arg2 = (pn_handler_t *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -21373,10 +21547,93 @@
return Qnil;
}
SWIGINTERN VALUE
+_wrap_pn_reactor_set_connection_host(int argc, VALUE *argv, VALUE self) {
+ pn_reactor_t *arg1 = (pn_reactor_t *) 0 ;
+ pn_connection_t *arg2 = (pn_connection_t *) 0 ;
+ char *arg3 = (char *) 0 ;
+ char *arg4 = (char *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ int res4 ;
+ char *buf4 = 0 ;
+ int alloc4 = 0 ;
+
+ if ((argc < 4) || (argc > 4)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_reactor_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_reactor_t *","pn_reactor_set_connection_host", 1, argv[0] ));
+ }
+ arg1 = (pn_reactor_t *)(argp1);
+ res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_pn_connection_t, 0 | 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_connection_t *","pn_reactor_set_connection_host", 2, argv[1] ));
+ }
+ arg2 = (pn_connection_t *)(argp2);
+ res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","pn_reactor_set_connection_host", 3, argv[2] ));
+ }
+ arg3 = (char *)(buf3);
+ res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
+ if (!SWIG_IsOK(res4)) {
+ SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","pn_reactor_set_connection_host", 4, argv[3] ));
+ }
+ arg4 = (char *)(buf4);
+ pn_reactor_set_connection_host(arg1,arg2,(char const *)arg3,(char const *)arg4);
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+ if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+ return Qnil;
+fail:
+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
+ if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_pn_reactor_get_connection_address(int argc, VALUE *argv, VALUE self) {
+ pn_reactor_t *arg1 = (pn_reactor_t *) 0 ;
+ pn_connection_t *arg2 = (pn_connection_t *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ void *argp2 = 0 ;
+ int res2 = 0 ;
+ char *result = 0 ;
+ VALUE vresult = Qnil;
+
+ if ((argc < 2) || (argc > 2)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_reactor_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_reactor_t *","pn_reactor_get_connection_address", 1, argv[0] ));
+ }
+ arg1 = (pn_reactor_t *)(argp1);
+ res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_pn_connection_t, 0 | 0 );
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_connection_t *","pn_reactor_get_connection_address", 2, argv[1] ));
+ }
+ arg2 = (pn_connection_t *)(argp2);
+ result = (char *)pn_reactor_get_connection_address(arg1,arg2);
+ vresult = SWIG_FromCharPtr((const char *)result);
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
_wrap_pn_reactor_wakeup(int argc, VALUE *argv, VALUE self) {
pn_reactor_t *arg1 = (pn_reactor_t *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int result;
@@ -22058,11 +22315,11 @@
static swig_type_info _swigt__p_pn_uuid_t = {"_p_pn_uuid_t", "pn_uuid_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_short = {"_p_short", "short *|int16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int8_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "size_t *|unsigned int *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "pn_seconds_t *|uintptr_t *|pn_decimal32_t *|uint32_t *|pn_handle_t *|unsigned long *|pn_millis_t *|pn_char_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "pn_seconds_t *|uintptr_t *|pn_decimal32_t *|uint32_t *|unsigned long *|pn_millis_t *|pn_char_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "pn_decimal64_t *|uint64_t *|unsigned long long *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
static swig_type_info *swig_type_initial[] = {
@@ -22300,42 +22557,42 @@
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
/* -----------------------------------------------------------------------------
* Type initialization:
- * This problem is tough by the requirement that no dynamic
- * memory is used. Also, since swig_type_info structures store pointers to
+ * This problem is tough by the requirement that no dynamic
+ * memory is used. Also, since swig_type_info structures store pointers to
* swig_cast_info structures and swig_cast_info structures store pointers back
- * to swig_type_info structures, we need some lookup code at initialization.
- * The idea is that swig generates all the structures that are needed.
- * The runtime then collects these partially filled structures.
- * The SWIG_InitializeModule function takes these initial arrays out of
+ * to swig_type_info structures, we need some lookup code at initialization.
+ * The idea is that swig generates all the structures that are needed.
+ * The runtime then collects these partially filled structures.
+ * The SWIG_InitializeModule function takes these initial arrays out of
* swig_module, and does all the lookup, filling in the swig_module.types
* array with the correct data and linking the correct swig_cast_info
* structures together.
*
- * The generated swig_type_info structures are assigned staticly to an initial
+ * The generated swig_type_info structures are assigned statically to an initial
* array. We just loop through that array, and handle each type individually.
* First we lookup if this type has been already loaded, and if so, use the
* loaded structure instead of the generated one. Then we have to fill in the
* cast linked list. The cast data is initially stored in something like a
* two-dimensional array. Each row corresponds to a type (there are the same
* number of rows as there are in the swig_type_initial array). Each entry in
* a column is one of the swig_cast_info structures for that type.
* The cast_initial array is actually an array of arrays, because each row has
* a variable number of columns. So to actually build the cast linked list,
- * we find the array of casts associated with the type, and loop through it
+ * we find the array of casts associated with the type, and loop through it
* adding the casts to the list. The one last trick we need to do is making
* sure the type pointer in the swig_cast_info struct is correct.
*
- * First off, we lookup the cast->type name to see if it is already loaded.
+ * First off, we lookup the cast->type name to see if it is already loaded.
* There are three cases to handle:
* 1) If the cast->type has already been loaded AND the type we are adding
* casting info to has not been loaded (it is in this module), THEN we
* replace the cast->type pointer with the type pointer that has already
* been loaded.
- * 2) If BOTH types (the one we are adding casting info to, and the
+ * 2) If BOTH types (the one we are adding casting info to, and the
* cast->type) are loaded, THEN the cast info has already been loaded by
* the previous module so we just ignore it.
* 3) Finally, if cast->type has not already been loaded, then we add that
* swig_cast_info to the linked list (because the cast->type) pointer will
* be correct.
@@ -22355,14 +22612,12 @@
SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
- int found, init;
+ int init;
- clientdata = clientdata;
-
/* check to see if the circular list has been setup, if not, set it up */
if (swig_module.next==0) {
/* Initialize the swig_module */
swig_module.type_initial = swig_type_initial;
swig_module.cast_initial = swig_cast_initial;
@@ -22376,31 +22631,27 @@
module_head = SWIG_GetModule(clientdata);
if (!module_head) {
/* This is the first module loaded for this interpreter */
/* so set the swig module into the interpreter */
SWIG_SetModule(clientdata, &swig_module);
- module_head = &swig_module;
} else {
/* the interpreter has loaded a SWIG module, but has it loaded this one? */
- found=0;
iter=module_head;
do {
if (iter==&swig_module) {
- found=1;
- break;
+ /* Our module is already in the list, so there's nothing more to do. */
+ return;
}
iter=iter->next;
} while (iter!= module_head);
- /* if the is found in the list, then all is done and we may leave */
- if (found) return;
- /* otherwise we must add out module into the list */
+ /* otherwise we must add our module into the list */
swig_module.next = module_head->next;
module_head->next = &swig_module;
}
- /* When multiple interpeters are used, a module could have already been initialized in
+ /* When multiple interpreters are used, a module could have already been initialized in
a different interpreter, but not yet have a pointer in this interpreter.
In this case, we do not want to continue adding types... everything should be
set up already */
if (init == 0) return;
@@ -22410,11 +22661,11 @@
#endif
for (i = 0; i < swig_module.size; ++i) {
swig_type_info *type = 0;
swig_type_info *ret;
swig_cast_info *cast;
-
+
#ifdef SWIGRUNTIME_DEBUG
printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
#endif
/* if there is another module already loaded */
@@ -22437,11 +22688,11 @@
}
/* Insert casting types */
cast = swig_module.cast_initial[i];
while (cast->type) {
-
+
/* Don't need to add information already in the list */
ret = 0;
#ifdef SWIGRUNTIME_DEBUG
printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
@@ -22599,14 +22850,15 @@
rb_define_module_function(mCproton, "pni_rbdispatch", _wrap_pni_rbdispatch, -1);
rb_define_module_function(mCproton, "pni_rbhandler_finalize", _wrap_pni_rbhandler_finalize, -1);
rb_define_module_function(mCproton, "pn_rbhandler", _wrap_pn_rbhandler, -1);
rb_define_const(mCproton, "PROTON_IMPORT_EXPORT_H", SWIG_From_int((int)(1)));
rb_define_const(mCproton, "PN_VERSION_MAJOR", SWIG_From_int((int)(0)));
- rb_define_const(mCproton, "PN_VERSION_MINOR", SWIG_From_int((int)(12)));
+ rb_define_const(mCproton, "PN_VERSION_MINOR", SWIG_From_int((int)(13)));
rb_define_const(mCproton, "PN_VERSION_POINT", SWIG_From_int((int)(0)));
rb_define_const(mCproton, "PROTON_TYPES_H", SWIG_From_int((int)(1)));
rb_define_const(mCproton, "PN_MILLIS_MAX", SWIG_From_unsigned_SS_int((unsigned int)((~0U))));
+ rb_define_module_function(mCproton, "pn_timestamp_now", _wrap_pn_timestamp_now, -1);
rb_define_module_function(mCproton, "pn_bytes", _wrap_pn_bytes, -1);
rb_define_const(mCproton, "PROTON_OBJECT_H", SWIG_From_int((int)(1)));
rb_define_singleton_method(mCproton, "PN_OBJECT", _wrap_PN_OBJECT_get, 0);
rb_define_singleton_method(mCproton, "PN_VOID", _wrap_PN_VOID_get, 0);
rb_define_singleton_method(mCproton, "PN_WEAKREF", _wrap_PN_WEAKREF_get, 0);
@@ -22873,10 +23125,11 @@
rb_define_module_function(mCproton, "pn_terminus_capabilities", _wrap_pn_terminus_capabilities, -1);
rb_define_module_function(mCproton, "pn_terminus_outcomes", _wrap_pn_terminus_outcomes, -1);
rb_define_module_function(mCproton, "pn_terminus_filter", _wrap_pn_terminus_filter, -1);
rb_define_module_function(mCproton, "pn_terminus_copy", _wrap_pn_terminus_copy, -1);
rb_define_const(mCproton, "PROTON_DELIVERY_H", SWIG_From_int((int)(1)));
+ rb_define_module_function(mCproton, "pn_dtag", _wrap_pn_dtag, -1);
rb_define_module_function(mCproton, "pn_delivery_get_context", _wrap_pn_delivery_get_context, -1);
rb_define_module_function(mCproton, "pn_delivery_set_context", _wrap_pn_delivery_set_context, -1);
rb_define_module_function(mCproton, "pn_delivery_attachments", _wrap_pn_delivery_attachments, -1);
rb_define_module_function(mCproton, "pn_delivery_link", _wrap_pn_delivery_link, -1);
rb_define_module_function(mCproton, "pn_delivery_local", _wrap_pn_delivery_local, -1);
@@ -23408,10 +23661,13 @@
rb_define_module_function(mCproton, "pn_reactor_io", _wrap_pn_reactor_io, -1);
rb_define_module_function(mCproton, "pn_reactor_children", _wrap_pn_reactor_children, -1);
rb_define_module_function(mCproton, "pn_reactor_selectable", _wrap_pn_reactor_selectable, -1);
rb_define_module_function(mCproton, "pn_reactor_update", _wrap_pn_reactor_update, -1);
rb_define_module_function(mCproton, "pn_reactor_acceptor", _wrap_pn_reactor_acceptor, -1);
+ rb_define_module_function(mCproton, "pn_reactor_connection_to_host", _wrap_pn_reactor_connection_to_host, -1);
rb_define_module_function(mCproton, "pn_reactor_connection", _wrap_pn_reactor_connection, -1);
+ rb_define_module_function(mCproton, "pn_reactor_set_connection_host", _wrap_pn_reactor_set_connection_host, -1);
+ rb_define_module_function(mCproton, "pn_reactor_get_connection_address", _wrap_pn_reactor_get_connection_address, -1);
rb_define_module_function(mCproton, "pn_reactor_wakeup", _wrap_pn_reactor_wakeup, -1);
rb_define_module_function(mCproton, "pn_reactor_start", _wrap_pn_reactor_start, -1);
rb_define_module_function(mCproton, "pn_reactor_quiesced", _wrap_pn_reactor_quiesced, -1);
rb_define_module_function(mCproton, "pn_reactor_process", _wrap_pn_reactor_process, -1);
rb_define_module_function(mCproton, "pn_reactor_stop", _wrap_pn_reactor_stop, -1);