Ensure -c++out is not used with -c++

Error checking for this combination implemented as well as correcting
Octave

Also refactor, replacing CPlusPlusOut variable with cparse_cplusplusout
for an implementation which more closely resembles cparse_cplusplus which
is also required in both .c and .cxx files.
This commit is contained in:
William S Fulton 2013-12-12 20:44:08 +00:00
commit 2121e1217e
8 changed files with 30 additions and 14 deletions

View file

@ -12,6 +12,7 @@
* ----------------------------------------------------------------------------- */
#include "swigmod.h"
#include "cparse.h"
static String *global_name = 0;
static String *op_prefix = 0;
@ -86,7 +87,6 @@ public:
director_multiple_inheritance = 1;
director_language = 1;
docs = NewHash();
CPlusPlusOut = 1;
}
virtual void main(int argc, char *argv[]) {
@ -133,6 +133,10 @@ public:
SWIG_config_file("octave.swg");
SWIG_typemap_lang("octave");
allow_overloading();
// Octave API is C++, so output must be C++ compatibile even when wrapping C code
if (!cparse_cplusplus)
Swig_cparse_cplusplusout(1);
}
virtual int top(Node *n) {