X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/214c4fbea5875368cc21a082d20cb082cd38cb3c..bc50a2ae95f2ab36b16ceedc7902a9cbfb2f70ea:/wxPython/src/_defs.i?ds=sidebyside diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index c07f2078b6..1ceba2c622 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -93,6 +93,7 @@ typedef unsigned long wxUIntPtr; #define %noautodoc %feature("noautodoc") #if SWIG_VERSION >= 0x010327 +#undef %kwargs #define %kwargs %feature("kwargs", "1") #define %nokwargs %feature("kwargs", "0") #else @@ -381,6 +382,23 @@ typedef unsigned long wxUIntPtr; %enddef #endif + +//--------------------------------------------------------------------------- +// Generates a base_On* method that just wraps a call to the On*, and mark it +// deprecated. We need this because there is no longer any need for a +// base_On* method to be able to call the C++ base class method, since our +// virtualization code can now sense when an attempt is being made to call +// the base class version from the derived class override. + +%define %MAKE_BASE_FUNC(Class, Method) + %pythoncode { + def base_##Method(*args, **kw): + return Class.Method(*args, **kw) + base_##Method = wx._deprecated(base_##Method, + "Please use Class.Method instead.") + } +%enddef + //--------------------------------------------------------------------------- // Forward declarations and %renames for some classes, so the autodoc strings // will be able to use the right types even when the real class declaration is