#include <Python.h>
#include "pybind11/pybind11.h"
Go to the source code of this file.
|
namespace | gem5 |
| Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
|
|
◆ 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(); \
} \
\
\
}
const std::string & name()
Definition at line 56 of file pybind_init.hh.