Repository: qpid-proton
Updated Branches:
  refs/heads/master fc66f4c44 -> 99df0a33d


alias pn_delivery_tag_t to pn_bytes_t


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/081336f2
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/081336f2
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/081336f2

Branch: refs/heads/master
Commit: 081336f24c62253d2ea702ffb43235a2afa75771
Parents: fc66f4c
Author: Rafael Schloming <[email protected]>
Authored: Tue Jan 13 14:23:22 2015 -0500
Committer: Rafael Schloming <[email protected]>
Committed: Tue Jan 13 14:27:35 2015 -0500

----------------------------------------------------------------------
 proton-c/bindings/perl/perl.i      | 2 +-
 proton-c/bindings/php/php.i        | 2 +-
 proton-c/bindings/python/cproton.i | 2 +-
 proton-c/bindings/ruby/ruby.i      | 2 +-
 proton-c/include/proton/delivery.h | 5 +----
 proton-c/src/engine/engine.c       | 2 +-
 proton-c/src/proton.c              | 4 ++--
 7 files changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/081336f2/proton-c/bindings/perl/perl.i
----------------------------------------------------------------------
diff --git a/proton-c/bindings/perl/perl.i b/proton-c/bindings/perl/perl.i
index 40e6fa6..a8e069a 100644
--- a/proton-c/bindings/perl/perl.i
+++ b/proton-c/bindings/perl/perl.i
@@ -237,7 +237,7 @@ ssize_t pn_transport_input(pn_transport_t *transport, char 
*STRING, size_t LENGT
     pn_delivery_tag_t tag = pn_delivery_tag(delivery);
     *ALLOC_OUTPUT = malloc(tag.size);
     *ALLOC_SIZE = tag.size;
-    memcpy(*ALLOC_OUTPUT, tag.bytes, tag.size);
+    memcpy(*ALLOC_OUTPUT, tag.start, tag.size);
   }
 %}
 %ignore pn_delivery_tag;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/081336f2/proton-c/bindings/php/php.i
----------------------------------------------------------------------
diff --git a/proton-c/bindings/php/php.i b/proton-c/bindings/php/php.i
index 7225f5e..d6d3bc6 100644
--- a/proton-c/bindings/php/php.i
+++ b/proton-c/bindings/php/php.i
@@ -243,7 +243,7 @@ ssize_t pn_sasl_send(pn_sasl_t *sasl, char *STRING, size_t 
LENGTH);
 %inline %{
     void wrap_pn_delivery_tag(pn_delivery_t *d, const char **RETURN_STRING, 
size_t *RETURN_LEN) {
         pn_delivery_tag_t tag = pn_delivery_tag(d);
-        *RETURN_STRING = tag.bytes;
+        *RETURN_STRING = tag.start;
         *RETURN_LEN = tag.size;
     }
 %}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/081336f2/proton-c/bindings/python/cproton.i
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/cproton.i 
b/proton-c/bindings/python/cproton.i
index f754ca4..6eccd88 100644
--- a/proton-c/bindings/python/cproton.i
+++ b/proton-c/bindings/python/cproton.i
@@ -168,7 +168,7 @@ ssize_t pn_transport_push(pn_transport_t *transport, char 
*STRING, size_t LENGTH
     pn_delivery_tag_t tag = pn_delivery_tag(delivery);
     *ALLOC_OUTPUT = (char *) malloc(tag.size);
     *ALLOC_SIZE = tag.size;
-    memcpy(*ALLOC_OUTPUT, tag.bytes, tag.size);
+    memcpy(*ALLOC_OUTPUT, tag.start, tag.size);
   }
 %}
 %ignore pn_delivery_tag;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/081336f2/proton-c/bindings/ruby/ruby.i
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/ruby.i b/proton-c/bindings/ruby/ruby.i
index 788a9c6..9fecbb1 100644
--- a/proton-c/bindings/ruby/ruby.i
+++ b/proton-c/bindings/ruby/ruby.i
@@ -321,7 +321,7 @@ ssize_t pn_transport_input(pn_transport_t *transport, char 
*STRING, size_t LENGT
     pn_delivery_tag_t tag = pn_delivery_tag(delivery);
     *ALLOC_OUTPUT = malloc(tag.size);
     *ALLOC_SIZE = tag.size;
-    memcpy(*ALLOC_OUTPUT, tag.bytes, tag.size);
+    memcpy(*ALLOC_OUTPUT, tag.start, tag.size);
   }
 %}
 %ignore pn_delivery_tag;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/081336f2/proton-c/include/proton/delivery.h
----------------------------------------------------------------------
diff --git a/proton-c/include/proton/delivery.h 
b/proton-c/include/proton/delivery.h
index be75653..f040f86 100644
--- a/proton-c/include/proton/delivery.h
+++ b/proton-c/include/proton/delivery.h
@@ -45,10 +45,7 @@ extern "C" {
 /**
  * An AMQP delivery tag.
  */
-typedef struct pn_delivery_tag_t {
-  size_t size;
-  const char *bytes;
-} pn_delivery_tag_t;
+typedef pn_bytes_t pn_delivery_tag_t;
 
 #ifndef SWIG  // older versions of SWIG choke on this:
 /**

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/081336f2/proton-c/src/engine/engine.c
----------------------------------------------------------------------
diff --git a/proton-c/src/engine/engine.c b/proton-c/src/engine/engine.c
index 594e4b9..896fe0d 100644
--- a/proton-c/src/engine/engine.c
+++ b/proton-c/src/engine/engine.c
@@ -1457,7 +1457,7 @@ pn_delivery_t *pn_delivery(pn_link_t *link, 
pn_delivery_tag_t tag)
   delivery->link = link;
   pn_incref(delivery->link);  // keep link until finalized
   pn_buffer_clear(delivery->tag);
-  pn_buffer_append(delivery->tag, tag.bytes, tag.size);
+  pn_buffer_append(delivery->tag, tag.start, tag.size);
   pn_disposition_clear(&delivery->local);
   pn_disposition_clear(&delivery->remote);
   delivery->updated = false;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/081336f2/proton-c/src/proton.c
----------------------------------------------------------------------
diff --git a/proton-c/src/proton.c b/proton-c/src/proton.c
index 013a7ca..fbef36d 100644
--- a/proton-c/src/proton.c
+++ b/proton-c/src/proton.c
@@ -196,7 +196,7 @@ void server_callback(pn_connector_t *ctor)
   while (delivery)
   {
     pn_delivery_tag_t tag = pn_delivery_tag(delivery);
-    pn_quote_data(tagstr, 1024, tag.bytes, tag.size);
+    pn_quote_data(tagstr, 1024, tag.start, tag.size);
     pn_link_t *link = pn_delivery_link(delivery);
     if (pn_delivery_readable(delivery)) {
       if (!ctx->quiet) {
@@ -349,7 +349,7 @@ void client_callback(pn_connector_t *ctor)
   while (delivery)
   {
     pn_delivery_tag_t tag = pn_delivery_tag(delivery);
-    pn_quote_data(tagstr, 1024, tag.bytes, tag.size);
+    pn_quote_data(tagstr, 1024, tag.start, tag.size);
     pn_link_t *link = pn_delivery_link(delivery);
     if (pn_delivery_writable(delivery)) {
       pn_link_send(link, data, ndata);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to