src/message.h
branchENGINE-423
changeset 2615 5cd3625e0d91
parent 2388 40cadfd425bb
child 3135 c416e2da72bb
     1.1 --- a/src/message.h	Thu Apr 19 09:38:52 2018 +0200
     1.2 +++ b/src/message.h	Thu Apr 19 16:03:44 2018 +0200
     1.3 @@ -114,6 +114,20 @@
     1.4  
     1.5  DYNAMIC_API message * message_dup(const message *msg);
     1.6  
     1.7 +// message_transfer - assign ownership of all fields of the src message to
     1.8 +//                    the dst message object passed in. Free respective memory
     1.9 +//                    in the dst message, and reinitialise and pointers in 
    1.10 +//                    the src message to NULL so that it can be freed properly
    1.11 +//                    by its owner.
    1.12 +//  parameters:
    1.13 +//      dst (inout)        message to clobber and reassign values to
    1.14 +//      src (inout)        message whose values will be transfered to dst
    1.15 +//  NOTA BENE:
    1.16 +//      not owned pointees (msg->rawmsg_ref and msg->refering_msg_ref) are shared!
    1.17 +//      these are simply transferred.
    1.18 +DYNAMIC_API void message_transfer(message* dst, message *src);
    1.19 +
    1.20 +
    1.21  // new_message_ref_list() - allocate new message reference list
    1.22  //
    1.23  //  parameters: