OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
CPythonObjectNew.h
Go to the documentation of this file.
1/*****************************************************************/
10#pragma once
11#include "CPythonObject.h"
12
14{
15public:
16 CPythonObjectNew(PyObject* newRef) : CPythonObject(newRef) {}
17
19 void reset(PyObject* ref)
20 {
21 if (_ref != nullptr)
22 {
23 Py_XDECREF(_ref);
24 _ref = nullptr;
25 }
26 _ref = ref;
27 }
28
29
30};
Definition CPythonObject.h:13
PyObject * _ref
Definition CPythonObject.h:70
void reset(CPythonObject &&other)
Definition CPythonObject.h:34
Definition CPythonObjectNew.h:14
CPythonObjectNew(PyObject *newRef)
Definition CPythonObjectNew.h:16
void reset(PyObject *ref)
Definition CPythonObjectNew.h:19