Don't generate invalid forward enum declarations
Such declarations are invalid without specifying the underlying type (which is only possible since C++11) and are useless anyhow, so just don't bother emitting them.
This commit is contained in:
parent
3765a08743
commit
e7fa72fc06
1 changed files with 11 additions and 0 deletions
|
|
@ -1440,6 +1440,17 @@ public:
|
|||
return Language::constructorHandler(n);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Language::enumforwardDeclaration()
|
||||
* ---------------------------------------------------------------------- */
|
||||
|
||||
virtual int enumforwardDeclaration(Node *n) {
|
||||
// Base implementation of this function calls enumDeclaration() for "missing" enums, i.e. those without any definition at all. This results in invalid (at
|
||||
// least in C++) enum declarations in the output, so simply don't do this here.
|
||||
(void) n;
|
||||
return SWIG_OK;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
* enumDeclaration()
|
||||
* --------------------------------------------------------------------- */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue