MCPcopy Create free account
hub / github.com/pybind/pybind11 / embedded_module

Method embedded_module

include/pybind11/embed.h:73–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71struct embedded_module {
72 using init_t = PyObject *(*) ();
73 embedded_module(const char *name, init_t init) {
74 if (Py_IsInitialized() != 0) {
75 pybind11_fail("Can't add new modules after the interpreter has been initialized");
76 }
77
78 auto result = PyImport_AppendInittab(name, init);
79 if (result == -1) {
80 pybind11_fail("Insufficient memory to add a new module");
81 }
82 }
83};
84
85struct wide_char_arg_deleter {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected