MLIR
17.0.0git
|
Template for a reference to a concrete type which captures a python reference to its underlying python object. More...
#include "Bindings/Python/IRModule.h"
Public Member Functions | |
PyObjectRef (T *referrent, pybind11::object object) | |
PyObjectRef (PyObjectRef &&other) | |
PyObjectRef (const PyObjectRef &other) | |
~PyObjectRef ()=default | |
int | getRefCount () |
pybind11::object | releaseObject () |
Releases the object held by this instance, returning it. More... | |
T * | get () |
T * | operator-> () |
pybind11::object | getObject () |
operator bool () const | |
Template for a reference to a concrete type which captures a python reference to its underlying python object.
Definition at line 47 of file IRModule.h.
|
inline |
Definition at line 49 of file IRModule.h.
|
inline |
Definition at line 55 of file IRModule.h.
|
inline |
Definition at line 60 of file IRModule.h.
|
default |
|
inline |
Definition at line 80 of file IRModule.h.
|
inline |
Definition at line 85 of file IRModule.h.
Referenced by mlir::python::PyThreadContextEntry::pushInsertionPoint(), and mlir::python::PyThreadContextEntry::pushLocation().
|
inline |
Definition at line 64 of file IRModule.h.
|
inline |
Definition at line 89 of file IRModule.h.
|
inline |
Definition at line 81 of file IRModule.h.
|
inline |
Releases the object held by this instance, returning it.
This is the proper thing to return from a function that wants to return the reference. Note that this does not work from initializers.
Definition at line 73 of file IRModule.h.
Referenced by mlir::python::PyMlirContext::createFromCapsule(), mlir::python::PyModule::createFromCapsule(), mlir::python::PyOperation::createFromCapsule(), and mlir::python::PyConcreteOpInterface< ConcreteIface >::getOperationObject().