You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Ferenc Gerlits (Jira)" <ji...@apache.org> on 2023/03/07 10:03:00 UTC

[jira] [Created] (MINIFICPP-2070) Make the creation of ObjectReference from PyObject* safer

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)