diff options
author | Nathan Binkert <nate@binkert.org> | 2007-08-02 22:50:02 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2007-08-02 22:50:02 -0700 |
commit | 0536d0cde931e89d33b10228950d455dd54d8a5f (patch) | |
tree | e4d8335f239b5216942768a48d6879f184182f6c /src/python/swig/pyobject.hh | |
parent | dc7a38dce785cf0deabb35022bb2dbfc1cc8ea3a (diff) | |
download | gem5-0536d0cde931e89d33b10228950d455dd54d8a5f.tar.xz |
python: Improve support for python calling back to C++ member functions.
Add support for declaring SimObjects to swig so their members can be wrapped.
Make sim_object.i only contain declarations for SimObject.
Create system.i to contain declarations for System.
Update python code to properly call the C++ given the new changes.
--HG--
extra : convert_revision : 82076ee69e8122d56e91b92d6767e356baae420a
Diffstat (limited to 'src/python/swig/pyobject.hh')
-rw-r--r-- | src/python/swig/pyobject.hh | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/python/swig/pyobject.hh b/src/python/swig/pyobject.hh index da609e07e..8e3a96994 100644 --- a/src/python/swig/pyobject.hh +++ b/src/python/swig/pyobject.hh @@ -47,26 +47,6 @@ void loadIniFile(PyObject *_resolveFunc); int connectPorts(SimObject *o1, const std::string &name1, int i1, SimObject *o2, const std::string &name2, int i2); -inline BaseCPU * -convertToBaseCPUPtr(SimObject *obj) -{ - BaseCPU *ptr = dynamic_cast<BaseCPU *>(obj); - - if (ptr == NULL) - warn("Casting to BaseCPU pointer failed"); - return ptr; -} - -inline System * -convertToSystemPtr(SimObject *obj) -{ - System *ptr = dynamic_cast<System *>(obj); - - if (ptr == NULL) - warn("Casting to System pointer failed"); - return ptr; -} - inline void initAll() { |