summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/Modules/ruby.cxx29
-rw-r--r--TODO2
2 files changed, 31 insertions, 0 deletions
diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx
index 6953acb3d..5f6924711 100644
--- a/Source/Modules/ruby.cxx
+++ b/Source/Modules/ruby.cxx
@@ -1247,6 +1247,33 @@ public:
Replaceall(klass->header,"$freeproto", "");
}
+ void baseClassHandler(Node *n) {
+ Node *c;
+ for (c = firstChild(n); c; c = nextSibling(c)) {
+ char *tag = Char(nodeType(c));
+ if (!tag) {
+ Printf(stderr,"SWIG: Fatal internal error. Malformed parse tree node!\n");
+ return;
+ }
+ // emit_one(c);
+ }
+ }
+
+ void copyBaseClassMembers(Node *n) {
+ List *baselist = Getattr(n,"bases");
+ if (baselist && Len(baselist) > 0) {
+ /* Skip the first base class */
+ Node *base = Firstitem(baselist);
+
+ /* Loop over remaining base classes */
+ base = Nextitem(baselist);
+ while (base) {
+ baseClassHandler(base);
+ base = Nextitem(baselist);
+ }
+ }
+ }
+
/* ----------------------------------------------------------------------
* classHandler()
* ---------------------------------------------------------------------- */
@@ -1288,6 +1315,8 @@ public:
"$freeproto",
NIL);
+ copyBaseClassMembers(n);
+
Language::classHandler(n);
handleBaseClasses(n);
diff --git a/TODO b/TODO
index 43afd85a7..8cc941f56 100644
--- a/TODO
+++ b/TODO
@@ -191,6 +191,8 @@ Tcl
Ruby
----
+**** Add Ruby support for Mark Rose's polymorphism code.
+
**** Investigate the new object allocation framework that has been
implemented for Ruby 1.8 and determine what (if anything) needs
to be changed for the wrapper code generated by SWIG. For background