Ok so then the following code:
const char *op;
pn_data_put_string(content, pn_bytes(strlen(op), op));
Gives me an error:
error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
pn_data_put_string(content, pn_bytes(strlen(op), op));
If I use pn_bytes_dup instead, a
I just pushed a quick update of the docs that will hopefully make this
clear, but pn_data_get_string (and similar) copies the bytes passed to it
into an internal area inside the pn_data_t. The converse,
pn_data_get_string(...) returns a pointer to the internal bytes, so those
need to be copied if y
Greetings!
I need to confirm a point about pn_data_put_string usage. Second argument is
pn_bytes_t which contains pointer to text buffer and actual length of the string
in bytes. When this value is assigned to data node does it mean that the
ownership
of the string buffer is transfered to data ob