diff options
author | Karl Wette <karl.wette@gmail.com> | 2012-05-14 09:24:00 +0000 |
---|---|---|
committer | Karl Wette <karl.wette@gmail.com> | 2012-05-14 09:24:00 +0000 |
commit | 4f11aaa8492b176ee15f5b3d9055585f46746351 (patch) | |
tree | c9ef368adbea6861593a533e44d2267a54c9b7bb /Lib/octave | |
parent | bf0fe8346254d8bb0d0135d943965903b74ee968 (diff) | |
download | swig-4f11aaa8492b176ee15f5b3d9055585f46746351.tar.gz |
Declare Octave public wrapping functions with DEFUNX_DLD
- New helper function Octave_begin_function writes function declaration
and installer function definition using SWIG_DEFUN macro, which in
turn uses Octave DEFUNX_DLD macro
- Can now use Octave's dynamic module loader to load functions safely
- Link documentation of public wrapping functions through DEFUNX_DLD
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13087 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/octave')
-rw-r--r-- | Lib/octave/octrun.swg | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/octave/octrun.swg b/Lib/octave/octrun.swg index a9ee5380f..3ab6c7525 100644 --- a/Lib/octave/octrun.swg +++ b/Lib/octave/octrun.swg @@ -14,6 +14,12 @@ #endif +#if OCTAVE_API_VERSION_NUMBER < 37 +#define SWIG_DEFUN(cname, wname, doc) DEFUNX_DLD(#cname, wname, FS ## cname, args, nargout, doc) +#else +#define SWIG_DEFUN(cname, wname, doc) DEFUNX_DLD(#cname, wname, G ## cname, args, nargout, doc) +#endif + SWIGRUNTIME bool SWIG_check_num_args(const char *func_name, int num_args, int max_args, int min_args, int varargs) { if (num_args > max_args && !varargs) error("function %s takes at most %i arguments", func_name, max_args); |