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

    https://github.com/apache/nifi-minifi-cpp/pull/436#discussion_r233910986
  
    --- Diff: nanofi/src/api/nanofi.cpp ---
    @@ -72,19 +41,17 @@ class DirectoryConfiguration {
      * nifi_instance *create_instance(nifi_port const *port) {
      */
     nifi_instance *create_instance(const char *url, nifi_port *port) {
    -  // make sure that we have a thread safe way of initializing the content 
directory
    -  DirectoryConfiguration::initialize();
    -
    -  // need reinterpret cast until we move to C for this module.
    -  nifi_instance *instance = 
reinterpret_cast<nifi_instance*>(malloc(sizeof(nifi_instance)));
    +    // need reinterpret cast until we move to C for this module.
    +  nifi_instance *instance = 
(nifi_instance*)(malloc(sizeof(nifi_instance)));
       /**
        * This API will gradually move away from C++, hence malloc is used for 
nifi_instance
        * Since minifi::Instance is currently being used, then we need to use 
new in that case.
        */
    -  instance->instance_ptr = new minifi::Instance(url, port->port_id);
    +  instance->instance_ptr = create_cxx_instance(url,port);
       // may have to translate port ID here in the future
       // need reinterpret cast until we move to C for this module.
    -  instance->port.port_id = 
reinterpret_cast<char*>(malloc(strlen(port->port_id) + 1));
    +  instance->port.port_id = (char*)(malloc(strlen(port->port_id) + 1));
    --- End diff --
    
    I expect this to fail linter, do we already have nanofi out of range of 
that? 


---

Reply via email to