jiridanek commented on a change in pull request #309:
URL: https://github.com/apache/qpid-proton/pull/309#discussion_r612580842



##########
File path: cpp/src/delivery.cpp
##########
@@ -40,6 +42,7 @@ namespace proton {
 
 delivery::delivery(pn_delivery_t* d): transfer(make_wrapper(d)) {}
 receiver delivery::receiver() const { return make_wrapper<class 
receiver>(pn_delivery_link(pn_object())); }
+tag delivery::tag() const { return make_wrapper<class 
tag>(pn_delivery_tag(pn_object())); }

Review comment:
       @ssorj I think I now see what you meant, the `pn_delivery_tag` is a type 
alias for `pn_bytes_t`, and the reasonable types for in in C++ are std::string 
or std::vector<uint8>. So, one of the two following functions should be used 
instead of `make_wrapper`
   
   
https://github.com/apache/qpid-proton/blob/8ddf5399013b02f1fd13bda3fee7886bd48a98be/cpp/src/types_internal.hpp#L58-L59
   
   Both make a copy of the data, which simplifies things.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to