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
This commit is contained in:
@@ -1025,13 +1025,13 @@ class PortRef(object):
|
||||
|
||||
# Call C++ to create corresponding port connection between C++ objects
|
||||
def ccConnect(self):
|
||||
import internal
|
||||
from m5.objects.params import connectPorts
|
||||
|
||||
if self.ccConnected: # already done this
|
||||
return
|
||||
peer = self.peer
|
||||
internal.sim_object.connectPorts(self.simobj.getCCObject(), self.name,
|
||||
self.index, peer.simobj.getCCObject(), peer.name, peer.index)
|
||||
connectPorts(self.simobj.getCCObject(), self.name, self.index,
|
||||
peer.simobj.getCCObject(), peer.name, peer.index)
|
||||
self.ccConnected = True
|
||||
peer.ccConnected = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user