ext/cproton/cproton.c in qpid_proton-0.3 vs ext/cproton/cproton.c in qpid_proton-0.4
- old
+ new
@@ -1789,58 +1789,60 @@
/* -------- TYPES TABLE (BEGIN) -------- */
#define SWIGTYPE_p_char swig_types[0]
#define SWIGTYPE_p_int swig_types[1]
-#define SWIGTYPE_p_long_long swig_types[2]
-#define SWIGTYPE_p_p_char swig_types[3]
-#define SWIGTYPE_p_pn_accept_mode_t swig_types[4]
-#define SWIGTYPE_p_pn_activate_criteria_t swig_types[5]
-#define SWIGTYPE_p_pn_atom_t swig_types[6]
-#define SWIGTYPE_p_pn_atom_t_u swig_types[7]
-#define SWIGTYPE_p_pn_bytes_t swig_types[8]
-#define SWIGTYPE_p_pn_condition_t swig_types[9]
-#define SWIGTYPE_p_pn_connection_t swig_types[10]
-#define SWIGTYPE_p_pn_connector_t swig_types[11]
-#define SWIGTYPE_p_pn_data_t swig_types[12]
-#define SWIGTYPE_p_pn_decimal128_t swig_types[13]
-#define SWIGTYPE_p_pn_delivery_t swig_types[14]
-#define SWIGTYPE_p_pn_delivery_tag_t swig_types[15]
-#define SWIGTYPE_p_pn_disposition_t swig_types[16]
-#define SWIGTYPE_p_pn_driver_t swig_types[17]
-#define SWIGTYPE_p_pn_durability_t swig_types[18]
-#define SWIGTYPE_p_pn_error_t swig_types[19]
-#define SWIGTYPE_p_pn_expiry_policy_t swig_types[20]
-#define SWIGTYPE_p_pn_format_t swig_types[21]
-#define SWIGTYPE_p_pn_link_t swig_types[22]
-#define SWIGTYPE_p_pn_listener_t swig_types[23]
-#define SWIGTYPE_p_pn_message_t swig_types[24]
-#define SWIGTYPE_p_pn_messenger_t swig_types[25]
-#define SWIGTYPE_p_pn_sasl_outcome_t swig_types[26]
-#define SWIGTYPE_p_pn_sasl_state_t swig_types[27]
-#define SWIGTYPE_p_pn_sasl_t swig_types[28]
-#define SWIGTYPE_p_pn_session_t swig_types[29]
-#define SWIGTYPE_p_pn_ssl_domain_t swig_types[30]
-#define SWIGTYPE_p_pn_ssl_mode_t swig_types[31]
-#define SWIGTYPE_p_pn_ssl_resume_status_t swig_types[32]
-#define SWIGTYPE_p_pn_ssl_t swig_types[33]
-#define SWIGTYPE_p_pn_ssl_verify_mode_t swig_types[34]
-#define SWIGTYPE_p_pn_status_t swig_types[35]
-#define SWIGTYPE_p_pn_subscription_t swig_types[36]
-#define SWIGTYPE_p_pn_terminus_t swig_types[37]
-#define SWIGTYPE_p_pn_terminus_type_t swig_types[38]
-#define SWIGTYPE_p_pn_transport_t swig_types[39]
-#define SWIGTYPE_p_pn_type_t swig_types[40]
-#define SWIGTYPE_p_pn_uuid_t swig_types[41]
-#define SWIGTYPE_p_short swig_types[42]
-#define SWIGTYPE_p_signed_char swig_types[43]
-#define SWIGTYPE_p_unsigned_char swig_types[44]
-#define SWIGTYPE_p_unsigned_int swig_types[45]
-#define SWIGTYPE_p_unsigned_long swig_types[46]
-#define SWIGTYPE_p_unsigned_short swig_types[47]
-static swig_type_info *swig_types[49];
-static swig_module_info swig_module = {swig_types, 48, 0, 0, 0, 0};
+#define SWIGTYPE_p_long swig_types[2]
+#define SWIGTYPE_p_long_long swig_types[3]
+#define SWIGTYPE_p_p_char swig_types[4]
+#define SWIGTYPE_p_pn_accept_mode_t swig_types[5]
+#define SWIGTYPE_p_pn_activate_criteria_t swig_types[6]
+#define SWIGTYPE_p_pn_atom_t swig_types[7]
+#define SWIGTYPE_p_pn_atom_t_u swig_types[8]
+#define SWIGTYPE_p_pn_bytes_t swig_types[9]
+#define SWIGTYPE_p_pn_condition_t swig_types[10]
+#define SWIGTYPE_p_pn_connection_t swig_types[11]
+#define SWIGTYPE_p_pn_connector_t swig_types[12]
+#define SWIGTYPE_p_pn_data_t swig_types[13]
+#define SWIGTYPE_p_pn_decimal128_t swig_types[14]
+#define SWIGTYPE_p_pn_delivery_t swig_types[15]
+#define SWIGTYPE_p_pn_delivery_tag_t swig_types[16]
+#define SWIGTYPE_p_pn_disposition_t swig_types[17]
+#define SWIGTYPE_p_pn_driver_t swig_types[18]
+#define SWIGTYPE_p_pn_durability_t swig_types[19]
+#define SWIGTYPE_p_pn_error_t swig_types[20]
+#define SWIGTYPE_p_pn_expiry_policy_t swig_types[21]
+#define SWIGTYPE_p_pn_format_t swig_types[22]
+#define SWIGTYPE_p_pn_link_t swig_types[23]
+#define SWIGTYPE_p_pn_listener_t swig_types[24]
+#define SWIGTYPE_p_pn_message_t swig_types[25]
+#define SWIGTYPE_p_pn_messenger_t swig_types[26]
+#define SWIGTYPE_p_pn_sasl_outcome_t swig_types[27]
+#define SWIGTYPE_p_pn_sasl_state_t swig_types[28]
+#define SWIGTYPE_p_pn_sasl_t swig_types[29]
+#define SWIGTYPE_p_pn_session_t swig_types[30]
+#define SWIGTYPE_p_pn_ssl_domain_t swig_types[31]
+#define SWIGTYPE_p_pn_ssl_mode_t swig_types[32]
+#define SWIGTYPE_p_pn_ssl_resume_status_t swig_types[33]
+#define SWIGTYPE_p_pn_ssl_t swig_types[34]
+#define SWIGTYPE_p_pn_ssl_verify_mode_t swig_types[35]
+#define SWIGTYPE_p_pn_status_t swig_types[36]
+#define SWIGTYPE_p_pn_subscription_t swig_types[37]
+#define SWIGTYPE_p_pn_terminus_t swig_types[38]
+#define SWIGTYPE_p_pn_terminus_type_t swig_types[39]
+#define SWIGTYPE_p_pn_transport_t swig_types[40]
+#define SWIGTYPE_p_pn_type_t swig_types[41]
+#define SWIGTYPE_p_pn_uuid_t swig_types[42]
+#define SWIGTYPE_p_short swig_types[43]
+#define SWIGTYPE_p_signed_char swig_types[44]
+#define SWIGTYPE_p_unsigned_char swig_types[45]
+#define SWIGTYPE_p_unsigned_int swig_types[46]
+#define SWIGTYPE_p_unsigned_long swig_types[47]
+#define SWIGTYPE_p_unsigned_long_long swig_types[48]
+#define SWIGTYPE_p_unsigned_short swig_types[49]
+static swig_type_info *swig_types[51];
+static swig_module_info swig_module = {swig_types, 50, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
/* -------- TYPES TABLE (END) -------- */
@@ -1865,12 +1867,17 @@
#include <proton/message.h>
#include <proton/sasl.h>
#include <proton/driver.h>
#include <proton/messenger.h>
#include <proton/ssl.h>
+#include <proton/driver_extras.h>
+#include <proton/types.h>
+#include <uuid/uuid.h>
+
+
#if !defined(RSTRING_LEN)
# define RSTRING_LEN(x) (RSTRING(X)->len)
# define RSTRING_PTR(x) (RSTRING(x)->ptr)
#endif
@@ -2189,30 +2196,14 @@
{
return LL2NUM(value);
}
-SWIGINTERNINLINE VALUE
-SWIG_From_unsigned_SS_int (unsigned int value)
-{
- return SWIG_From_unsigned_SS_long (value);
-}
-
-
-SWIGINTERN int
-SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val)
+SWIGINTERNINLINE VALUE
+SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
{
- unsigned long v;
- int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
- if (SWIG_IsOK(res)) {
- if ((v > UINT_MAX)) {
- return SWIG_OverflowError;
- } else {
- if (val) *val = (unsigned int)(v);
- }
- }
- return res;
+ return ULL2NUM(value);
}
SWIGINTERN int
SWIG_AsVal_bool (VALUE obj, bool *val)
@@ -2347,10 +2338,39 @@
{
return SWIG_From_long (value);
}
+/*@SWIG:/usr/share/swig/2.0.8/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;
+}
+
+
#include <float.h>
/*@SWIG:/usr/share/swig/2.0.8/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
@@ -3849,45 +3869,10 @@
return Qnil;
}
SWIGINTERN VALUE
-_wrap_pn_error_from_errno(int argc, VALUE *argv, VALUE self) {
- pn_error_t *arg1 = (pn_error_t *) 0 ;
- char *arg2 = (char *) 0 ;
- void *argp1 = 0 ;
- int res1 = 0 ;
- int res2 ;
- char *buf2 = 0 ;
- int alloc2 = 0 ;
- int result;
- 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_error_t, 0 | 0 );
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_error_t *","pn_error_from_errno", 1, argv[0] ));
- }
- arg1 = (pn_error_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_error_from_errno", 2, argv[1] ));
- }
- arg2 = (char *)(buf2);
- result = (int)pn_error_from_errno(arg1,(char const *)arg2);
- vresult = SWIG_From_int((int)(result));
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
- return vresult;
-fail:
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
- return Qnil;
-}
-
-
-SWIGINTERN VALUE
_wrap_pn_error_code(int argc, VALUE *argv, VALUE self) {
pn_error_t *arg1 = (pn_error_t *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int result;
@@ -4900,10 +4885,215 @@
return Qnil;
}
SWIGINTERN VALUE
+_wrap_pn_transport_capacity(int argc, VALUE *argv, VALUE self) {
+ pn_transport_t *arg1 = (pn_transport_t *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ssize_t result;
+ VALUE vresult = Qnil;
+
+ if ((argc < 1) || (argc > 1)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_transport_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_capacity", 1, argv[0] ));
+ }
+ arg1 = (pn_transport_t *)(argp1);
+ result = (ssize_t)pn_transport_capacity(arg1);
+ vresult = SWIG_From_int((int)(result));
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_pn_transport_tail(int argc, VALUE *argv, VALUE self) {
+ pn_transport_t *arg1 = (pn_transport_t *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ char *result = 0 ;
+ VALUE vresult = Qnil;
+
+ if ((argc < 1) || (argc > 1)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_transport_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_tail", 1, argv[0] ));
+ }
+ arg1 = (pn_transport_t *)(argp1);
+ result = (char *)pn_transport_tail(arg1);
+ vresult = SWIG_FromCharPtr((const char *)result);
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_pn_transport_push(int argc, VALUE *argv, VALUE self) {
+ pn_transport_t *arg1 = (pn_transport_t *) 0 ;
+ size_t arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ size_t val2 ;
+ int ecode2 = 0 ;
+ int result;
+ 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_transport_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_push", 1, argv[0] ));
+ }
+ arg1 = (pn_transport_t *)(argp1);
+ ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","pn_transport_push", 2, argv[1] ));
+ }
+ arg2 = (size_t)(val2);
+ result = (int)pn_transport_push(arg1,arg2);
+ vresult = SWIG_From_int((int)(result));
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_pn_transport_close_tail(int argc, VALUE *argv, VALUE self) {
+ pn_transport_t *arg1 = (pn_transport_t *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int result;
+ VALUE vresult = Qnil;
+
+ if ((argc < 1) || (argc > 1)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_transport_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_close_tail", 1, argv[0] ));
+ }
+ arg1 = (pn_transport_t *)(argp1);
+ result = (int)pn_transport_close_tail(arg1);
+ vresult = SWIG_From_int((int)(result));
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_pn_transport_pending(int argc, VALUE *argv, VALUE self) {
+ pn_transport_t *arg1 = (pn_transport_t *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ ssize_t result;
+ VALUE vresult = Qnil;
+
+ if ((argc < 1) || (argc > 1)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_transport_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_pending", 1, argv[0] ));
+ }
+ arg1 = (pn_transport_t *)(argp1);
+ result = (ssize_t)pn_transport_pending(arg1);
+ vresult = SWIG_From_int((int)(result));
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_pn_transport_head(int argc, VALUE *argv, VALUE self) {
+ pn_transport_t *arg1 = (pn_transport_t *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ char *result = 0 ;
+ VALUE vresult = Qnil;
+
+ if ((argc < 1) || (argc > 1)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_transport_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_head", 1, argv[0] ));
+ }
+ arg1 = (pn_transport_t *)(argp1);
+ result = (char *)pn_transport_head(arg1);
+ vresult = SWIG_FromCharPtr((const char *)result);
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_pn_transport_pop(int argc, VALUE *argv, VALUE self) {
+ pn_transport_t *arg1 = (pn_transport_t *) 0 ;
+ size_t arg2 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ size_t val2 ;
+ int ecode2 = 0 ;
+
+ 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_transport_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_pop", 1, argv[0] ));
+ }
+ arg1 = (pn_transport_t *)(argp1);
+ ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","pn_transport_pop", 2, argv[1] ));
+ }
+ arg2 = (size_t)(val2);
+ pn_transport_pop(arg1,arg2);
+ return Qnil;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_pn_transport_close_head(int argc, VALUE *argv, VALUE self) {
+ pn_transport_t *arg1 = (pn_transport_t *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int result;
+ VALUE vresult = Qnil;
+
+ if ((argc < 1) || (argc > 1)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_transport_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_close_head", 1, argv[0] ));
+ }
+ arg1 = (pn_transport_t *)(argp1);
+ result = (int)pn_transport_close_head(arg1);
+ vresult = SWIG_From_int((int)(result));
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
_wrap_pn_transport_tick(int argc, VALUE *argv, VALUE self) {
pn_transport_t *arg1 = (pn_transport_t *) 0 ;
pn_timestamp_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -4979,11 +5169,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_get_max_frame", 1, argv[0] ));
}
arg1 = (pn_transport_t *)(argp1);
result = (uint32_t)pn_transport_get_max_frame(arg1);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
return vresult;
fail:
return Qnil;
}
@@ -4992,22 +5182,22 @@
_wrap_pn_transport_set_max_frame(int argc, VALUE *argv, VALUE self) {
pn_transport_t *arg1 = (pn_transport_t *) 0 ;
uint32_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned int val2 ;
+ unsigned long val2 ;
int ecode2 = 0 ;
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_transport_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_set_max_frame", 1, argv[0] ));
}
arg1 = (pn_transport_t *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
+ ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint32_t","pn_transport_set_max_frame", 2, argv[1] ));
}
arg2 = (uint32_t)(val2);
pn_transport_set_max_frame(arg1,arg2);
@@ -5032,11 +5222,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_get_remote_max_frame", 1, argv[0] ));
}
arg1 = (pn_transport_t *)(argp1);
result = (uint32_t)pn_transport_get_remote_max_frame(arg1);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
return vresult;
fail:
return Qnil;
}
@@ -5056,11 +5246,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_get_idle_timeout", 1, argv[0] ));
}
arg1 = (pn_transport_t *)(argp1);
result = (pn_millis_t)pn_transport_get_idle_timeout(arg1);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
return vresult;
fail:
return Qnil;
}
@@ -5069,22 +5259,22 @@
_wrap_pn_transport_set_idle_timeout(int argc, VALUE *argv, VALUE self) {
pn_transport_t *arg1 = (pn_transport_t *) 0 ;
pn_millis_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned int val2 ;
+ unsigned long val2 ;
int ecode2 = 0 ;
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_transport_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_set_idle_timeout", 1, argv[0] ));
}
arg1 = (pn_transport_t *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
+ ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_millis_t","pn_transport_set_idle_timeout", 2, argv[1] ));
}
arg2 = (pn_millis_t)(val2);
pn_transport_set_idle_timeout(arg1,arg2);
@@ -5109,11 +5299,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_get_remote_idle_timeout", 1, argv[0] ));
}
arg1 = (pn_transport_t *)(argp1);
result = (pn_millis_t)pn_transport_get_remote_idle_timeout(arg1);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
return vresult;
fail:
return Qnil;
}
@@ -5133,11 +5323,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t const *","pn_transport_get_frames_output", 1, argv[0] ));
}
arg1 = (pn_transport_t *)(argp1);
result = (uint64_t)pn_transport_get_frames_output((struct pn_transport_t const *)arg1);
- vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
+ vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
return vresult;
fail:
return Qnil;
}
@@ -5157,18 +5347,42 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t const *","pn_transport_get_frames_input", 1, argv[0] ));
}
arg1 = (pn_transport_t *)(argp1);
result = (uint64_t)pn_transport_get_frames_input((struct pn_transport_t const *)arg1);
- vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
+ vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
return vresult;
fail:
return Qnil;
}
SWIGINTERN VALUE
+_wrap_pn_transport_quiesced(int argc, VALUE *argv, VALUE self) {
+ pn_transport_t *arg1 = (pn_transport_t *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ bool result;
+ VALUE vresult = Qnil;
+
+ if ((argc < 1) || (argc > 1)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_transport_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_transport_t *","pn_transport_quiesced", 1, argv[0] ));
+ }
+ arg1 = (pn_transport_t *)(argp1);
+ result = (bool)pn_transport_quiesced(arg1);
+ vresult = SWIG_From_bool((bool)(result));
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
_wrap_pn_transport_free(int argc, VALUE *argv, VALUE self) {
pn_transport_t *arg1 = (pn_transport_t *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -6407,11 +6621,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_terminus_t *","pn_terminus_get_timeout", 1, argv[0] ));
}
arg1 = (pn_terminus_t *)(argp1);
result = (pn_seconds_t)pn_terminus_get_timeout(arg1);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
return vresult;
fail:
return Qnil;
}
@@ -6420,11 +6634,11 @@
_wrap_pn_terminus_set_timeout(int argc, VALUE *argv, VALUE self) {
pn_terminus_t *arg1 = (pn_terminus_t *) 0 ;
pn_seconds_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned int val2 ;
+ unsigned long val2 ;
int ecode2 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
@@ -6433,11 +6647,11 @@
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_terminus_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_terminus_t *","pn_terminus_set_timeout", 1, argv[0] ));
}
arg1 = (pn_terminus_t *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
+ ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_seconds_t","pn_terminus_set_timeout", 2, argv[1] ));
}
arg2 = (pn_seconds_t)(val2);
result = (int)pn_terminus_set_timeout(arg1,arg2);
@@ -7725,11 +7939,11 @@
}
arg1 = (pn_message_t *)(argp1);
SWIG_contract_assert((arg1!=NULL), "Contract violation: require: (arg1!=NULL)");
result = (pn_millis_t)pn_message_get_ttl(arg1);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
return vresult;
fail:
return Qnil;
}
@@ -7738,11 +7952,11 @@
_wrap_pn_message_set_ttl(int argc, VALUE *argv, VALUE self) {
pn_message_t *arg1 = (pn_message_t *) 0 ;
pn_millis_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned int val2 ;
+ unsigned long val2 ;
int ecode2 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
@@ -7751,11 +7965,11 @@
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_message_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_message_t *","pn_message_set_ttl", 1, argv[0] ));
}
arg1 = (pn_message_t *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
+ ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_millis_t","pn_message_set_ttl", 2, argv[1] ));
}
arg2 = (pn_millis_t)(val2);
SWIG_contract_assert((arg1!=NULL), "Contract violation: require: (arg1!=NULL)");
@@ -7845,11 +8059,11 @@
}
arg1 = (pn_message_t *)(argp1);
SWIG_contract_assert((arg1!=NULL), "Contract violation: require: (arg1!=NULL)");
result = (uint32_t)pn_message_get_delivery_count(arg1);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
return vresult;
fail:
return Qnil;
}
@@ -7858,11 +8072,11 @@
_wrap_pn_message_set_delivery_count(int argc, VALUE *argv, VALUE self) {
pn_message_t *arg1 = (pn_message_t *) 0 ;
uint32_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned int val2 ;
+ unsigned long val2 ;
int ecode2 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
@@ -7871,11 +8085,11 @@
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_message_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_message_t *","pn_message_set_delivery_count", 1, argv[0] ));
}
arg1 = (pn_message_t *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
+ ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint32_t","pn_message_set_delivery_count", 2, argv[1] ));
}
arg2 = (uint32_t)(val2);
SWIG_contract_assert((arg1!=NULL), "Contract violation: require: (arg1!=NULL)");
@@ -8120,11 +8334,11 @@
(&arg2)->start = NULL;
(&arg2)->size = 0;
} else {
(&arg2)->start = RSTRING_PTR(argv[1]);
if (!(&arg2)->start) {
- return NULL;
+ (&arg2)->size = 0;
}
(&arg2)->size = RSTRING_LEN(argv[1]);
}
}
SWIG_contract_assert((arg1!=NULL), "Contract violation: require: (arg1!=NULL)");
@@ -8834,11 +9048,11 @@
}
arg1 = (pn_message_t *)(argp1);
SWIG_contract_assert((arg1!=NULL), "Contract violation: require: (arg1!=NULL)");
result = (pn_sequence_t)pn_message_get_group_sequence(arg1);
- vresult = SWIG_From_int((int)(result));
+ vresult = SWIG_From_long((long)(result));
return vresult;
fail:
return Qnil;
}
@@ -8847,11 +9061,11 @@
_wrap_pn_message_set_group_sequence(int argc, VALUE *argv, VALUE self) {
pn_message_t *arg1 = (pn_message_t *) 0 ;
pn_sequence_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- int val2 ;
+ long val2 ;
int ecode2 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
@@ -8860,11 +9074,11 @@
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_message_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_message_t *","pn_message_set_group_sequence", 1, argv[0] ));
}
arg1 = (pn_message_t *)(argp1);
- ecode2 = SWIG_AsVal_int(argv[1], &val2);
+ ecode2 = SWIG_AsVal_long(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_sequence_t","pn_message_set_group_sequence", 2, argv[1] ));
}
arg2 = (pn_sequence_t)(val2);
SWIG_contract_assert((arg1!=NULL), "Contract violation: require: (arg1!=NULL)");
@@ -9804,48 +10018,10 @@
return Qnil;
}
SWIGINTERN VALUE
-_wrap_pn_listener_fd(int argc, VALUE *argv, VALUE self) {
- pn_driver_t *arg1 = (pn_driver_t *) 0 ;
- int arg2 ;
- void *arg3 = (void *) 0 ;
- void *argp1 = 0 ;
- int res1 = 0 ;
- int val2 ;
- int ecode2 = 0 ;
- pn_listener_t *result = 0 ;
- VALUE vresult = Qnil;
-
- if ((argc < 3) || (argc > 3)) {
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
- }
- res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_driver_t, 0 | 0 );
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_driver_t *","pn_listener_fd", 1, argv[0] ));
- }
- arg1 = (pn_driver_t *)(argp1);
- ecode2 = SWIG_AsVal_int(argv[1], &val2);
- if (!SWIG_IsOK(ecode2)) {
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","pn_listener_fd", 2, argv[1] ));
- }
- arg2 = (int)(val2);
- {
- arg3 = (void *) argv[2];
- }
- SWIG_contract_assert((arg1!=NULL)&&(arg2>=0), "Contract violation: require: (arg1!=NULL)&&(arg2>=0)");
-
- result = (pn_listener_t *)pn_listener_fd(arg1,arg2,arg3);
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_listener_t, 0 | 0 );
- return vresult;
-fail:
- return Qnil;
-}
-
-
-SWIGINTERN VALUE
_wrap_pn_listener_head(int argc, VALUE *argv, VALUE self) {
pn_driver_t *arg1 = (pn_driver_t *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
pn_listener_t *result = 0 ;
@@ -10102,50 +10278,10 @@
return Qnil;
}
SWIGINTERN VALUE
-_wrap_pn_connector_fd(int argc, VALUE *argv, VALUE self) {
- pn_driver_t *arg1 = (pn_driver_t *) 0 ;
- int arg2 ;
- void *arg3 = (void *) 0 ;
- void *argp1 = 0 ;
- int res1 = 0 ;
- int val2 ;
- int ecode2 = 0 ;
- pn_connector_t *result = 0 ;
- VALUE vresult = Qnil;
-
- if ((argc < 3) || (argc > 3)) {
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
- }
- res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_driver_t, 0 | 0 );
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_driver_t *","pn_connector_fd", 1, argv[0] ));
- }
- arg1 = (pn_driver_t *)(argp1);
- ecode2 = SWIG_AsVal_int(argv[1], &val2);
- if (!SWIG_IsOK(ecode2)) {
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","pn_connector_fd", 2, argv[1] ));
- }
- arg2 = (int)(val2);
- {
- arg3 = (void *) argv[2];
- }
- SWIG_contract_assert((arg1!=NULL)&&(arg2>=0), "Contract violation: require: (arg1!=NULL)&&(arg2>=0)");
-
- result = (pn_connector_t *)pn_connector_fd(arg1,arg2,arg3);
- SWIG_contract_assert((result!=NULL), "Contract violation: ensure: (result!=NULL)");
-
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_connector_t, 0 | 0 );
- return vresult;
-fail:
- return Qnil;
-}
-
-
-SWIGINTERN VALUE
_wrap_pn_connector_head(int argc, VALUE *argv, VALUE self) {
pn_driver_t *arg1 = (pn_driver_t *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
pn_connector_t *result = 0 ;
@@ -10565,10 +10701,82 @@
return Qnil;
}
SWIGINTERN VALUE
+_wrap_pn_listener_fd(int argc, VALUE *argv, VALUE self) {
+ pn_driver_t *arg1 = (pn_driver_t *) 0 ;
+ pn_socket_t arg2 ;
+ void *arg3 = (void *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int val2 ;
+ int ecode2 = 0 ;
+ pn_listener_t *result = 0 ;
+ VALUE vresult = Qnil;
+
+ if ((argc < 3) || (argc > 3)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_driver_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_driver_t *","pn_listener_fd", 1, argv[0] ));
+ }
+ arg1 = (pn_driver_t *)(argp1);
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_socket_t","pn_listener_fd", 2, argv[1] ));
+ }
+ arg2 = (pn_socket_t)(val2);
+ {
+ arg3 = (void *) argv[2];
+ }
+ result = (pn_listener_t *)pn_listener_fd(arg1,arg2,arg3);
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_listener_t, 0 | 0 );
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_pn_connector_fd(int argc, VALUE *argv, VALUE self) {
+ pn_driver_t *arg1 = (pn_driver_t *) 0 ;
+ pn_socket_t arg2 ;
+ void *arg3 = (void *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int val2 ;
+ int ecode2 = 0 ;
+ pn_connector_t *result = 0 ;
+ VALUE vresult = Qnil;
+
+ if ((argc < 3) || (argc > 3)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_driver_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_driver_t *","pn_connector_fd", 1, argv[0] ));
+ }
+ arg1 = (pn_driver_t *)(argp1);
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
+ if (!SWIG_IsOK(ecode2)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_socket_t","pn_connector_fd", 2, argv[1] ));
+ }
+ arg2 = (pn_socket_t)(val2);
+ {
+ arg3 = (void *) argv[2];
+ }
+ result = (pn_connector_t *)pn_connector_fd(arg1,arg2,arg3);
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pn_connector_t, 0 | 0 );
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
_wrap_pn_messenger(int argc, VALUE *argv, VALUE self) {
char *arg1 = (char *) 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
@@ -11480,11 +11688,11 @@
ecode2 = SWIG_AsVal_int(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","pn_messenger_recv", 2, argv[1] ));
}
arg2 = (int)(val2);
- SWIG_contract_assert((arg1!=NULL)&&(arg2>=0), "Contract violation: require: (arg1!=NULL)&&(arg2>=0)");
+ SWIG_contract_assert((arg1!=NULL), "Contract violation: require: (arg1!=NULL)");
result = (int)pn_messenger_recv(arg1,arg2);
vresult = SWIG_From_int((int)(result));
return vresult;
fail:
@@ -12081,10 +12289,34 @@
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
return Qnil;
}
+SWIGINTERN VALUE
+_wrap_pn_type_name(int argc, VALUE *argv, VALUE self) {
+ pn_type_t arg1 ;
+ int val1 ;
+ int ecode1 = 0 ;
+ char *result = 0 ;
+ VALUE vresult = Qnil;
+
+ if ((argc < 1) || (argc > 1)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
+ }
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
+ if (!SWIG_IsOK(ecode1)) {
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "pn_type_t","pn_type_name", 1, argv[0] ));
+ }
+ arg1 = (pn_type_t)(val1);
+ result = (char *)pn_type_name(arg1);
+ vresult = SWIG_FromCharPtr((const char *)result);
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
static swig_class SwigClassPn_atom_t;
SWIGINTERN VALUE
_wrap_pn_atom_t_type_set(int argc, VALUE *argv, VALUE self) {
pn_atom_t *arg1 = (pn_atom_t *) 0 ;
@@ -12470,22 +12702,22 @@
_wrap_pn_atom_t_u_as_uint_set(int argc, VALUE *argv, VALUE self) {
pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ;
uint32_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned int val2 ;
+ unsigned long val2 ;
int ecode2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_uint", 1, self ));
}
arg1 = (pn_atom_t_u *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
+ ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint32_t","as_uint", 2, argv[0] ));
}
arg2 = (uint32_t)(val2);
if (arg1) (arg1)->as_uint = arg2;
@@ -12510,11 +12742,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_uint", 1, self ));
}
arg1 = (pn_atom_t_u *)(argp1);
result = (uint32_t) ((arg1)->as_uint);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
return vresult;
fail:
return Qnil;
}
@@ -12523,22 +12755,22 @@
_wrap_pn_atom_t_u_as_int_set(int argc, VALUE *argv, VALUE self) {
pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ;
int32_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- int val2 ;
+ long val2 ;
int ecode2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_int", 1, self ));
}
arg1 = (pn_atom_t_u *)(argp1);
- ecode2 = SWIG_AsVal_int(argv[0], &val2);
+ ecode2 = SWIG_AsVal_long(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int32_t","as_int", 2, argv[0] ));
}
arg2 = (int32_t)(val2);
if (arg1) (arg1)->as_int = arg2;
@@ -12563,11 +12795,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_int", 1, self ));
}
arg1 = (pn_atom_t_u *)(argp1);
result = (int32_t) ((arg1)->as_int);
- vresult = SWIG_From_int((int)(result));
+ vresult = SWIG_From_long((long)(result));
return vresult;
fail:
return Qnil;
}
@@ -12576,22 +12808,22 @@
_wrap_pn_atom_t_u_as_char_set(int argc, VALUE *argv, VALUE self) {
pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ;
pn_char_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned int val2 ;
+ unsigned long val2 ;
int ecode2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_char", 1, self ));
}
arg1 = (pn_atom_t_u *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
+ ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_char_t","as_char", 2, argv[0] ));
}
arg2 = (pn_char_t)(val2);
if (arg1) (arg1)->as_char = arg2;
@@ -12616,11 +12848,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_char", 1, self ));
}
arg1 = (pn_atom_t_u *)(argp1);
result = (pn_char_t) ((arg1)->as_char);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
return vresult;
fail:
return Qnil;
}
@@ -12629,22 +12861,22 @@
_wrap_pn_atom_t_u_as_ulong_set(int argc, VALUE *argv, VALUE self) {
pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ;
uint64_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned long val2 ;
+ unsigned long long val2 ;
int ecode2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_ulong", 1, self ));
}
arg1 = (pn_atom_t_u *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2);
+ ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint64_t","as_ulong", 2, argv[0] ));
}
arg2 = (uint64_t)(val2);
if (arg1) (arg1)->as_ulong = arg2;
@@ -12669,11 +12901,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_ulong", 1, self ));
}
arg1 = (pn_atom_t_u *)(argp1);
result = (uint64_t) ((arg1)->as_ulong);
- vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
+ vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
return vresult;
fail:
return Qnil;
}
@@ -12894,26 +13126,22 @@
_wrap_pn_atom_t_u_as_decimal32_set(int argc, VALUE *argv, VALUE self) {
pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ;
pn_decimal32_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned int val2 ;
- int ecode2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_decimal32", 1, self ));
}
arg1 = (pn_atom_t_u *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
- if (!SWIG_IsOK(ecode2)) {
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_decimal32_t","as_decimal32", 2, argv[0] ));
- }
- arg2 = (pn_decimal32_t)(val2);
+ {
+ arg2 = FIX2UINT(argv[0]);
+ }
if (arg1) (arg1)->as_decimal32 = arg2;
return Qnil;
fail:
return Qnil;
}
@@ -12934,11 +13162,13 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_decimal32", 1, self ));
}
arg1 = (pn_atom_t_u *)(argp1);
result = (pn_decimal32_t) ((arg1)->as_decimal32);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ {
+ vresult = ULL2NUM(result);
+ }
return vresult;
fail:
return Qnil;
}
@@ -12947,26 +13177,22 @@
_wrap_pn_atom_t_u_as_decimal64_set(int argc, VALUE *argv, VALUE self) {
pn_atom_t_u *arg1 = (pn_atom_t_u *) 0 ;
pn_decimal64_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned long val2 ;
- int ecode2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pn_atom_t_u, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_decimal64", 1, self ));
}
arg1 = (pn_atom_t_u *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2);
- if (!SWIG_IsOK(ecode2)) {
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_decimal64_t","as_decimal64", 2, argv[0] ));
- }
- arg2 = (pn_decimal64_t)(val2);
+ {
+ arg2 = NUM2ULONG(argv[0]);
+ }
if (arg1) (arg1)->as_decimal64 = arg2;
return Qnil;
fail:
return Qnil;
}
@@ -12987,11 +13213,13 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_atom_t_u *","as_decimal64", 1, self ));
}
arg1 = (pn_atom_t_u *)(argp1);
result = (pn_decimal64_t) ((arg1)->as_decimal64);
- vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
+ {
+ vresult = ULL2NUM(result);
+ }
return vresult;
fail:
return Qnil;
}
@@ -14049,11 +14277,11 @@
_wrap_pn_data_put_uint(int argc, VALUE *argv, VALUE self) {
pn_data_t *arg1 = (pn_data_t *) 0 ;
uint32_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned int val2 ;
+ unsigned long val2 ;
int ecode2 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
@@ -14062,11 +14290,11 @@
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_data_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_put_uint", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
+ ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint32_t","pn_data_put_uint", 2, argv[1] ));
}
arg2 = (uint32_t)(val2);
result = (int)pn_data_put_uint(arg1,arg2);
@@ -14081,11 +14309,11 @@
_wrap_pn_data_put_int(int argc, VALUE *argv, VALUE self) {
pn_data_t *arg1 = (pn_data_t *) 0 ;
int32_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- int val2 ;
+ long val2 ;
int ecode2 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
@@ -14094,11 +14322,11 @@
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_data_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_put_int", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
- ecode2 = SWIG_AsVal_int(argv[1], &val2);
+ ecode2 = SWIG_AsVal_long(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int32_t","pn_data_put_int", 2, argv[1] ));
}
arg2 = (int32_t)(val2);
result = (int)pn_data_put_int(arg1,arg2);
@@ -14113,11 +14341,11 @@
_wrap_pn_data_put_char(int argc, VALUE *argv, VALUE self) {
pn_data_t *arg1 = (pn_data_t *) 0 ;
pn_char_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned int val2 ;
+ unsigned long val2 ;
int ecode2 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
@@ -14126,11 +14354,11 @@
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_data_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_put_char", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
+ ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_char_t","pn_data_put_char", 2, argv[1] ));
}
arg2 = (pn_char_t)(val2);
result = (int)pn_data_put_char(arg1,arg2);
@@ -14145,11 +14373,11 @@
_wrap_pn_data_put_ulong(int argc, VALUE *argv, VALUE self) {
pn_data_t *arg1 = (pn_data_t *) 0 ;
uint64_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned long val2 ;
+ unsigned long long val2 ;
int ecode2 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
@@ -14158,11 +14386,11 @@
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_data_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_put_ulong", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2);
+ ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint64_t","pn_data_put_ulong", 2, argv[1] ));
}
arg2 = (uint64_t)(val2);
result = (int)pn_data_put_ulong(arg1,arg2);
@@ -14305,12 +14533,10 @@
_wrap_pn_data_put_decimal32(int argc, VALUE *argv, VALUE self) {
pn_data_t *arg1 = (pn_data_t *) 0 ;
pn_decimal32_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned int val2 ;
- int ecode2 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
@@ -14318,15 +14544,13 @@
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_data_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_put_decimal32", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[1], &val2);
- if (!SWIG_IsOK(ecode2)) {
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_decimal32_t","pn_data_put_decimal32", 2, argv[1] ));
- }
- arg2 = (pn_decimal32_t)(val2);
+ {
+ arg2 = FIX2UINT(argv[1]);
+ }
result = (int)pn_data_put_decimal32(arg1,arg2);
vresult = SWIG_From_int((int)(result));
return vresult;
fail:
return Qnil;
@@ -14337,12 +14561,10 @@
_wrap_pn_data_put_decimal64(int argc, VALUE *argv, VALUE self) {
pn_data_t *arg1 = (pn_data_t *) 0 ;
pn_decimal64_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- unsigned long val2 ;
- int ecode2 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
@@ -14350,15 +14572,13 @@
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_data_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_put_decimal64", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2);
- if (!SWIG_IsOK(ecode2)) {
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_decimal64_t","pn_data_put_decimal64", 2, argv[1] ));
- }
- arg2 = (pn_decimal64_t)(val2);
+ {
+ arg2 = NUM2ULONG(argv[1]);
+ }
result = (int)pn_data_put_decimal64(arg1,arg2);
vresult = SWIG_From_int((int)(result));
return vresult;
fail:
return Qnil;
@@ -14369,12 +14589,10 @@
_wrap_pn_data_put_decimal128(int argc, VALUE *argv, VALUE self) {
pn_data_t *arg1 = (pn_data_t *) 0 ;
pn_decimal128_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- void *argp2 ;
- int res2 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
@@ -14383,18 +14601,16 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_put_decimal128", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
{
- res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_pn_decimal128_t, 0 );
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_decimal128_t","pn_data_put_decimal128", 2, argv[1] ));
- }
- if (!argp2) {
- SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "pn_decimal128_t","pn_data_put_decimal128", 2, argv[1]));
- } else {
- arg2 = *((pn_decimal128_t *)(argp2));
+ int index;
+
+ for(index = 0; index < 16; index++)
+ {
+ VALUE element = rb_ary_entry(argv[1], index);
+ (&arg2)->bytes[16 - (index + 1)] = FIX2INT(element);
}
}
result = (int)pn_data_put_decimal128(arg1,arg2);
vresult = SWIG_From_int((int)(result));
return vresult;
@@ -14407,12 +14623,10 @@
_wrap_pn_data_put_uuid(int argc, VALUE *argv, VALUE self) {
pn_data_t *arg1 = (pn_data_t *) 0 ;
pn_uuid_t arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
- void *argp2 ;
- int res2 = 0 ;
int result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
@@ -14421,18 +14635,16 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_put_uuid", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
{
- res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_pn_uuid_t, 0 );
- if (!SWIG_IsOK(res2)) {
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "pn_uuid_t","pn_data_put_uuid", 2, argv[1] ));
- }
- if (!argp2) {
- SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "pn_uuid_t","pn_data_put_uuid", 2, argv[1]));
- } else {
- arg2 = *((pn_uuid_t *)(argp2));
+ int index;
+
+ for(index = 0; index < 16; index++)
+ {
+ VALUE element = rb_ary_entry(argv[1], index);
+ (&arg2)->bytes[16 - (index + 1)] = FIX2INT(element);
}
}
result = (int)pn_data_put_uuid(arg1,arg2);
vresult = SWIG_From_int((int)(result));
return vresult;
@@ -14463,11 +14675,11 @@
(&arg2)->start = NULL;
(&arg2)->size = 0;
} else {
(&arg2)->start = RSTRING_PTR(argv[1]);
if (!(&arg2)->start) {
- return NULL;
+ (&arg2)->size = 0;
}
(&arg2)->size = RSTRING_LEN(argv[1]);
}
}
result = (int)pn_data_put_binary(arg1,arg2);
@@ -14500,11 +14712,11 @@
(&arg2)->start = NULL;
(&arg2)->size = 0;
} else {
(&arg2)->start = RSTRING_PTR(argv[1]);
if (!(&arg2)->start) {
- return NULL;
+ (&arg2)->size = 0;
}
(&arg2)->size = RSTRING_LEN(argv[1]);
}
}
result = (int)pn_data_put_string(arg1,arg2);
@@ -14537,11 +14749,11 @@
(&arg2)->start = NULL;
(&arg2)->size = 0;
} else {
(&arg2)->start = RSTRING_PTR(argv[1]);
if (!(&arg2)->start) {
- return NULL;
+ (&arg2)->size = 0;
}
(&arg2)->size = RSTRING_LEN(argv[1]);
}
}
result = (int)pn_data_put_symbol(arg1,arg2);
@@ -14930,11 +15142,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_get_uint", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
result = (uint32_t)pn_data_get_uint(arg1);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
return vresult;
fail:
return Qnil;
}
@@ -14954,11 +15166,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_get_int", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
result = (int32_t)pn_data_get_int(arg1);
- vresult = SWIG_From_int((int)(result));
+ vresult = SWIG_From_long((long)(result));
return vresult;
fail:
return Qnil;
}
@@ -14978,11 +15190,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_get_char", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
result = (pn_char_t)pn_data_get_char(arg1);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
return vresult;
fail:
return Qnil;
}
@@ -15002,11 +15214,11 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_get_ulong", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
result = (uint64_t)pn_data_get_ulong(arg1);
- vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
+ vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
return vresult;
fail:
return Qnil;
}
@@ -15122,11 +15334,13 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_get_decimal32", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
result = (pn_decimal32_t)pn_data_get_decimal32(arg1);
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
+ {
+ vresult = ULL2NUM(result);
+ }
return vresult;
fail:
return Qnil;
}
@@ -15146,11 +15360,13 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_get_decimal64", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
result = (pn_decimal64_t)pn_data_get_decimal64(arg1);
- vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
+ {
+ vresult = ULL2NUM(result);
+ }
return vresult;
fail:
return Qnil;
}
@@ -15170,11 +15386,19 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_get_decimal128", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
result = pn_data_get_decimal128(arg1);
- vresult = SWIG_NewPointerObj((pn_decimal128_t *)memcpy((pn_decimal128_t *)malloc(sizeof(pn_decimal128_t)),&result,sizeof(pn_decimal128_t)), SWIGTYPE_p_pn_decimal128_t, SWIG_POINTER_OWN | 0 );
+ {
+ int index;
+
+ vresult = rb_ary_new2(16);
+ for(index = 0; index < 16; index++)
+ {
+ rb_ary_store(vresult, 16 - (index + 1), CHR2FIX((&result)->bytes[index]));
+ }
+ }
return vresult;
fail:
return Qnil;
}
@@ -15194,11 +15418,19 @@
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_get_uuid", 1, argv[0] ));
}
arg1 = (pn_data_t *)(argp1);
result = pn_data_get_uuid(arg1);
- vresult = SWIG_NewPointerObj((pn_uuid_t *)memcpy((pn_uuid_t *)malloc(sizeof(pn_uuid_t)),&result,sizeof(pn_uuid_t)), SWIGTYPE_p_pn_uuid_t, SWIG_POINTER_OWN | 0 );
+ {
+ int index;
+
+ vresult = rb_ary_new2(16);
+ for(index = 0; index < 16; index++)
+ {
+ rb_ary_store(vresult, 16 - (index + 1), CHR2FIX((&result)->bytes[index]));
+ }
+ }
return vresult;
fail:
return Qnil;
}
@@ -15555,11 +15787,12 @@
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_int = {"_p_int", "int *|ssize_t *|int32_t *|pn_state_t *|pn_trace_t *|pn_sequence_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_int = {"_p_int", "int *|ssize_t *|pn_state_t *|pn_trace_t *|pn_socket_t *", 0, 0, (void*)0, 0};
+static swig_type_info _swigt__p_long = {"_p_long", "int32_t *|long *|pn_sequence_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|long long *|pn_tracker_t *|pn_timestamp_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pn_accept_mode_t = {"_p_pn_accept_mode_t", "enum pn_accept_mode_t *|pn_accept_mode_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pn_activate_criteria_t = {"_p_pn_activate_criteria_t", "enum pn_activate_criteria_t *|pn_activate_criteria_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pn_atom_t = {"_p_pn_atom_t", "pn_atom_t *", 0, 0, (void*)0, 0};
@@ -15599,17 +15832,19 @@
static swig_type_info _swigt__p_pn_type_t = {"_p_pn_type_t", "enum pn_type_t *|pn_type_t *", 0, 0, (void*)0, 0};
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", "pn_seconds_t *|pn_decimal32_t *|size_t *|uint32_t *|unsigned int *|pn_millis_t *|pn_char_t *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "pn_decimal64_t *|uint64_t *|unsigned long *", 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 *|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 *swig_type_initial[] = {
&_swigt__p_char,
&_swigt__p_int,
+ &_swigt__p_long,
&_swigt__p_long_long,
&_swigt__p_p_char,
&_swigt__p_pn_accept_mode_t,
&_swigt__p_pn_activate_criteria_t,
&_swigt__p_pn_atom_t,
@@ -15651,15 +15886,17 @@
&_swigt__p_short,
&_swigt__p_signed_char,
&_swigt__p_unsigned_char,
&_swigt__p_unsigned_int,
&_swigt__p_unsigned_long,
+ &_swigt__p_unsigned_long_long,
&_swigt__p_unsigned_short,
};
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pn_accept_mode_t[] = { {&_swigt__p_pn_accept_mode_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pn_activate_criteria_t[] = { {&_swigt__p_pn_activate_criteria_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pn_atom_t[] = { {&_swigt__p_pn_atom_t, 0, 0, 0},{0, 0, 0, 0}};
@@ -15701,15 +15938,17 @@
static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info *swig_cast_initial[] = {
_swigc__p_char,
_swigc__p_int,
+ _swigc__p_long,
_swigc__p_long_long,
_swigc__p_p_char,
_swigc__p_pn_accept_mode_t,
_swigc__p_pn_activate_criteria_t,
_swigc__p_pn_atom_t,
@@ -15751,10 +15990,11 @@
_swigc__p_short,
_swigc__p_signed_char,
_swigc__p_unsigned_char,
_swigc__p_unsigned_int,
_swigc__p_unsigned_long,
+ _swigc__p_unsigned_long_long,
_swigc__p_unsigned_short,
};
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
@@ -16031,10 +16271,11 @@
rb_define_module_function(mCproton, "pn_delivery", _wrap_pn_delivery, -1);
rb_define_module_function(mCproton, "pn_delivery_tag", _wrap_pn_delivery_tag, -1);
rb_define_module_function(mCproton, "pn_message_data", _wrap_pn_message_data, -1);
rb_define_module_function(mCproton, "pn_ssl_get_cipher_name", _wrap_pn_ssl_get_cipher_name, -1);
rb_define_module_function(mCproton, "pn_ssl_get_protocol_name", _wrap_pn_ssl_get_protocol_name, -1);
+ rb_define_const(mCproton, "PROTON_IMPORT_EXPORT_H", SWIG_From_int((int)(1)));
rb_define_const(mCproton, "PROTON_TYPES_H", SWIG_From_int((int)(1)));
SwigClassPn_decimal128_t.klass = rb_define_class_under(mCproton, "Pn_decimal128_t", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_pn_decimal128_t, (void *) &SwigClassPn_decimal128_t);
rb_define_alloc_func(SwigClassPn_decimal128_t.klass, _wrap_pn_decimal128_t_allocate);
@@ -16080,11 +16321,10 @@
rb_define_module_function(mCproton, "pn_code", _wrap_pn_code, -1);
rb_define_module_function(mCproton, "pn_error", _wrap_pn_error, -1);
rb_define_module_function(mCproton, "pn_error_free", _wrap_pn_error_free, -1);
rb_define_module_function(mCproton, "pn_error_clear", _wrap_pn_error_clear, -1);
rb_define_module_function(mCproton, "pn_error_set", _wrap_pn_error_set, -1);
- rb_define_module_function(mCproton, "pn_error_from_errno", _wrap_pn_error_from_errno, -1);
rb_define_module_function(mCproton, "pn_error_code", _wrap_pn_error_code, -1);
rb_define_module_function(mCproton, "pn_error_text", _wrap_pn_error_text, -1);
rb_define_const(mCproton, "PROTON_ENGINE_H", SWIG_From_int((int)(1)));
rb_define_const(mCproton, "PN_UNSPECIFIED", SWIG_From_int((int)(PN_UNSPECIFIED)));
rb_define_const(mCproton, "PN_SOURCE", SWIG_From_int((int)(PN_SOURCE)));
@@ -16155,20 +16395,29 @@
rb_define_module_function(mCproton, "pn_connection_close", _wrap_pn_connection_close, -1);
rb_define_module_function(mCproton, "pn_connection_free", _wrap_pn_connection_free, -1);
rb_define_module_function(mCproton, "pn_connection_get_context", _wrap_pn_connection_get_context, -1);
rb_define_module_function(mCproton, "pn_connection_set_context", _wrap_pn_connection_set_context, -1);
rb_define_module_function(mCproton, "pn_transport_error", _wrap_pn_transport_error, -1);
+ rb_define_module_function(mCproton, "pn_transport_capacity", _wrap_pn_transport_capacity, -1);
+ rb_define_module_function(mCproton, "pn_transport_tail", _wrap_pn_transport_tail, -1);
+ rb_define_module_function(mCproton, "pn_transport_push", _wrap_pn_transport_push, -1);
+ rb_define_module_function(mCproton, "pn_transport_close_tail", _wrap_pn_transport_close_tail, -1);
+ rb_define_module_function(mCproton, "pn_transport_pending", _wrap_pn_transport_pending, -1);
+ rb_define_module_function(mCproton, "pn_transport_head", _wrap_pn_transport_head, -1);
+ rb_define_module_function(mCproton, "pn_transport_pop", _wrap_pn_transport_pop, -1);
+ rb_define_module_function(mCproton, "pn_transport_close_head", _wrap_pn_transport_close_head, -1);
rb_define_module_function(mCproton, "pn_transport_tick", _wrap_pn_transport_tick, -1);
rb_define_module_function(mCproton, "pn_transport_trace", _wrap_pn_transport_trace, -1);
rb_define_module_function(mCproton, "pn_transport_get_max_frame", _wrap_pn_transport_get_max_frame, -1);
rb_define_module_function(mCproton, "pn_transport_set_max_frame", _wrap_pn_transport_set_max_frame, -1);
rb_define_module_function(mCproton, "pn_transport_get_remote_max_frame", _wrap_pn_transport_get_remote_max_frame, -1);
rb_define_module_function(mCproton, "pn_transport_get_idle_timeout", _wrap_pn_transport_get_idle_timeout, -1);
rb_define_module_function(mCproton, "pn_transport_set_idle_timeout", _wrap_pn_transport_set_idle_timeout, -1);
rb_define_module_function(mCproton, "pn_transport_get_remote_idle_timeout", _wrap_pn_transport_get_remote_idle_timeout, -1);
rb_define_module_function(mCproton, "pn_transport_get_frames_output", _wrap_pn_transport_get_frames_output, -1);
rb_define_module_function(mCproton, "pn_transport_get_frames_input", _wrap_pn_transport_get_frames_input, -1);
+ rb_define_module_function(mCproton, "pn_transport_quiesced", _wrap_pn_transport_quiesced, -1);
rb_define_module_function(mCproton, "pn_transport_free", _wrap_pn_transport_free, -1);
rb_define_module_function(mCproton, "pn_session_state", _wrap_pn_session_state, -1);
rb_define_module_function(mCproton, "pn_session_error", _wrap_pn_session_error, -1);
rb_define_module_function(mCproton, "pn_session_connection", _wrap_pn_session_connection, -1);
rb_define_module_function(mCproton, "pn_session_open", _wrap_pn_session_open, -1);
@@ -16346,21 +16595,19 @@
rb_define_module_function(mCproton, "pn_driver_wait", _wrap_pn_driver_wait, -1);
rb_define_module_function(mCproton, "pn_driver_listener", _wrap_pn_driver_listener, -1);
rb_define_module_function(mCproton, "pn_driver_connector", _wrap_pn_driver_connector, -1);
rb_define_module_function(mCproton, "pn_driver_free", _wrap_pn_driver_free, -1);
rb_define_module_function(mCproton, "pn_listener", _wrap_pn_listener, -1);
- rb_define_module_function(mCproton, "pn_listener_fd", _wrap_pn_listener_fd, -1);
rb_define_module_function(mCproton, "pn_listener_head", _wrap_pn_listener_head, -1);
rb_define_module_function(mCproton, "pn_listener_next", _wrap_pn_listener_next, -1);
rb_define_module_function(mCproton, "pn_listener_trace", _wrap_pn_listener_trace, -1);
rb_define_module_function(mCproton, "pn_listener_accept", _wrap_pn_listener_accept, -1);
rb_define_module_function(mCproton, "pn_listener_context", _wrap_pn_listener_context, -1);
rb_define_module_function(mCproton, "pn_listener_set_context", _wrap_pn_listener_set_context, -1);
rb_define_module_function(mCproton, "pn_listener_close", _wrap_pn_listener_close, -1);
rb_define_module_function(mCproton, "pn_listener_free", _wrap_pn_listener_free, -1);
rb_define_module_function(mCproton, "pn_connector", _wrap_pn_connector, -1);
- rb_define_module_function(mCproton, "pn_connector_fd", _wrap_pn_connector_fd, -1);
rb_define_module_function(mCproton, "pn_connector_head", _wrap_pn_connector_head, -1);
rb_define_module_function(mCproton, "pn_connector_next", _wrap_pn_connector_next, -1);
rb_define_module_function(mCproton, "pn_connector_trace", _wrap_pn_connector_trace, -1);
rb_define_module_function(mCproton, "pn_connector_process", _wrap_pn_connector_process, -1);
rb_define_module_function(mCproton, "pn_connector_listener", _wrap_pn_connector_listener, -1);
@@ -16373,10 +16620,13 @@
rb_define_module_function(mCproton, "pn_connector_close", _wrap_pn_connector_close, -1);
rb_define_module_function(mCproton, "pn_connector_closed", _wrap_pn_connector_closed, -1);
rb_define_module_function(mCproton, "pn_connector_free", _wrap_pn_connector_free, -1);
rb_define_module_function(mCproton, "pn_connector_activate", _wrap_pn_connector_activate, -1);
rb_define_module_function(mCproton, "pn_connector_activated", _wrap_pn_connector_activated, -1);
+ rb_define_const(mCproton, "PROTON_DRIVER_H_EXTRAS", SWIG_From_int((int)(1)));
+ rb_define_module_function(mCproton, "pn_listener_fd", _wrap_pn_listener_fd, -1);
+ rb_define_module_function(mCproton, "pn_connector_fd", _wrap_pn_connector_fd, -1);
rb_define_const(mCproton, "PROTON_MESSENGER_H", SWIG_From_int((int)(1)));
rb_define_const(mCproton, "PN_ACCEPT_MODE_AUTO", SWIG_From_int((int)(PN_ACCEPT_MODE_AUTO)));
rb_define_const(mCproton, "PN_ACCEPT_MODE_MANUAL", SWIG_From_int((int)(PN_ACCEPT_MODE_MANUAL)));
rb_define_const(mCproton, "PN_STATUS_UNKNOWN", SWIG_From_int((int)(PN_STATUS_UNKNOWN)));
rb_define_const(mCproton, "PN_STATUS_PENDING", SWIG_From_int((int)(PN_STATUS_PENDING)));
@@ -16467,9 +16717,10 @@
rb_define_const(mCproton, "PN_SYMBOL", SWIG_From_int((int)(PN_SYMBOL)));
rb_define_const(mCproton, "PN_DESCRIBED", SWIG_From_int((int)(PN_DESCRIBED)));
rb_define_const(mCproton, "PN_ARRAY", SWIG_From_int((int)(PN_ARRAY)));
rb_define_const(mCproton, "PN_LIST", SWIG_From_int((int)(PN_LIST)));
rb_define_const(mCproton, "PN_MAP", SWIG_From_int((int)(PN_MAP)));
+ rb_define_module_function(mCproton, "pn_type_name", _wrap_pn_type_name, -1);
SwigClassPn_atom_t.klass = rb_define_class_under(mCproton, "Pn_atom_t", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_pn_atom_t, (void *) &SwigClassPn_atom_t);
rb_define_alloc_func(SwigClassPn_atom_t.klass, _wrap_pn_atom_t_allocate);
rb_define_method(SwigClassPn_atom_t.klass, "initialize", _wrap_new_pn_atom_t, -1);