Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
CPPExcInstance.h
Go to the documentation of this file.
1#ifndef CPYRT_CPPEXCINSTANCE_H
2#define CPYRT_CPPEXCINSTANCE_H
3
4//////////////////////////////////////////////////////////////////////////////
5// //
6// cppjit::cpyrt::CPPExceptionInstance //
7// //
8// Python-side proxy, encapsulaties a C++ exception object. //
9// //
10//////////////////////////////////////////////////////////////////////////////
11
12namespace cppjit::cpyrt {
13
15public:
16 PyBaseExceptionObject fBase;
19};
20
21//- object proxy type and type verification ----------------------------------
23
24template <typename T> inline bool CPPExcInstance_Check(T* object) {
25 return object && PyObject_TypeCheck(object, &CPPExcInstance_Type);
26}
27
28template <typename T> inline bool CPPExcInstance_CheckExact(T* object) {
29 return object && Py_TYPE(object) == &CPPExcInstance_Type;
30}
31
32} // namespace cppjit::cpyrt
33
34#endif // !CPYRT_CPPEXCINSTANCE_H
_object PyObject
#define CPYRT_IMPORT
Definition CommonDefs.h:26
PyBaseExceptionObject fBase
bool CPPExcInstance_CheckExact(T *object)
bool CPPExcInstance_Check(T *object)
PyTypeObject CPPExcInstance_Type