resonance 1.0.1
Loading...
Searching...
No Matches
fromapi.h
Go to the documentation of this file.
1#pragma once
2
3#include "script/cxx/config.h"
4
5namespace Py {
6
25class FromAPI {
26public:
32 explicit FromAPI(PyObject *pyob) : mPtr(pyob) {
33 }
34
41 virtual ~FromAPI() {
42 Py_XDECREF(mPtr);
43 }
44
55 PyObject *mPtr;
56};
57
58} // namespace Py
virtual ~FromAPI()
Release the adopted reference.
Definition fromapi.h:41
FromAPI(PyObject *pyob)
Adopt a new reference.
Definition fromapi.h:32
PyObject * mPtr
Adopted reference, null when the API call failed.
Definition fromapi.h:55
Configuration header of the PyCXX binding layer.
C++ wrappers for the embedded Python interpreter's objects, types, and extension modules.
Definition attributeerror.h:7