astitcher commented on a change in pull request #213: PROTON-2140: Lazy 
creation of various link related objects
URL: https://github.com/apache/qpid-proton/pull/213#discussion_r349288274
 
 

 ##########
 File path: c/src/core/codec.c
 ##########
 @@ -465,6 +503,9 @@ static int pni_data_intern_node(pn_data_t *data, 
pni_node_t *node)
 {
   pn_bytes_t *bytes = pni_data_bytes(data, node);
   if (!bytes) return 0;
+  if (data->buf == NULL) {
+    data->buf = pn_buffer(64);
 
 Review comment:
   Actually here we know that the size of data to be interned is going to be 
`bytes->size` so we can initialise to that size exactly (or maybe size+64 to 
allow for other interned data).

----------------------------------------------------------------
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]


With regards,
Apache Git Services

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

Reply via email to