summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2010-09-14 06:34:57 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2010-09-14 06:34:57 +0000
commitc0fe7400d2a4fa334558c73be3a6f1f2dd0f0bf7 (patch)
treecf3499bd07b03c66c5428a7dea6429d9d81dbafa /Source
parentf89181d4c8eba9384f904688940c0cb65f62f7d0 (diff)
downloadswig-c0fe7400d2a4fa334558c73be3a6f1f2dd0f0bf7.tar.gz
Fix undefined behaviour with Ruby and autodoc generation
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12218 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Source')
-rw-r--r--Source/Modules/ruby.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx
index bcdfd69d3..3887d8a98 100644
--- a/Source/Modules/ruby.cxx
+++ b/Source/Modules/ruby.cxx
@@ -121,6 +121,7 @@ public:
/* flags for the make_autodoc function */
enum autodoc_t {
+ AUTODOC_NOTSET,
AUTODOC_CLASS,
AUTODOC_CTOR,
AUTODOC_DTOR,
@@ -580,6 +581,9 @@ private:
case AUTODOC_SETTER:
Printf(doc, " Document-method: %s.%s=\n\n", full_name, symname);
break;
+ case AUTODOC_NOTSET:
+ assert(0);
+ break;
}
}
@@ -608,6 +612,9 @@ private:
if (type) Printf(doc, " -> %s", type);
break;
}
+ case AUTODOC_NOTSET:
+ assert(0);
+ break;
default:
break;
}
@@ -665,6 +672,9 @@ private:
if (type) Printf(doc, " -> %s", type);
break;
}
+ case AUTODOC_NOTSET:
+ assert(0);
+ break;
}
}
@@ -698,6 +708,9 @@ private:
case AUTODOC_SETTER:
Printf(doc, "Set new value for attribute.\n");
break;
+ case AUTODOC_NOTSET:
+ assert(0);
+ break;
}
}
@@ -762,6 +775,7 @@ public:
modvar = 0;
feature = 0;
prefix = 0;
+ last_mode = AUTODOC_NOTSET,
last_autodoc = NewString("");
current = NO_CPP;
classes = 0;