gem5  v22.1.0.0
Classes | Namespaces | Macros
pybind_init.hh File Reference
#include <Python.h>
#include "pybind11/pybind11.h"

Go to the source code of this file.

Classes

struct  gem5::PybindModuleInit
 

Namespaces

 gem5
 Reference material can be found at the JEDEC website: UFS standard http://www.jedec.org/standards-documents/results/jesd220 UFS HCI specification http://www.jedec.org/standards-documents/results/jesd223.
 

Macros

#define GEM5_PYBIND_MODULE_INIT(name, func)
 

Macro Definition Documentation

◆ GEM5_PYBIND_MODULE_INIT

#define GEM5_PYBIND_MODULE_INIT (   name,
  func 
)
Value:
namespace { \
\
::PyObject * \
initializer() \
{ \
static ::pybind11::module_::module_def mod_def; \
static auto m = ::pybind11::module_::create_extension_module( \
#name, nullptr, &mod_def); \
func(m); \
m.inc_ref(); \
return m.ptr(); \
} \
\
::gem5::PybindModuleInit modInit(#name, initializer); \
\
}
const std::string & name()
Definition: trace.cc:49

Definition at line 56 of file pybind_init.hh.


Generated on Wed Dec 21 2022 10:22:58 for gem5 by doxygen 1.9.1