ext/cproton/cproton.c in qpid_proton-0.19.0 vs ext/cproton/cproton.c in qpid_proton-0.21.0
- old
+ new
@@ -1811,77 +1811,78 @@
#define SWIGTYPE_p_int swig_types[8]
#define SWIGTYPE_p_intptr_t swig_types[9]
#define SWIGTYPE_p_long swig_types[10]
#define SWIGTYPE_p_long_long swig_types[11]
#define SWIGTYPE_p_p_char swig_types[12]
-#define SWIGTYPE_p_pn_acceptor_t swig_types[13]
-#define SWIGTYPE_p_pn_atom_t swig_types[14]
-#define SWIGTYPE_p_pn_bytes_t swig_types[15]
-#define SWIGTYPE_p_pn_cid_t swig_types[16]
-#define SWIGTYPE_p_pn_class_t swig_types[17]
-#define SWIGTYPE_p_pn_collector_t swig_types[18]
-#define SWIGTYPE_p_pn_condition_t swig_types[19]
-#define SWIGTYPE_p_pn_connection_driver_t swig_types[20]
-#define SWIGTYPE_p_pn_connection_t swig_types[21]
-#define SWIGTYPE_p_pn_data_t swig_types[22]
-#define SWIGTYPE_p_pn_decimal128_t swig_types[23]
-#define SWIGTYPE_p_pn_delivery_t swig_types[24]
-#define SWIGTYPE_p_pn_disposition_t swig_types[25]
-#define SWIGTYPE_p_pn_distribution_mode_t swig_types[26]
-#define SWIGTYPE_p_pn_durability_t swig_types[27]
-#define SWIGTYPE_p_pn_error_t swig_types[28]
-#define SWIGTYPE_p_pn_event_batch_t swig_types[29]
-#define SWIGTYPE_p_pn_event_t swig_types[30]
-#define SWIGTYPE_p_pn_event_type_t swig_types[31]
-#define SWIGTYPE_p_pn_expiry_policy_t swig_types[32]
-#define SWIGTYPE_p_pn_handler_t swig_types[33]
-#define SWIGTYPE_p_pn_hash_t swig_types[34]
-#define SWIGTYPE_p_pn_iterator_t swig_types[35]
-#define SWIGTYPE_p_pn_link_t swig_types[36]
-#define SWIGTYPE_p_pn_list_t swig_types[37]
-#define SWIGTYPE_p_pn_listener_t swig_types[38]
-#define SWIGTYPE_p_pn_map_t swig_types[39]
-#define SWIGTYPE_p_pn_message_t swig_types[40]
-#define SWIGTYPE_p_pn_messenger_t swig_types[41]
-#define SWIGTYPE_p_pn_proactor_t swig_types[42]
-#define SWIGTYPE_p_pn_rcv_settle_mode_t swig_types[43]
-#define SWIGTYPE_p_pn_reactor_t swig_types[44]
-#define SWIGTYPE_p_pn_record_t swig_types[45]
-#define SWIGTYPE_p_pn_rwbytes_t swig_types[46]
-#define SWIGTYPE_p_pn_sasl_outcome_t swig_types[47]
-#define SWIGTYPE_p_pn_sasl_t swig_types[48]
-#define SWIGTYPE_p_pn_selectable_t swig_types[49]
-#define SWIGTYPE_p_pn_session_t swig_types[50]
-#define SWIGTYPE_p_pn_snd_settle_mode_t swig_types[51]
-#define SWIGTYPE_p_pn_ssl_cert_subject_subfield swig_types[52]
-#define SWIGTYPE_p_pn_ssl_domain_t swig_types[53]
-#define SWIGTYPE_p_pn_ssl_hash_alg swig_types[54]
-#define SWIGTYPE_p_pn_ssl_mode_t swig_types[55]
-#define SWIGTYPE_p_pn_ssl_resume_status_t swig_types[56]
-#define SWIGTYPE_p_pn_ssl_t swig_types[57]
-#define SWIGTYPE_p_pn_ssl_verify_mode_t swig_types[58]
-#define SWIGTYPE_p_pn_status_t swig_types[59]
-#define SWIGTYPE_p_pn_string_t swig_types[60]
-#define SWIGTYPE_p_pn_subscription_t swig_types[61]
-#define SWIGTYPE_p_pn_task_t swig_types[62]
-#define SWIGTYPE_p_pn_terminus_t swig_types[63]
-#define SWIGTYPE_p_pn_terminus_type_t swig_types[64]
-#define SWIGTYPE_p_pn_timer_t swig_types[65]
-#define SWIGTYPE_p_pn_transport_t swig_types[66]
-#define SWIGTYPE_p_pn_type_t swig_types[67]
-#define SWIGTYPE_p_pn_url_t swig_types[68]
-#define SWIGTYPE_p_pn_uuid_t swig_types[69]
-#define SWIGTYPE_p_short swig_types[70]
-#define SWIGTYPE_p_signed_char swig_types[71]
-#define SWIGTYPE_p_unsigned_char swig_types[72]
-#define SWIGTYPE_p_unsigned_int swig_types[73]
-#define SWIGTYPE_p_unsigned_long swig_types[74]
-#define SWIGTYPE_p_unsigned_long_long swig_types[75]
-#define SWIGTYPE_p_unsigned_short swig_types[76]
-#define SWIGTYPE_p_void swig_types[77]
-static swig_type_info *swig_types[79];
-static swig_module_info swig_module = {swig_types, 78, 0, 0, 0, 0};
+#define SWIGTYPE_p_p_pn_connection_driver_t swig_types[13]
+#define SWIGTYPE_p_pn_acceptor_t swig_types[14]
+#define SWIGTYPE_p_pn_atom_t swig_types[15]
+#define SWIGTYPE_p_pn_bytes_t swig_types[16]
+#define SWIGTYPE_p_pn_cid_t swig_types[17]
+#define SWIGTYPE_p_pn_class_t swig_types[18]
+#define SWIGTYPE_p_pn_collector_t swig_types[19]
+#define SWIGTYPE_p_pn_condition_t swig_types[20]
+#define SWIGTYPE_p_pn_connection_driver_t swig_types[21]
+#define SWIGTYPE_p_pn_connection_t swig_types[22]
+#define SWIGTYPE_p_pn_data_t swig_types[23]
+#define SWIGTYPE_p_pn_decimal128_t swig_types[24]
+#define SWIGTYPE_p_pn_delivery_t swig_types[25]
+#define SWIGTYPE_p_pn_disposition_t swig_types[26]
+#define SWIGTYPE_p_pn_distribution_mode_t swig_types[27]
+#define SWIGTYPE_p_pn_durability_t swig_types[28]
+#define SWIGTYPE_p_pn_error_t swig_types[29]
+#define SWIGTYPE_p_pn_event_batch_t swig_types[30]
+#define SWIGTYPE_p_pn_event_t swig_types[31]
+#define SWIGTYPE_p_pn_event_type_t swig_types[32]
+#define SWIGTYPE_p_pn_expiry_policy_t swig_types[33]
+#define SWIGTYPE_p_pn_handler_t swig_types[34]
+#define SWIGTYPE_p_pn_hash_t swig_types[35]
+#define SWIGTYPE_p_pn_iterator_t swig_types[36]
+#define SWIGTYPE_p_pn_link_t swig_types[37]
+#define SWIGTYPE_p_pn_list_t swig_types[38]
+#define SWIGTYPE_p_pn_listener_t swig_types[39]
+#define SWIGTYPE_p_pn_map_t swig_types[40]
+#define SWIGTYPE_p_pn_message_t swig_types[41]
+#define SWIGTYPE_p_pn_messenger_t swig_types[42]
+#define SWIGTYPE_p_pn_proactor_t swig_types[43]
+#define SWIGTYPE_p_pn_rcv_settle_mode_t swig_types[44]
+#define SWIGTYPE_p_pn_reactor_t swig_types[45]
+#define SWIGTYPE_p_pn_record_t swig_types[46]
+#define SWIGTYPE_p_pn_rwbytes_t swig_types[47]
+#define SWIGTYPE_p_pn_sasl_outcome_t swig_types[48]
+#define SWIGTYPE_p_pn_sasl_t swig_types[49]
+#define SWIGTYPE_p_pn_selectable_t swig_types[50]
+#define SWIGTYPE_p_pn_session_t swig_types[51]
+#define SWIGTYPE_p_pn_snd_settle_mode_t swig_types[52]
+#define SWIGTYPE_p_pn_ssl_cert_subject_subfield swig_types[53]
+#define SWIGTYPE_p_pn_ssl_domain_t swig_types[54]
+#define SWIGTYPE_p_pn_ssl_hash_alg swig_types[55]
+#define SWIGTYPE_p_pn_ssl_mode_t swig_types[56]
+#define SWIGTYPE_p_pn_ssl_resume_status_t swig_types[57]
+#define SWIGTYPE_p_pn_ssl_t swig_types[58]
+#define SWIGTYPE_p_pn_ssl_verify_mode_t swig_types[59]
+#define SWIGTYPE_p_pn_status_t swig_types[60]
+#define SWIGTYPE_p_pn_string_t swig_types[61]
+#define SWIGTYPE_p_pn_subscription_t swig_types[62]
+#define SWIGTYPE_p_pn_task_t swig_types[63]
+#define SWIGTYPE_p_pn_terminus_t swig_types[64]
+#define SWIGTYPE_p_pn_terminus_type_t swig_types[65]
+#define SWIGTYPE_p_pn_timer_t swig_types[66]
+#define SWIGTYPE_p_pn_transport_t swig_types[67]
+#define SWIGTYPE_p_pn_type_t swig_types[68]
+#define SWIGTYPE_p_pn_url_t swig_types[69]
+#define SWIGTYPE_p_pn_uuid_t swig_types[70]
+#define SWIGTYPE_p_short swig_types[71]
+#define SWIGTYPE_p_signed_char swig_types[72]
+#define SWIGTYPE_p_unsigned_char swig_types[73]
+#define SWIGTYPE_p_unsigned_int swig_types[74]
+#define SWIGTYPE_p_unsigned_long swig_types[75]
+#define SWIGTYPE_p_unsigned_long_long swig_types[76]
+#define SWIGTYPE_p_unsigned_short swig_types[77]
+#define SWIGTYPE_p_void swig_types[78]
+static swig_type_info *swig_types[80];
+static swig_module_info swig_module = {swig_types, 79, 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) -------- */
@@ -2158,24 +2159,25 @@
{
return value ? Qtrue : Qfalse;
}
-#if defined(RUBY20) || defined(RUBY21)
+#if defined(RUBY_USE_rb_thread_call_without_gvl)
+ #include <ruby/thread.h>
typedef void *non_blocking_return_t;
-#define RB_BLOCKING_CALL rb_thread_call_without_gvl
+ #define RB_BLOCKING_CALL (VALUE)rb_thread_call_without_gvl
-#elif defined(RUBY19)
+#elif defined(RUBY_USE_rb_thread_blocking_region)
- typedef VALUE non_blocking_return_t;
-#define RB_BLOCKING_CALL rb_thread_blocking_region
+ typedef VALUE non_blocking_return_t;
+ #define RB_BLOCKING_CALL rb_thread_blocking_region
#endif
-
+
#if defined(RB_BLOCKING_CALL)
static non_blocking_return_t pn_messenger_send_no_gvl(void *args) {
VALUE result = Qnil;
pn_messenger_t *messenger = (pn_messenger_t *)((void **)args)[0];
@@ -21142,10 +21144,34 @@
return Qnil;
}
SWIGINTERN VALUE
+_wrap_pn_connection_driver_ptr(int argc, VALUE *argv, VALUE self) {
+ pn_connection_t *arg1 = (pn_connection_t *) 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ pn_connection_driver_t **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_connection_t, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_connection_t *","pn_connection_driver_ptr", 1, argv[0] ));
+ }
+ arg1 = (pn_connection_t *)(argp1);
+ result = (pn_connection_driver_t **)pn_connection_driver_ptr(arg1);
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_pn_connection_driver_t, 0 | 0 );
+ return vresult;
+fail:
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
_wrap_pn_url(int argc, VALUE *argv, VALUE self) {
pn_url_t *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
@@ -23068,10 +23094,11 @@
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_intptr_t = {"_p_intptr_t", "intptr_t *|pn_shandle_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_p_pn_connection_driver_t = {"_p_p_pn_connection_driver_t", "struct pn_connection_driver_t **|pn_connection_driver_t **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pn_acceptor_t = {"_p_pn_acceptor_t", "struct pn_acceptor_t *|pn_acceptor_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};
static swig_type_info _swigt__p_pn_bytes_t = {"_p_pn_bytes_t", "struct pn_bytes_t *|pn_bytes_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pn_cid_t = {"_p_pn_cid_t", "enum pn_cid_t *|pn_cid_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pn_class_t = {"_p_pn_class_t", "struct pn_class_t *|pn_class_t *", 0, 0, (void*)0, 0};
@@ -23148,10 +23175,11 @@
&_swigt__p_int,
&_swigt__p_intptr_t,
&_swigt__p_long,
&_swigt__p_long_long,
&_swigt__p_p_char,
+ &_swigt__p_p_pn_connection_driver_t,
&_swigt__p_pn_acceptor_t,
&_swigt__p_pn_atom_t,
&_swigt__p_pn_bytes_t,
&_swigt__p_pn_cid_t,
&_swigt__p_pn_class_t,
@@ -23228,10 +23256,11 @@
static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_intptr_t[] = { {&_swigt__p_intptr_t, 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_p_pn_connection_driver_t[] = { {&_swigt__p_p_pn_connection_driver_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pn_acceptor_t[] = { {&_swigt__p_pn_acceptor_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}};
static swig_cast_info _swigc__p_pn_bytes_t[] = { {&_swigt__p_pn_bytes_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pn_cid_t[] = { {&_swigt__p_pn_cid_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pn_class_t[] = { {&_swigt__p_pn_class_t, 0, 0, 0},{0, 0, 0, 0}};
@@ -23308,10 +23337,11 @@
_swigc__p_int,
_swigc__p_intptr_t,
_swigc__p_long,
_swigc__p_long_long,
_swigc__p_p_char,
+ _swigc__p_p_pn_connection_driver_t,
_swigc__p_pn_acceptor_t,
_swigc__p_pn_atom_t,
_swigc__p_pn_bytes_t,
_swigc__p_pn_cid_t,
_swigc__p_pn_class_t,
@@ -23679,11 +23709,11 @@
rb_define_module_function(mCproton, "pni_connection_driver_transport", _wrap_pni_connection_driver_transport, -1);
rb_define_module_function(mCproton, "pni_connection_driver_read_copy", _wrap_pni_connection_driver_read_copy, -1);
rb_define_module_function(mCproton, "pni_connection_driver", _wrap_pni_connection_driver, -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)(19)));
+ rb_define_const(mCproton, "PN_VERSION_MINOR", SWIG_From_int((int)(21)));
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_bytes", _wrap_pn_bytes, -1);
rb_define_singleton_method(mCproton, "pn_bytes_null", _wrap_pn_bytes_null_get, 0);
@@ -24485,9 +24515,10 @@
rb_define_module_function(mCproton, "pn_connection_driver_has_event", _wrap_pn_connection_driver_has_event, -1);
rb_define_module_function(mCproton, "pn_connection_driver_finished", _wrap_pn_connection_driver_finished, -1);
rb_define_module_function(mCproton, "pn_connection_driver_errorf", _wrap_pn_connection_driver_errorf, -1);
rb_define_module_function(mCproton, "pn_event_batch_connection_driver", _wrap_pn_event_batch_connection_driver, -1);
rb_define_module_function(mCproton, "pn_connection_driver_log", _wrap_pn_connection_driver_log, -1);
+ rb_define_module_function(mCproton, "pn_connection_driver_ptr", _wrap_pn_connection_driver_ptr, -1);
rb_define_const(mCproton, "PROTON_URL_H", SWIG_From_int((int)(1)));
rb_define_module_function(mCproton, "pn_url", _wrap_pn_url, -1);
rb_define_module_function(mCproton, "pn_url_parse", _wrap_pn_url_parse, -1);
rb_define_module_function(mCproton, "pn_url_free", _wrap_pn_url_free, -1);
rb_define_module_function(mCproton, "pn_url_clear", _wrap_pn_url_clear, -1);