summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Johnson <ljohnson@users.sourceforge.net>2003-03-10 18:34:23 +0000
committerLogan Johnson <ljohnson@users.sourceforge.net>2003-03-10 18:34:23 +0000
commitf0250d6ccb9eaf8bd88fa9621ea3702091f41d6b (patch)
tree88ba6d3c79231dba5b6899e4e7a0ed779a56aadc
parent58d87c5c9956e87c14bef22fc25e55f18439353f (diff)
downloadswig-f0250d6ccb9eaf8bd88fa9621ea3702091f41d6b.tar.gz
*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4496 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-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