Ferenc Gerlits created MINIFICPP-2070:
-----------------------------------------

             Summary: Make the creation of ObjectReference from PyObject* safer
                 Key: MINIFICPP-2070
                 URL: https://issues.apache.org/jira/browse/MINIFICPP-2070
             Project: Apache NiFi MiNiFi C++
          Issue Type: Improvement
            Reporter: Ferenc Gerlits


{{minifi::extensions::python::ObjectReference}} has a constructor and 
assignment operator which take a {{PyObject*}} as an argument.  Using these is 
fiddly, because the caller needs to decide whether they need to increase the 
reference count, and do it manually before/after the call.  See, e.g. 
{{Converter<bool>}} in {{minifi/extensions/python/types/Types.h}}.

Either make the use of these functions safer, or remove them and replace them 
with factory functions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to