Apply the usual fix for Get/SetClientData

This commit is contained in:
Robin Dunn
2017-07-21 16:18:06 -07:00
parent 1caf4fd24c
commit 70f6f447b4

View File

@@ -96,6 +96,25 @@ def run():
c.find('AddPrivateChild.prop').transfer = True
c.find('AddChild.prop').transfer = True
# The [G|S]etClientData methods deal with untyped void* values, which we
# don't support. The [G|S]etClientObject methods use wxClientData instances
# which we have a MappedType for, so make the ClientData methods just be
# aliases for ClientObjects. From the Python programmer's perspective they
# would be virtually the same anyway.
c.find('SetClientObject.clientObject').transfer = True
c.find('SetClientObject.clientObject').name = 'data'
c.find('GetClientData').ignore()
c.find('SetClientData').ignore()
c.find('GetClientObject').pyName = 'GetClientData'
c.find('SetClientObject').pyName = 'SetClientData'
c.addPyMethod('GetClientObject', '(self, n)',
doc="Alias for :meth:`GetClientData`",
body="return self.GetClientData(n)")
c.addPyMethod('SetClientObject', '(self, n, data)',
doc="Alias for :meth:`SetClientData`",
body="self.SetClientData(n, data)")
c = module.find('wxPGChoicesData')
tools.ignoreConstOverloads(c)