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:
parent
76f0a08ebf
commit
c7982bbdc8
6 changed files with 35 additions and 16 deletions
|
|
@ -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","")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue