make %callback more uniform and usable

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6435 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-18 07:35:18 +00:00
commit c7982bbdc8
6 changed files with 35 additions and 16 deletions

View file

@ -108,6 +108,17 @@ These methods "may be called" if needed.
*/
%define %pythoncallback(FLAG) %feature("python:callback",#FLAG) %enddef
%define %nopythoncallback %feature("python:callback","") %enddef
#define %pythoncallback(x) %feature("python:callback",`x`)
#define %nopythoncallback %feature("python:callback","")
/* Support for the old %callback directive name */
#ifdef %callback
#undef %callback
#endif
#define %callback(x) %pythoncallback(x)
#ifdef %nocallback
#undef %nocallback
#endif
#define %nocallback %nopythoncallback; %feature("callback","")