init.hh (11990:5fad911cc326) | init.hh (13662:3e072654ca86) |
---|---|
1/* 2 * Copyright (c) 2017 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 76 unchanged lines hidden (view full) --- 85 public: 86 EmbeddedPyBind(const char *_name, 87 void (*init_func)(pybind11::module &), 88 const char *_base); 89 90 EmbeddedPyBind(const char *_name, 91 void (*init_func)(pybind11::module &)); 92 | 1/* 2 * Copyright (c) 2017 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 76 unchanged lines hidden (view full) --- 85 public: 86 EmbeddedPyBind(const char *_name, 87 void (*init_func)(pybind11::module &), 88 const char *_base); 89 90 EmbeddedPyBind(const char *_name, 91 void (*init_func)(pybind11::module &)); 92 |
93#if PY_MAJOR_VERSION >= 3 94 static PyObject *initAll(); 95#else |
|
93 static void initAll(); | 96 static void initAll(); |
97#endif |
|
94 95 private: 96 void (*initFunc)(pybind11::module &); 97 98 bool depsReady() const; 99 void init(pybind11::module &m); 100 101 bool registered; 102 const std::string name; 103 const std::string base; 104 105 static std::map<std::string, EmbeddedPyBind *> &getMap(); 106}; 107 | 98 99 private: 100 void (*initFunc)(pybind11::module &); 101 102 bool depsReady() const; 103 void init(pybind11::module &m); 104 105 bool registered; 106 const std::string name; 107 const std::string base; 108 109 static std::map<std::string, EmbeddedPyBind *> &getMap(); 110}; 111 |
108int initM5Python(); | 112void registerNativeModules(); 113 |
109int m5Main(int argc, char **argv); | 114int m5Main(int argc, char **argv); |
110PyMODINIT_FUNC initm5(void); | |
111 112#endif // __SIM_INIT_HH__ | 115 116#endif // __SIM_INIT_HH__ |