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 it in C++ are either
std::string or std::vector<uint8> (or Proton's `binary`). 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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]