Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/417#discussion_r225496575
  
    --- Diff: libminifi/src/capi/api.cpp ---
    @@ -212,7 +214,7 @@ void free_flowfile(flow_file_record *ff) {
      * @param size size of value
      * @return 0 or -1 based on whether the attributed existed previously (-1) 
or not (0)
      */
    -uint8_t add_attribute(flow_file_record *ff, char *key, void *value, size_t 
size) {
    +uint8_t add_attribute(flow_file_record *ff, const char *key, void *value, 
size_t size) {
    --- End diff --
    
    To give you some perspective these functions and as someone who did a lot 
of C where non-const pointers indicated that function would take ownership of 
that pointer  -- that was the intent here and in other places especially once 
we moved to C for the API internally. Since we are have released I would not 
change any current functions from char to const char until 1.0 ( we can talk 
about making this release 1.0 ) -- even though it makes sense in the scope that 
we're going to be using C++ for the internal implementations. I would make that 
as a follow on ticket. additions are fair game for now. 


---

Reply via email to