BewareMyPower commented on code in PR #285:
URL: https://github.com/apache/pulsar-client-cpp/pull/285#discussion_r1235190932


##########
include/pulsar/c/message.h:
##########
@@ -33,6 +33,15 @@ typedef struct _pulsar_message pulsar_message_t;
 typedef struct _pulsar_message_id pulsar_message_id_t;
 
 PULSAR_PUBLIC pulsar_message_t *pulsar_message_create();
+/**
+ * Copy the contents of one pulsar_message_t object to another.
+ *
+ * Note: This method is a shallow copy, which will copy the pulsar::Message.
+ *
+ * @param from  A pointer to the pulsar_message_t object that you want to copy 
from
+ * @param to  A pointer to the pulsar_message_t object that you want to copy to
+ */
+PULSAR_PUBLIC void pulsar_message_copy(pulsar_message_t *from, 
pulsar_message_t *to);

Review Comment:
   ```suggestion
   PULSAR_PUBLIC void pulsar_message_copy(const pulsar_message_t *from, 
pulsar_message_t *to);
   ```
   
   Use `const` to indicate the object that `from` points to won't change



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to