4#define LOAD_FUNC_ATTR(obj, mod) \
6 obj##_attr = mod.attr(#obj); \
9#define DECL_STRUCT_ATTR __attribute__((visibility("hidden")))
14#define INFO_MSG(msg) \
16 std::cout << "Info [" __FILE__ << "@" << __LINE__ << "]: "; \
17 std::cout << #msg << std::endl; \
20#define WARN_MSG(msg) \
22 std::cout << "Warn [" __FILE__ << "@" << __LINE__ << "]: "; \
23 std::cout << #msg << std::endl; \
26#define ERROR_MSG(msg) \
28 std::cerr << "Error [" __FILE__ << "@" << __LINE__ << "]: "; \
29 std::cerr << #msg << std::endl; \
32#include <pybind11/pybind11.h>
34namespace matplotlibcpp17 {
41 pybind11::object unwrap()
const {
return self; }
44 pybind11::object
self;
52 ObjectWrapper(
const pybind11::object &
object) {
self = object; }
53 ObjectWrapper(pybind11::object &&
object) {
self = std::move(
object); }
A base class for python wrapper classes.
Definition: common.h:39
A proxy class for pybind object.
Definition: common.h:50