Skip to content
Snippets Groups Projects
Commit 791437d9 authored by AlQuemist's avatar AlQuemist Committed by Wuttke, Joachim
Browse files

PyObjectPtr: Minor improvements

parent ca8eb9e4
No related branches found
No related tags found
1 merge request!1636PyCore: Re-implementation of embedded Python as a separate module (Major change)
#include "PyObjectPtr.h" #include "PyObjectPtr.h"
#include "PythonInterpreter.h" #include "PythonInterpreter.h"
#include <exception> // runtime_error #include <stdexcept> // runtime_error
#include <sstream> // stringstream
#include <string> #include <string>
......
...@@ -45,19 +45,13 @@ public: ...@@ -45,19 +45,13 @@ public:
Status status; Status status;
PyObjectPtr(PyObject* pyobject_ptr, const Status& status); PyObjectPtr(PyObject* pyobject_ptr, const Status& status);
PyObjectPtr(PyObject* pyobject_ptr); PyObjectPtr(PyObject* pyobject_ptr);
PyObjectPtr(const Status& status); PyObjectPtr(const Status& status);
~PyObjectPtr(); ~PyObjectPtr();
// disallow copy constructor
PyObjectPtr(const PyObjectPtr&) = delete; PyObjectPtr(const PyObjectPtr&) = delete;
// disallow copy assignment
PyObjectPtr& operator=(const PyObjectPtr&) = delete;
// allow move constructor
PyObjectPtr(PyObjectPtr&& other); PyObjectPtr(PyObjectPtr&& other);
PyObjectPtr& operator=(const PyObjectPtr&) = delete;
// reset the container to the initial status (does _not_ release the Python resource) // reset the container to the initial status (does _not_ release the Python resource)
void reset(); void reset();
// reset the container to the initial status and return the PyObject pointer (does _not_ release // reset the container to the initial status and return the PyObject pointer (does _not_ release
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment