BewareMyPower commented on code in PR #16535:
URL: https://github.com/apache/pulsar/pull/16535#discussion_r963442683


##########
pulsar-client-cpp/python/src/utils.h:
##########
@@ -82,3 +82,25 @@ struct CryptoKeyReaderWrapper {
     CryptoKeyReaderWrapper();
     CryptoKeyReaderWrapper(const std::string& publicKeyPath, const 
std::string& privateKeyPath);
 };
+
+class CaptivePythonObjectMixin {
+   protected:
+    PyObject* _captive;
+
+    CaptivePythonObjectMixin(PyObject* captive) {
+        _captive = captive;
+        PyGILState_STATE state = PyGILState_Ensure();
+        Py_XINCREF(_captive);
+        PyGILState_Release(state);
+    }
+
+    CaptivePythonObjectMixin(py::object captive) : 
CaptivePythonObjectMixin(captive.ptr()) {}

Review Comment:
   ```suggestion
   ```
   
   Remove this override constructor since it's never used currently.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to