try not to require -api option in octave

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11577 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Xavier Delacour 2009-08-15 01:19:28 +00:00
commit b81cb3bff9
2 changed files with 24 additions and 2 deletions

View file

@ -1,4 +1,26 @@
#if OCTAVE_API_VERSION_OPTION>0
#define USE_OCTAVE_API_VERSION OCTAVE_API_VERSION_OPTION
#else
#include <octave/version.h>
#ifdef OCTAVE_API_VERSION_N
#define USE_OCTAVE_API_VERSION OCTAVE_API_VERSION_N
#else // Interim hack to distinguish between Octave 3.2 and earlier versions.
#define ComplexLU __ignore
#include <octave/CmplxLU.h>
#undef ComplexLU
#ifdef octave_Complex_LU_h
#define USE_OCTAVE_API_VERSION 36
#else
#define USE_OCTAVE_API_VERSION 37
#endif
#endif
#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)

View file

@ -56,7 +56,7 @@ public:
director_multiple_inheritance = 1;
director_language = 1;
docs = NewHash();
api_version = 37;
api_version = 0;
}
virtual void main(int argc, char *argv[]) {
@ -138,7 +138,7 @@ public:
Printf(f_runtime, "#define SWIGOCTAVE\n");
Printf(f_runtime, "#define SWIG_name_d \"%s\"\n", module);
Printf(f_runtime, "#define SWIG_name %s\n", module);
Printf(f_runtime, "#define USE_OCTAVE_API_VERSION %i\n", api_version);
Printf(f_runtime, "#define OCTAVE_API_VERSION_OPTION %i\n", api_version);
if (directorsEnabled()) {
Printf(f_runtime, "#define SWIG_DIRECTORS\n");