Oipo commented on a change in pull request #186: Cleanup dm interface
URL: https://github.com/apache/celix/pull/186#discussion_r403953734
 
 

 ##########
 File path: libs/framework/include/celix/dm/Component.h
 ##########
 @@ -232,17 +232,29 @@ namespace celix { namespace dm {
          * @return the DM Component reference for chaining (fluent API)
          */
         Component<T>& setCallbacks(
-            int (T::*init)(),
-            int (T::*start)(),
-            int (T::*stop)(),
-            int (T::*deinit)()
+                int (T::*init)(),
+                int (T::*start)(),
+                int (T::*stop)(),
+                int (T::*deinit)()
         );
         /**
          * Remove the previously registered callbacks for the component life 
cycle control
          *
          * @return the DM Component reference for chaining (fluent API)
          */
         Component<T>& removeCallbacks();
+
+        /**
+         * Safely copies a std::string into a char* buffer
+         * @param input string to copy
+         * @param dst buffer to allocate into, owner is responsible for 
freeing memory
+         */
+        void copyString(const std::string& input, char **dst)
 
 Review comment:
   Everywhere ownership is transferred yes, but now that I think about it, the 
properties_set function copies and doesn't transfer ownership. Therefore it is 
not needed here at all.

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

Reply via email to