phrocker commented on a change in pull request #515: MINIFICPP-646 - Re-evaluate passing attributes. Potentially deprecate… URL: https://github.com/apache/nifi-minifi-cpp/pull/515#discussion_r297100152
########## File path: nanofi/include/api/nanofi.h ########## @@ -321,7 +321,16 @@ void free_flowfile(flow_file_record* ff); * @size size size of the data pointed by "value" * @return 0 in case of success, -1 otherwise (already existed) **/ -int8_t add_attribute(flow_file_record*, const char *key, void *value, size_t size); +int8_t add_attribute(flow_file_record*, const char *key, const char *value, size_t size); + +/** + * Adds an attribute, fails in case there is already an attribute with the given key. + * @param ff flow file + * @param key name of attribute + * @param value location of value - expected to be null-terminated string + * @return 0 in case of success, -1 otherwise (already existed) + **/ +int8_t add_attribute_str(flow_file_record*, const char *key, const char *value); Review comment: So this functions as purely a convenience function? ---------------------------------------------------------------- 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
