Fix Octave C support by adding extern "C" around header section. Fix Octave examples (simple, contract, variables, pointer, funcptr) such that example.c files are built with C compiler, and wrappers with C++ compiler.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10299 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4d283f59c3
commit
13c0b040fc
11 changed files with 83 additions and 51 deletions
|
|
@ -53,7 +53,8 @@ class Dispatcher {
|
|||
public:
|
||||
|
||||
Dispatcher ():cplus_mode(PUBLIC) {
|
||||
} virtual ~ Dispatcher () {
|
||||
}
|
||||
virtual ~ Dispatcher () {
|
||||
}
|
||||
|
||||
virtual int emit_one(Node *n);
|
||||
|
|
@ -216,6 +217,12 @@ public:
|
|||
virtual String *runtimeCode(); /* returns the language specific runtime code */
|
||||
virtual String *defaultExternalRuntimeFilename(); /* the default filename for the external runtime */
|
||||
|
||||
/* Runtime is C++ based, so extern "C" header section */
|
||||
void enable_cplus_runtime_mode();
|
||||
|
||||
/* Returns the cpp_runtime mode */
|
||||
int cplus_runtime_mode();
|
||||
|
||||
/* Allow director related code generation */
|
||||
void allow_directors(int val = 1);
|
||||
|
||||
|
|
@ -295,6 +302,7 @@ private:
|
|||
Hash *enumtypes;
|
||||
int overloading;
|
||||
int multiinput;
|
||||
int cplus_runtime;
|
||||
int directors;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue