Fix for enum forward declarations
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6117 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cf79d771c0
commit
4c02e7cc0e
4 changed files with 42 additions and 1 deletions
|
|
@ -124,6 +124,8 @@ int Dispatcher::emit_one(Node *n) {
|
|||
ret = enumDeclaration(n);
|
||||
} else if (strcmp(tag,"enumitem") == 0) {
|
||||
ret = enumvalueDeclaration(n);
|
||||
} else if (strcmp(tag,"enumforward") == 0) {
|
||||
ret = enumforwardDeclaration(n);
|
||||
} else if (strcmp(tag,"class") == 0) {
|
||||
ret = classDeclaration(n);
|
||||
} else if (strcmp(tag,"classforward") == 0) {
|
||||
|
|
@ -236,6 +238,7 @@ int Dispatcher::cDeclaration(Node *n) { return defaultHandler(n); }
|
|||
int Dispatcher::externDeclaration(Node *n) { return defaultHandler(n); }
|
||||
int Dispatcher::enumDeclaration(Node *n) { return defaultHandler(n); }
|
||||
int Dispatcher::enumvalueDeclaration(Node *n) { return defaultHandler(n); }
|
||||
int Dispatcher::enumforwardDeclaration(Node *n) { return defaultHandler(n); }
|
||||
int Dispatcher::classDeclaration(Node *n) { return defaultHandler(n); }
|
||||
int Dispatcher::templateDeclaration(Node *n) { return defaultHandler(n); }
|
||||
int Dispatcher::classforwardDeclaration(Node *n) { return defaultHandler(n); }
|
||||
|
|
@ -1387,6 +1390,15 @@ int Language::enumvalueDeclaration(Node *n) {
|
|||
return SWIG_OK;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Language::enumforwardDeclaration()
|
||||
* ---------------------------------------------------------------------- */
|
||||
|
||||
int Language::enumforwardDeclaration(Node *n) {
|
||||
(void)n;
|
||||
return SWIG_OK;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Language::memberconstantHandler()
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ class Dispatcher {
|
|||
virtual int externDeclaration(Node *n);
|
||||
virtual int enumDeclaration(Node *n);
|
||||
virtual int enumvalueDeclaration(Node *n);
|
||||
virtual int enumforwardDeclaration(Node *n);
|
||||
virtual int classDeclaration(Node *n);
|
||||
virtual int classforwardDeclaration(Node *n);
|
||||
virtual int constructorDeclaration(Node *n);
|
||||
|
|
@ -148,6 +149,7 @@ public:
|
|||
virtual int externDeclaration(Node *n);
|
||||
virtual int enumDeclaration(Node *n);
|
||||
virtual int enumvalueDeclaration(Node *n);
|
||||
virtual int enumforwardDeclaration(Node *n);
|
||||
virtual int classDeclaration(Node *n);
|
||||
virtual int classforwardDeclaration(Node *n);
|
||||
virtual int constructorDeclaration(Node *n);
|
||||
|
|
|
|||
|
|
@ -795,6 +795,17 @@ class TypePass : private Dispatcher {
|
|||
return SWIG_OK;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* enumforwardDeclaration()
|
||||
* ------------------------------------------------------------ */
|
||||
|
||||
virtual int enumforwardDeclaration(Node *n) {
|
||||
|
||||
// Use enumDeclaration() to do all the hard work.
|
||||
// Note that no children can be emitted in a forward declaration as there aren't any.
|
||||
return enumDeclaration(n);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* usingDeclaration()
|
||||
* ------------------------------------------------------------ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue